• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

11-安全配置指导

目录

28-SAVA配置

本章节下载 28-SAVA配置  (408.28 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500G-AF/Configure/Operation_Manual/H3C_S12500G_AF_R7624Pxx-4376/11/202401/2028197_30005_0.htm

28-SAVA配置


1 SAVA

1.1  SAVA简介

SAVA(Source Address Validation Architecture,源地址验证架构)是一种根据设备的路由信息检查攻击报文的技术,用来防范基于源IPv6地址欺骗的攻击。在设备的某个接口上开启SAVA功能后,该接口上将会基于所有出接口为该接口的路由条目生成对应的SAVA表项。当该接口收到IPv6报文后,如果存在该报文的源IPv6地址对应的SAVA表项,则报文会被接收;反之报文会被丢弃。

SAVA主要部署在与接入网相连的骨干网内边界设备上。

1.1.1  SAVA优势

图1-1所示,在IPv6多接入的组网环境中,当出现路由不对称时,无法保证在路由表中查找到去往报文源IPv6地址的出接口和报文进入设备的入接口一致。在此场景下,如果为了防范基于源IPv6地址的攻击,在Device B的Interface 1接口上开启了严格型uRPF(unicast Reverse Path Forwarding,单播反向路径转发)功能,Device B仅依靠本地路由信息会将接入网中合法的报文判断为IPv6源地址伪造,从而将其丢弃造成误判断。

相比较uRPF而言,SAVA技术在防范基于源地址攻击的同时,可以避免不对称路径造成的误判。此时,若在Device A和Device B的Interface 1上均开启SAVA功能,那么Device A和Device B上的SAVA功能除了能根据本地路由信息生成自己的SAVA表项,还会根据路由协议学习到对端的路由条目来生成SAVA表项。这样可以保证同Device A和Device B上最终生成相同的SAVA表项。SAVA表项的同步机制可以保证非对称的组网或路由不对称的组网下的合法用户报文不会被误丢弃。

图1-1 SAVA优势

 

1.1.2  运行机制

SAVA的运行机制可以概括为:

(1)     获取合法用户前缀。

(2)     根据合法用户前缀生成相应的SAVA表项。

(3)     根据SAVA表项对来自局域网的用户报文实现前缀级别的过滤。

1. 合法用户前缀的获取

在IPv6多接入的组网环境中,为了在每台边界接入设备上都能生成所有合法用户前缀对应的SAVA表项,需要先使每个骨干网的边界接入设备都获取局域网内所有合法用户的前缀信息,用户前缀信息可通过如下两种方式获取:

·     通过本地路由获取

从边界接入设备本地学习的到局域网的路由信息中获取用户前缀,这些路由信息包括与局域网相连的接口地址生成的直连路由、静态路由和动态路由。

·     通过远端同步路由获取

a.     边界接入设备各自将本地学习的到局域网的路由信息打上Tag(不同的边界设备对于到同一局域网的路由信息打上同样的Tag),并将此路由信息引入骨干网的动态路由协议中。

b.     其余的边界接入设备通过动态路由协议收到其他边界设备发布的带有Tag的路由信息后,通过本地配置的同步远端路由条目的Tag值,识别并接受对应的路由信息,从而获取到其他边界接入设备学习的合法用户前缀信息。

最终每台边界接入设备均可以获得局域网中所有的合法用户前缀信息。

2. SAVA表项的生成

当边界设备与局域网侧相连的接口上开启SAVA功能后,边界设备将根据本地路由和远端同步路由获取到的所有的合法用户前缀信息来生成与该接口绑定的SAVA表项。SAVA表项信息包含合法用户前缀、前缀长度和绑定的接口信息。

3. 对局域网用户的过滤

SAVA通过根据合法用户前缀信息生成的SAVA表项对来自局域网的用户报文进行源地址的校验,当开启SAVA功能的接口收到IPv6报文后,如果存在该报文的源IPv6地址对应的SAVA表项,则报文会被接收;反之报文会被丢弃。

1.1.3  SAVA典型应用场景

1. 与局域网直连场景

图1-2所示,局域网中的用户通过Device B和Device C接入骨干网,局域网中合法用户的IPv6前缀分别为2000::/64和2001::/64。Device B给局域网提供的网关地址包括2000::1/64和2001::1/64,局域网中的所有合法用户可以通过Device B访问核心网络。Device C给局域网提供的网关地址为2000::2/64。

在Device B和Device C的Interface1接口上同时开启SAVA功能后,当Device C收到来自Device B的IPv6前缀为2001::/64的IPv6路由信息后,会生成对应的IPv6前缀为2001::/64的SAVA表项。当Device C收到IPv6前缀为2001::/64的用户发送的报文后,由于该报文可以匹配到相应的SAVA表项,因此会被转发,从而保证了合法用户对网络的正常访问。

图1-2 与局域网直连场景

 

2. 与局域网非直连场景

图1-3所示,当路由收敛完毕后,Device D到局域网的路由路径经过Device E、Device C、Device B和Device A,局域网到Device D的路由路径经过Device A直接到达Device D,此时局域网的上下行流量存在不对称的情况。

在Device B和Device D的Interface1接口上均开启SAVA功能后,Device B和Device D互相同步路由条目获取到局域网的所有的网络前缀信息并生成对应的SAVA表项。当Device D收到局域网的用户发送的报文后,由于该报文可以匹配到相应的SAVA表项,因此会被转发,从而保证了合法用户对网络的正常访问。

图1-3 与局域网非直连场景

 

3. 与局域网非直连跨AS场景

图1-4所示,当路由收敛完毕后,Device D到局域网的路由路径经过Device E、Device C、Device B和Device A,局域网到Device D的路由路径经过Device A直接到达Device D,此时局域网的上下行流量存在不对称的情况。

在Device B和Device D的Interface1接口上均开启SAVA功能后,Device B和Device D互相同步路由条目获取到局域网的所有的网络前缀信息并生成对应的SAVA表项。其中,AS域内部Device B和Device C、Device D和Device E之间通过域内路由协议(比如OSPFv3)同步路由条目,AS间Device C和Device E通过BGP协议交互路由信息。当Device D收到局域网的用户发送的报文后,由于该报文可以匹配到相应的SAVA表项,因此会被转发,从而保证了合法用户对网络的正常访问。

图1-4 与局域网非直连跨AS场景

 

1.2  SAVA配置任务简介

SAVA配置任务如下:

(1)     开启SAVA功能

(2)     配置SAVA根据远端同步的路由条目生成SAVA表项

当一个局域网通过多台接入设备接入到骨干网,局域网内具有多个前缀的合法用户,边界接入设备上的局域网侧接口地址前缀只有部分与局域网内合法用户前缀相同时,本配置为必选。

(3)     配置接口加入SAVA接入组

一个局域网在同一台接入设备存在多个接入接口时,本配置为必选。

(4)     配置SAVA仿冒报文日志功能

1.3  开启SAVA功能

1. 配置限制和指导

本功能与uRPF和微分段功能互斥,无法同时配置。

本功能根据设备的路由条目生成对应的SAVA表,如果设备上的路由条目过多,在刚开启本功能时,可能会出现设备上存在路由条目却没有对应的SAVA表项的情况,这会暂时导致合法IPv6报文被丢弃。等待各接口完成所有SAVA表项的学习后,合法报文会被正常接收,不会被丢弃。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     开启SAVA功能。

ipv6 sava enable

缺省情况下,SAVA功能处于关闭状态。

1.4  配置SAVA根据远端同步的路由条目生成SAVA表项

1. 配置准备

在配置本功能前,需要配置如下路由链路标记功能:

·     配置OSPFv3链路标记功能

当网络中的动态路由协议使用的是OSPFv3时,需要配置OSPFv3链路标记功能。关于本功能的详细介绍,请参见“三层技术—IP路由配置指导”中的“OSPFv3”。

·     配置IPv6 IS-IS链路标记功能

当网络中的动态路由协议使用的是IPv6 IS-IS时,需要配置IPv6 IS-IS链路标记功能。关于本功能的详细介绍,请参见“三层技术—IP路由配置指导”中的“IS-IS”。

2. 功能简介

当一个局域网通过多台接入设备接入到骨干网,局域网内具有多个前缀的合法用户,边界接入设备上的局域网侧接口地址前缀只有部分与骨干网内合法用户前缀相同,此时为了使得边界设备上都能获取到局域网内所有合法的前缀,需要在边界设备局域网侧的接口上开启SAVA功能,并将每台设备生成的SAVA表项同步给其余边界接入设备。各边界设备将根据本地路由生成的SAVA表项对应的路由条目指定路由Tag值,并将路由条目通过路由协议进行发布。在需要接收远端同步路由条目的设备上通过本命令配置与路由Tag相同的Tag值,设备收到对应Tag值的远端同步路由条目后,会根据这些路由条目生成对应的SAVA表项。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置SAVA根据远端同步的路由条目生成SAVA表项。

ipv6 sava import remote-route-tag tag

缺省情况下,SAVA不会根据远端同步的路由条目生成SAVA表项。

1.5  配置接口加入SAVA接入组

1. 功能简介

当一个局域网在同一台接入设备存在多个接入接口时,则接入设备可能从不同的接入接口收到局域网中用户发送的报文。此时,同一个接口通过本地路由获取合法用户前缀后生成SAVA表项不完整,可能会导致合法用户的报文被误丢弃。为了解决这个问题,可以通过本配置功能将接入设备连接同一个局域网的所有接口加入到同一个SAVA接入组中。配置完成后,同一个SAVA接入组中所有接口会互相同步学习通过本地路由获取合法用户前缀后生成的SAVA表项,从而保证每一个接口上都有本设备上所有通过本地路由获取合法用户前缀后生成的SAVA表项信息。

2. 配置限制和指导

加入同一个SAVA接入组的所有接口需要在公网或同一个VPN中。

一个SAVA接入组最多添加8个接口。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置接口加入SAVA接入组。

ipv6 sava access-group group-name

缺省情况下,接口未加入任何SAVA接入组。

1.6  配置SAVA仿冒报文日志功能

1. 功能简介

SAVA检测仿冒报文日志可以方便管理员定位问题和解决问题。当SAVA检测到仿冒报文时,设备就会生成SAVA检测仿冒报文日志信息。生成的检测仿冒报文日志信息会交给信息中心模块处理,信息中心模块的配置将决定日志信息的发送规则和发送方向。关于信息中心的详细描述请参见“网络管理和监控配置指导”中的“信息中心”。

2. 配置步骤

(1)      进入系统视图。

system-view

(2)      开启SAVA仿冒报文日志功能

ipv6 sava log enable spoofing-packet [ interval interval | number number ]*

缺省情况下,SAVA仿冒报文日志功能处于关闭状态。

1.7  SAVA显示和维护

在完成上述配置后,在任意视图下执行display命令可以显示配置后SAVA的运行情况,通过查看显示信息验证配置的效果。

表1-1 SAVA显示和维护

操作

命令

显示SAVA表项信息

(独立运行模式)

display ipv6 sava [ interface interface-type interface-number ] [ slot slot-number ]

(IRF模式)

display ipv6 sava [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

显示SAVA丢弃报文计数信息

display ipv6 sava packet-drop statistics [ interface interface-type interface-number ]

清除SAVA丢弃报文计数信息

reset ipv6 sava packet-drop statistics [ interface interface-type interface-number ]

 

1.8  SAVA典型配置举例

1.8.1  与局域网直连非对称模式配置举例

1. 组网需求

图1-5所示,局域网中的合法用户地址前缀为2000::/64和2001::/64。在Decice B和Device C的局域网侧接口Vlan-interface10上均配置SAVA功能,满足如下需求:

·     Device C收到IPv6前缀为2001::/64的IPv6路由条目后生成对应的SAVA表项。

·     Device C的局域网侧接口收到局域网中用户发送的报文后基于SAVA表项做源地址的合法性检查,对有对应表项的报文进行接收和转发。

2. 组网图

图1-5 配置与局域网直连模式SAVA配置组网图

 

设备

接口

IPv6地址

设备

接口

IPv6地址

Device A

Vlan-int20

192:168::12:1/120

Device B

Vlan-int10

2001::1/64

 

Vlan-int30

192:168::22:1/120

 

Vlan-int20

192:168::22:2/120

Device C

Vlan-int10

2000::2/64

 

 

 

 

Vlan-int30

192:168::12:2/120

 

 

 

 

3. 配置准备

(1)     配置各接口的IPv6地址。

(2)     配置骨干网域为OSPFv3域,配置参见“三层技术—IP路由配置指导”中的OSPFv3”。

4. 配置步骤

(1)     配置Device B

# 在Device B的局域网侧接口Vlan-interface10上开启SAVA功能。

<DeviceB> system-view

[DeviceB] interface vlan-interface 10

[DeviceB-Vlan-interface10] ipv6 sava enable

# 配置路由策略ttt,匹配局域网侧接口Vlan-interface10的路由条目,设置tag值为100。

[DeviceB] route-policy ttt permit node 10

[DeviceB-route-policy-ttt-10] if-match interface vlan-interface 10

[DeviceB-route-policy-ttt-10] apply tag 100

[DeviceB-route-policy-ttt-10] quit

# 在Device B的OSPFv3进程100下引入直连路由,并应用到路由策略ttt。

[DeviceB] ospfv3 100

[DeviceB-ospfv3-100] import-route direct route-policy ttt

[DeviceB-ospfv3-100] quit

(2)     配置Device C

# 在Device C的局域网侧接口Vlan-interface10上开启SAVA功能。

<DeviceC> system-view

[DeviceC] interface vlan-interface 10

[DeviceC-Vlan-interface10] ipv6 sava enable

# 在Device C的局域网侧接口Vlan-interface10上引入值为100的远端路由条目tag。

[DeviceC-Vlan-interface10] ipv6 sava import remote-tag 100

[DeviceC-Vlan-interface10] quit

5. 验证配置

# 在Device C上查看SAVA前缀表项同步信息是否正确。

[DeviceC] display ipv6 sava

IPv6 SAVA entry count: 2

Destination: 2000::                                        Prefix length: 64

Interface: Vlan-int10                                      Flags: L

 

Destination: 2001::                                        Prefix length: 64

Interface: Vlan-int10                                      Flags: R

以上信息表示Device C学到了2001::前缀的SAVA表项。Device C收到源IPv6地址的前缀为2001::的用户发送的报文后,可以接受并转发。

1.8.2  与局域网非直连模式配置举例(OSPFv3

1. 组网需求

图1-6所示,骨干网设备Device B、Device C、Device D与Device E之间运行OSPFv3协议,满足如下用户需求:

·     在Device B和Device D与Device A相邻的接口Vlan-interface30和Vlan-interface40上开启SAVA域内地址检查功能。

·     在Device D上部署到达局域网的静态路由,指定下一跳为Device A。同时开启OSPFv3的链路标记继承功能,并将到达局域网的路由条目打上路由标记值,实现对局域网静态路由标识。

·     Device B与Device A之间通过OSPFv3协议同步局域网路由。在Device B上开启OSPFv3的链路标记继承功能,并在Device B的Vlan-interface30上配置链路标记值,实现对局域网动态路由标识。

·     在骨干网边界设备Device B与Device D上对局域网用户报文基于SAVA表项做源地址合法性的检查。

2. 组网图

图1-6 与局域网非直连模式(OSPFv3)SAVA配置组网图

 

设备

接口

IPv6地址

设备

接口

IPv6地址

Device A

Vlan-int10

2001::2/64

Device B

Vlan-int30

192:168::12:2/120

 

Vlan-int20

2000::2/64

 

Vlan-int20

192:168::34:3/120

 

Vlan-int30

192:168::12:1/120

 

 

 

 

Vlan-int40

192:168::22:1/120

 

 

 

Device C

Vlan-int20

192:168::34:4/120

Device D

Vlan-int40

192:168::22:2/120

 

Vlan-int10

192:168::46:4/120

 

Vlan-int20

192:168::56:5/120

Device E

Vlan-int20

192:168::56:6/120

 

 

 

 

Vlan-int10

192:168::46:6/120

 

 

 

 

3. 配置准备

配置各接口的IPv6地址。

4. 配置步骤

(1)     配置Device A

# 在Device A的接口Vlan-interface10和Vlan-interface30运行OSPFv3协议。

<DeviceA> system-view

[DeviceA] ospfv3 1

[DeviceA-ospfv3-1] router-id 1.1.1.1

[DeviceA-ospfv3-1] quit

[DeviceA] interface vlan-interface 10

[DeviceA-Vlan-interface10] ospfv3 1 area 0.0.0.0

[DeviceA-Vlan-interface10] quit

[DeviceA] interface vlan-interface 30

[DeviceA-Vlan-interface30] ospfv3 1 area 0.0.0.0

[DeviceA-Vlan-interface130] quit

(2)     配置Device B

# 配置OSPFv3协议。

<DeviceB> system-view

[DeviceB] ospfv3 1

[DeviceB-ospfv3-1] router-id 2.2.2.2

[DeviceB-ospfv3-1] quit

[DeviceB] interface vlan-interface 30

[DeviceB-Vlan-interface30] ospfv3 1 area 0.0.0.0

[DeviceB-Vlan-interface30] quit

[DeviceB] interface vlan-interface 20

[DeviceB- Vlan-interface20] ospfv3 1 area 0.0.0.0

[DeviceB- Vlan-interface20] quit

# 开启OSPFv3链路tag继承功能。

[DeviceB] ospfv3 1

[DeviceB-ospfv3-1] link-tag inherit enable

[DeviceB-ospfv3-1] quit

# 在接口Vlan-interface30上配置链路标记值为100。

[DeviceB] interface vlan-interface 30

[DeviceB-Vlan-interface30] ospfv3 link-tag 100

# 在接口Vlan-interface30上开启SAVA功能。

[DeviceB-Vlan-interface30] ipv6 sava enable

# 在接口Vlan-interface30上配置远端同步路由条目生成SAVA表项,指定远端路由tag值为100。

[DeviceB-Vlan-interface30] ipv6 sava import remote-route-tag 100

[DeviceB-Vlan-interface30] quit

(3)     配置Device D

# 部署到达局域网2000:: /64的静态路由,下一跳为Device A(Device A的link-local地址为FE80::1),并配置tag值为100。

<DeviceD> system-view

[DeviceD] ipv6 route-static 2000:: 64 vlan-interface 40 FE80::1 tag 100

# 配置路由策略sava,匹配出接口Vlan-interface40。

[DeviceD] route-policy sava permit node 10

[DeviceD-route-policy-sava-10] if-match interface vlan-interface 40

[DeviceD-route-policy-sava-10] quit

# 配置OSPFv3协议。

[DeviceD] ospfv3 1

[DeviceD-ospfv3-1] router-id 4.4.4.4

[DeviceD-ospfv3-1] quit

[DeviceD] interface vlan-interface 20

[DeviceD-Vlan-interface20] ospfv3 1 area 0.0.0.0

[DeviceD- Vlan-interface20] quit

# OSPFv3进程1下引入静态路由,并应用路由策略sava。

[DeviceD] ospfv3 1

[DeviceD-ospfv3-1] import-route static route-policy sava

# OSPFv3进程1开启链路tag继承功能。

[DeviceD-ospfv3-1] link-tag inherit enable

[DeviceD-ospfv3-1] quit

# 在接口Vlan-interface40上开启SAVA功能。

[DeviceD] interface vlan-interface 40

[DeviceD-Vlan-interface40] ipv6 sava enable

# 在接口Vlan-interface40上配置远端同步路由条目生成SAVA表项,指定远端路由tag值为100。

[DeviceD-Vlan-interface40] ipv6 sava import remote-route-tag 100

[DeviceD-Vlan-interface40] quit

(4)     配置Device C

# 配置OSPFv3协议。

<DeviceC> system-view

[DeviceC] ospfv3 1

[DeviceC-ospfv3-1] router-id 3.3.3.3

[DeviceC-ospfv3-1] quit

[DeviceC] interface vlan-interface 40

[DeviceC-Vlan-interface40] ospfv3 1 area 0.0.0.0

[DeviceC-Vlan-interface40] quit

[DeviceC] interface vlan-interface 10

[DeviceC-Vlan-interface10] ospfv3 1 area 0.0.0.0

[DeviceC-Vlan-interface10] quit

(5)     配置Device E

# 配置OSPFv3协议。

<DeviceE> system-view

[DeviceE] ospfv3 1

[DeviceE-ospfv3-1] router-id 5.5.5.5

[DeviceE-ospfv3-1] quit

[DeviceE] interface vlan-interface 20

[DeviceE-Vlan-interface20] ospfv3 1 area 0.0.0.0

[DeviceE-Vlan-interface20] quit

[DeviceE] interface vlan-interface 10

[DeviceE-Vlan-interface10] ospfv3 1 area 0.0.0.0

[DeviceE-Vlan-interface10] quit

5. 验证配置

# 在Device D上查看SAVA表项。

[DeviceD] display ipv6 sava

IPv6 SAVA entry count: 4

Destination:192:168::12:0                                  Prefix length: 120

Interface: Vlan-int40                                      Flags: R

 

Destination:192:168::22:0                                  Prefix length: 120

Interface: Vlan-int40                                      Flags: L

 

Destination: 2000::                                        Prefix length: 64

Interface: Vlan-int40                                      Flags: L

 

Destination: 2001::                                        Prefix length: 64

Interface: Vlan-int40                                      Flags: R

以上信息表示,Device D上已经学习到了前缀为2000::和2001::的SAVA表项。Device D收到源IPv6地址的前缀为2000::和2001::的用户发送的报文后,可以接受并转发。

# 在Device B上查看SAVA表项。

[DeviceB] display ipv6 sava

IPv6 SAVA entry count: 3

Destination:192:168::12:0                                  Prefix length: 120

Interface: Vlan-int30                                      Flags: L

 

Destination: 2000::                                        Prefix length: 64

Interface: Vlan-int30                                      Flags: R

 

Destination: 2001::                                        Prefix length: 64

Interface: Vlan-int30                                      Flags: L

Interface: HGE3/0/1                                         Flags: L

以上信息表示,Device B上已经学习到了前缀为2000::和2001::的SAVA表项。Device B收到源IPv6地址的前缀为2000::和2001::的用户发送的报文后,可以接受并转发。

1.8.3  与局域网非直连模式配置举例(IPv6 IS-IS

1. 组网需求

图1-7所示,在DeviceB和Device D与Device A相邻的接口Vlan-interface30和Vlan-interface40上使能SAVA域内地址检查,满足如下用户需求:

·     骨干网路由器Device B、Device C、Device D与Device E之间运行IPv6 IS-IS协议。

·     在Device D上部署到达局域网的静态路由,指定下一跳为Device A。同时开启IPv6 IS-IS的链路标记继承功能,并将到达局域网的路由条目打上路由标记值,实现对局域网静态路由标识。

·     Device B与Device A之间通过IPv6 IS-IS协议同步局域网路由,在Device B上开启IPv6 IS-IS的链路标记继承功能,并在Device B的Vlan-interface30上配置链路标记值,实现对局域网动态路由标识。

·     在骨干网边界设备Device D与Device B上对局域网用户报文基于SAVA表项做源地址合法性的检查。

2. 组网图

图1-7 与局域网非直连模式(IPv6 IS-IS)SAVA配置组网图

 

设备

接口

IPv6地址

设备

接口

IPv6地址

Device A

Vlan-int10

2001::2/64

Device B

Vlan-int30

192:168::12:2/120

 

Vlan-int20

2000::2/64

 

Vlan-int20

192:168::34:3/120

 

Vlan-int30

192:168::12:1/120

 

 

 

 

Vlan-int40

192:168::22:1/120

 

 

 

Device C

Vlan-int20

192:168::34:4/120

Device D

Vlan-int40

192:168::22:2/120

 

Vlan-int10

192:168::46:4/120

 

Vlan-int20

192:168::56:5/120

Device E

Vlan-int20

192:168::56:6/120

 

 

 

 

Vlan-int10

192:168::46:6/120

 

 

 

 

3. 配置准备

配置各接口的IPv6地址。

4. 配置步骤

(1)     配置Device A

# 在接口Vlan-interface10和 Vlan-interface30运行IS-IS协议。

<DeviceA> system-view

[DeviceA] isis 1

[DeviceA-isis-1] is-level level-2

[DeviceA-isis-1] network-entity 10.0000.0000.0001.00

[DeviceA-isis-1] cost-style wide

[DeviceA-isis-1] address-family ipv6

[DeviceA-isis-1-ipv6] quit

[DeviceA-isis-1] quit

[DeviceA] interface vlan-interface 10

[DeviceA-Vlan-interface10] isis ipv6 enable 1

[DeviceA-Vlan-interface10] quit

[DeviceA] interface vlan-interface 30

[DeviceA-Vlan-interface30] isis ipv6 enable 1

[DeviceA-Vlan-interface30] quit

(2)     配置Device B

# 配置IPv6 IS-IS协议。

<DeviceB> system-view

[DeviceB] isis 1

[DeviceB-isis-1] is-level level-2

[DeviceB-isis-1] network-entity 10.0000.0000.0002.00

[DeviceB-isis-1] cost-style wide

[DeviceB-isis-1] address-family ipv6

[DeviceB-isis-1-ipv6] quit

[DeviceB-isis-1] quit

[DeviceB] interface vlan-interface 30

[DeviceB-Vlan-interface30] isis ipv6 enable 1

[DeviceB-Vlan-interface30] quit

[DeviceB] interface vlan-interface 20

[DeviceB-Vlan-interface20] isis ipv6 enable 1

[DeviceB-Vlan-interface20] quit

# 开启IPv6 IS-IS链路tag继承功能。

[DeviceB] isis 1

[DeviceB-isis-1] address-family ipv6

[DeviceB-isis-1-ipv6] link-tag inherit enable

[DeviceB-isis-1-ipv6] quit

[DeviceB-isis-1] quit

# 在接口Vlan-interface30上配置链路标记值为100。

[DeviceB] interface vlan-interface 30

[DeviceB-Vlan-interface30] isis ipv6 link-tag 100

# 在接口Vlan-interface30上开启SAVA功能。

[DeviceB-Vlan-interface30] ipv6 sava enable

# 在接口Vlan-interface30上配置远端同步路由条目生成SAVA表项,指定远端路由tag值为100。

[DeviceB-Vlan-interface30] ipv6 sava import remote-route-tag 100

[DeviceB-Vlan-interface30] quit

(3)     配置Device D

# 在Device D部署到达局域网2000::/64的静态路由,下一跳为Device A(Device A的link-local地址为FE80::1),并配置tag值为100。

<DeviceD> system-view

[DeviceD] ipv6 route-static 2000:: 64 vlan-interface 40 FE80::1 tag 100

# 配置路由策略sava,匹配出接口Vlan-interface40。

[DeviceD] route-policy sava permit node 10

[DeviceD-route-policy-sava-10] if-match interface vlan-interface 40

[DeviceD-route-policy-sava-10] quit

# 配置IPv6 IS-IS协议。

[DeviceD] isis 1

[DeviceD-isis-1] is-level level-2

[DeviceD-isis-1] network-entity 10.0000.0000.0004.00

[DeviceD-isis-1] cost-style wide

[DeviceD-isis-1] address-family ipv6

[DeviceD-isis-1-ipv6] quit

[DeviceD-isis-1] quit

[DeviceD] interface vlan-interface 20

[DeviceD-Vlan-interface20] isis ipv6 enable 1

[DeviceD-Vlan-interface20] quit

# IPv6 IS-IS进程1下引入静态路由,并应用路由策略sava。

[DeviceD] isis 1

[DeviceD-isis-1] address-family ipv6

[DeviceD-isis-1-ipv6] import-route static route-policy sava level-2

# IPv6 IS-IS进程1开启链路tag继承功能。

[DeviceD-isis-1-ipv6] link-tag inherit enable

[DeviceD-isis-1-ipv6] quit

[DeviceD-isis-1] quit

# 在接口Vlan-interface40上开启SAVA功能。

[DeviceD] interface vlan-interface 40

[DeviceD-Vlan-interface40] ipv6 sava enable

# 在接口Vlan-interface40上配置远端同步路由条目生成SAVA表项,指定远端路由tag值为100。

[DeviceD-Vlan-interface40] ipv6 sava import remote-route-tag 100

[DeviceD-Vlan-interface40] quit

(4)     配置Device C

# 配置IPv6 IS-IS协议。

<DeviceC> system-view

[DeviceC] isis 1

[DeviceC-isis-1] is-level level-2

[DeviceC-isis-1] network-entity 10.0000.0000.0003.00

[DeviceC-isis-1] cost-style wide

[DeviceC-isis-1] address-family ipv6

[DeviceC-isis-1-ipv6] quit

[DeviceC-isis-1] quit

[DeviceC] interface vlan-interface 40

[DeviceC-Vlan-interface40] isis ipv6 enable 1

[DeviceC-Vlan-interface40] quit

[DeviceC] interface vlan-interface 10

[DeviceC-Vlan-interface10] isis ipv6 enable 1

[DeviceC-Vlan-interface10] quit

(5)     配置Device E

# 配置IPv6 IS-IS协议。

<DeviceE> system-view

[DeviceE] isis 1

[DeviceE-isis-1] is-level level-2

[DeviceE-isis-1] network-entity 10.0000.0000.0005.00

[DeviceE-isis-1] cost-style wide

[DeviceE-isis-1] address-family ipv6

[DeviceE-isis-1-ipv6] quit

[DeviceE-isis-1] quit

[DeviceE] interface vlan-interface 20

[DeviceE-Vlan-interface20] isis ipv6 enable 1

[DeviceE-Vlan-interface20] quit

[DeviceE] interface vlan-interface 10

[DeviceE-Vlan-interface10] isis ipv6 enable 1

[DeviceE-Vlan-interface10] quit

5. 验证配置

# 在Device D上查看SAVA表项。

[DeviceD] display ipv6 sava

IPv6 SAVA entry count: 3

Destination:192:168::22:0                                  Prefix length: 120

Interface: Vlan-int40                                      Flags: L

 

Destination: 2000::                                        Prefix length: 64

Interface: Vlan-int40                                      Flags: L

 

Destination: 2001::                                        Prefix length: 64

Interface: Vlan-int40                                      Flags: R

以上信息表示,Device D上已经学习到了前缀为2000::和2001::的SAVA表项。Device D收到源IPv6地址的前缀为2000::和2001::的用户发送的报文后,可以接受并转发。

# 在Device B上查看SAVA表项。

[DeviceB] display ipv6 sava

IPv6 SAVA entry count: 3

Destination:192:168::12:0                                  Prefix length: 120

Interface: Vlan-int30                                      Flags: L

 

Destination: 2000::                                        Prefix length: 64

Interface: Vlan-int30                                      Flags: R

 

Destination: 2001::                                        Prefix length: 64

Interface: Vlan-int30                                      Flags: L

以上信息表示,Device B上已经学习到了前缀为2000::和2001::的SAVA表项。Device B收到源IPv6地址的前缀为2000::和2001::的用户发送的报文后,可以接受并转发。

1.8.4  与局域网非直连跨AS场景配置举例

1. 组网需求

图1-8所示,在Device B和Device D连接Device A相邻的接口Vlan-interface30和Vlan-interface40上配置SAVA,满足如下用户需求:

·     从接口Vlan-interface30局域网用户报文基于SAVA表项做源地址合法性的检查。

·     配置远端路由tag值标识,自治域内部Device B和Device C、Device D和Device E通过IGP协议如OSPFv3交互路由信息,自治域之间Device C和Device E通过BGP协议交互路由信息,各设备收到tag值标识的远端同步路由条目后进行SAVA表项的同步。

2. 组网图

图1-8 与局域网非直连跨AS场景SAVA配置组网图

 

设备

接口

IPv6地址

设备

接口

IPv6地址

Device A

Vlan-int10

2001::2/64

Device B

Vlan-int30

192:168::12:2/120

 

Vlan-int20

2000::2/64

 

Vlan-int20

192:168::23:2/120

 

Vlan-int30

192:168::12:1/120

 

 

 

 

Vlan-int40

192:168::22:1/120

 

 

 

Device C

Vlan-int20

192:168::23:3/120

Device D

Vlan-int40

192:168::22:2/120

 

Vlan-int10

192:168::34:3/120

 

Vlan-int20

192:168::45:4/120

Device E

Vlan-int20

192:168::45:5/120

 

 

 

 

Vlan-int10

192:168::34:4/120

 

 

 

 

3. 配置准备

配置各接口的IPv6地址。

4. 配置步骤

(1)     配置Device B

# 在Device B部署到达局域网2001:: 64的静态路由,下一跳为Device A(Device A的link-local地址为FE80::1),并配置tag值为100。

<DeviceB> system-view

[DeviceB] ipv6 route-static 2001:: 64 vlan-interface 30 FE80::1 tag 100

# 配置路由策略sava,匹配出接口Vlan-interface30。

[DeviceB] route-policy sava permit node 10

[DeviceB-route-policy-sava-10] if-match interface vlan-interface 30

[DeviceB-route-policy-sava-10] quit

# 配置OSPFv3协议。

[DeviceB] ospfv3 1

[DeviceB-ospfv3-1] router-id 2.2.2.2

[DeviceB-ospfv3-1] quit

[DeviceB] interface vlan-interface 20

[DeviceB-Vlan-interface20] ospfv3 1 area 0.0.0.0

[DeviceB-Vlan-interface20] quit

# OSPFv3进程1下引入静态路由,并应用路由策略sava。

[DeviceB] ospfv3 1

[DeviceB-ospfv3-1] import-route static route-policy sava

[DeviceB-ospfv3-1] quit

# 在接口Vlan-interface30上开启SAVA功能。

[DeviceB] interface vlan-interface 30

[DeviceB-Vlan-interface30] ipv6 sava enable

# 配置根据远端同步路由条目生成SAVA表项,指定远端路由tag值为100。

[DeviceB-Vlan-interface30] ipv6 sava import remote-route-tag 100

[DeviceB-Vlan-interface30] quit

(2)     配置DeviceD

# 在DeviceD部署到达局域网2000::/64的静态路由,下一跳为Device A,Device A的link-local地址为FE80::1,并配置tag值为100。

<DeviceD> system-view

[DeviceD] ipv6 route-static 2000:: 64 vlan-interface 40 FE80::1 tag 100

# 配置路由策略sava,匹配出接口Vlan-interface30。

[DeviceD] route-policy sava permit node 10

[DeviceD-route-policy-sava-10] if-match interface vlan-interface 40

[DeviceD-route-policy-sava-10] quit

# 配置OSPFv3协议。

[DeviceD] ospfv3 1

[DeviceD-ospfv3-1] router-id 4.4.4.4

[DeviceD-ospfv3-1] quit

[DeviceD] interface vlan-interface 20

[DeviceD-Vlan-interface20] ospfv3 1 area 0.0.0.0

[DeviceD-Vlan-interface20] quit

# OSPFv3进程1下引入静态路由,并应用路由策略sava。

[DeviceD] ospfv3 1

[DeviceD-ospfv3-1] import-route static route-policy sava

[DeviceD-ospfv3-1] quit

# 在接口Vlan-interface40上开启SAVA功能。

[DeviceD] interface vlan-interface 40

[DeviceD-Vlan-interface40] ipv6 sava enable

# 配置根据远端同步路由条目生成SAVA表项,指定远端路由tag值为100。

[DeviceD-Vlan-interface40] ipv6 sava import remote-route-tag 100

[DeviceD-Vlan-interface40] quit

(3)     配置DeviceC

# 配置BGP 发布路由时使用的路由策略,将tag映射为团体属性。

[DeviceC] route-policy sava-exp permit node 0

[DeviceC-route-policy-sava-exp-0] if-match tag 100

[DeviceC-route-policy-sava-exp-0] apply community 10:10

[DeviceC-route-policy-sava-exp-0] quit

# 配置BGP,下一跳DeviceF的接口地址为192:168::34:4。

[DeviceC] bgp 100

[DeviceC-bgp-default] router-id 3.3.3.3

[DeviceC-bgp-default] peer 192:168::34:4 as 200

[DeviceC-bgp-default] address-family ipv6

[DeviceC-bgp-default-ipv6] peer 192:168::34:4 enable

[DeviceC-bgp-default-ipv6] peer 192:168::34:4 advertise-community

# 配置BGP引入OSPFv3路由,并指定发布的路由策略。

[DeviceC-bgp-default-ipv6] import-route ospfv3 1

[DeviceC-bgp-default-ipv6] peer 192:168::34:4 route-policy sava-exp export

[DeviceC-bgp-default-ipv6] quit

[DeviceC-bgp-default] quit

# 配置BGP接收路由时使用的路由策略,将团体属性映射为tag。

[DeviceC] ip community-list 1 permit 10:10

[DeviceC] route-policy sava-imp permit node 0

[DeviceC-route-policy-sava-imp-0] if-match community 1

[DeviceC-route-policy-sava-imp-0] apply tag 100

[DeviceC-route-policy-sava-imp-0] quit

# 配置BGP指定接收的路由策略。

[DeviceC] bgp 100

[DeviceC-bgp-default] address-family ipv6

[DeviceC-bgp-default-ipv6] peer 192:168::34:4 route-policy sava-imp import

[DeviceC-bgp-default-ipv6] quit

[DeviceC-bgp-default] quit

# 配置OSPFv3协议。

[DeviceC] ospfv3 1

[DeviceC-ospfv3-1] router-id 3.3.3.3

[DeviceC-ospfv3-1] quit

[DeviceC] interface vlan-interface 20

[DeviceC-Vlan-interface20] ospfv3 1 area 0.0.0.0

[DeviceC-Vlan-interface20] quit

# 配置OSPFv3,引入BGP路由。

[DeviceC] ospfv3 1

[DeviceC-ospfv3-1] import-route bgp4+

[DeviceC-ospfv3-1] quit

(4)     配置DeviceE

# 配置BGP 发布路由时使用的路由策略,将tag映射为团体属性。

[DeviceE] route-policy sava-exp permit node 0

[DeviceE-route-policy-sava-exp-0] if-match tag 100

[DeviceE-route-policy-sava-exp-0] apply community 10:10

[DeviceE-route-policy-sava-exp-0] quit

# 配置BGP,下一跳RouerC的接口地址为192:168::34:3

[DeviceE] bgp 200

[DeviceE-bgp-default] router-id 5.5.5.5

[DeviceE-bgp-default] peer 192:168::34:3 as 100

[DeviceE-bgp-default] address-family ipv6

[DeviceE-bgp-default-ipv6] peer 192:168::34:3 enable

[DeviceE-bgp-default-ipv6] peer 192:168::34:3 advertise-community

# 配置BGP引入OSPFv3路由,并指定发布的路由策略。

[DeviceE-bgp-default-ipv6] import-route ospfv3

[DeviceE-bgp-default-ipv6] peer 192:168::34:3 route-policy sava-exp export

[DeviceE-bgp-default-ipv6] quit

[DeviceE-bgp-default] quit

# 配置BGP接收路由时使用的路由策略,将团体属性映射为tag。

[DeviceE] ip community-list 1 permit 10:10

[DeviceE] route-policy sava-imp permit node 0

[DeviceE-route-policy-sava-imp-0] if-match community 1

[DeviceE-route-policy-sava-imp-0] apply tag 100

[DeviceE-route-policy-sava-imp-0] quit

# 配置BGP指定接收的路由策略。

[DeviceE] bgp 200

[DeviceE-bgp-default] address-family ipv6

[DeviceE-bgp-default-ipv6] peer 192:168::34:3 route-policy sava-imp import

[DeviceE-bgp-default-ipv6] quit

[DeviceE-bgp-default] quit

# 配置OSPFv3协议。

[DeviceE] ospfv3 1

[DeviceE-ospfv3-1] router-id 5.5.5.5

[DeviceE-ospfv3-1] quit

[DeviceE] interface vlan-interface 20

[DeviceE-Vlan-interface20] ospfv3 1 area 0.0.0.0

[DeviceE- Vlan-interface20] quit

# 配置OSPFv3,引入BGP路由。

[DeviceE] ospfv3 1

[DeviceE-ospfv3-1] import-route bgp4+

[DeviceE-ospfv3-1] quit

5. 验证配置

# 在Device D上查看SAVA表项。

[DeviceD] display ipv6 sava

IPv6 SAVA entry count: 3

Destination:192:168::22:0                                  Prefix length: 120

Interface: Vlan-int40                                      Flags: L

 

Destination: 2000::                                        Prefix length: 64

Interface: Vlan-int40                                      Flags: L

 

Destination: 2001::                                        Prefix length: 64

Interface: Vlan-int40                                      Flags: R

以上信息表示,Device D上已经学习到了前缀为2000::和2001::的SAVA表项。Device D收到源IPv6地址的前缀为2000::和2001::的用户发送的报文后,可以接受并转发。

# 在Device B上查看SAVA表项。

[DeviceB] display ipv6 sava

IPv6 SAVA entry count: 3

Destination:192:168::12:0                                  Prefix length: 120

Interface: Vlan-int30                                      Flags: L

 

Destination: 2000::                                        Prefix length: 64

Interface: Vlan-int30                                      Flags: R

 

Destination: 2001::                                        Prefix length: 64

Interface: Vlan-int30                                       Flags: L

以上信息表示,Device B上已经学习到了前缀为2000::和2001::的SAVA表项。Device B收到源IPv6地址的前缀为2000::和2001::的用户发送的报文后,可以接受并转发。

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们