• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

H3C S6805 & S6825 & S6850 & S9850 & S9820系列交换机 典型配置举例-Release 66xx-6W100

目录

70-DRNI典型配置举例

本章节下载 70-DRNI典型配置举例  (473.80 KB)

70-DRNI典型配置举例

H3C S6805&S6825&S6850&S9850&S9820 DRNI典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2020-2023 新华三技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。

除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。

本文档中的信息可能变动,恕不另行通知。



1  简介

本文档介绍DRNI特性的配置举例。

DRNI是一种跨设备链路聚合技术,将两台物理设备在聚合层面虚拟成一台设备来实现跨设备链路聚合,从而提供设备级冗余保护和流量负载分担。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解DRNI特性。

3  使用限制

1. 系统级使用限制

·     DR系统只支持加入两台DR设备。

·     保证DR设备配置一致,如果Type 1类型配置不一致,则将从设备上DR接口置为down状态。

Type 1类型配置一致性检查分为全局配置和DR接口配置。

表1 全局Type 1类型配置

配置

一致性检查内容

IPP口链路类型

Access、Hybrid和Trunk

IPP口的PVID

IPP口的PVID

生成树功能

全局生成树功能是否开启和VLAN内生成树功能是否开启

生成树模式

STP、RSTP、PVST和MSTP

MST域相关配置

MST域的域名、MSTP的修订级别和MSTI与VLAN的映射关系

 

表2 DR接口Type 1类型配置

配置

一致性检查内容

聚合组的工作模式

静态聚合组和动态聚合组

接口生成树功能

接口上的生成树功能是否开启

接口的链路类型

Access、Hybrid和Trunk

接口的PVID

DR接口的PVID

 

·     单挂接入DR系统时,建议设备接入Primary设备,避免DR系统分裂时由于DRNI MAD机制导致接入设备无法通过Secondary设备转发流量。

·     当IPL故障恢复后,为了防止丢包,Secondary设备尽可能在延迟恢复时间内完成表项(MAC地址表、ARP表等)同步,其后该设备上处于DRNI MAD DOWN状态的接口将恢复为up状态。配置drni restore-delay命令时,需要保证延迟时间>(设备启动时间+表项同步时间)。

·     DR系统配置完成后,不建议修改DRNI的系统MAC地址、系统编号和系统优先级,否则可能导致DRNI系统分裂。

·     DR接口和IPP口所在VLAN对应的VLAN接口需要配置为DRNI保留接口,以避免DR设备间同步表项时,因VLAN接口处于DRNI MAD DOWN状态,ARP表项无法同步,影响流量转发。

·     请不要在DRNI进程重启时或ISSU升级前配置DRCP超时时间为短超时,否则在DRNI进程重启时或ISSU升级期间会出现网络流量中断,导致流量转发不通。

2. DR接口使用限制

·     DRNI只支持二层聚合接口配置为DR接口。

为了保证业务正常,DR设备上的聚合接口需要加入同一DR组。

·     配置为DR接口的二层聚合接口的编号和DR组的编号建议配置一致。

·     配置为DR接口的二层聚合接口不建议配置半自动聚合功能和全自动聚合功能。

·     建议DR接口关闭生成树功能。

3. IPP口使用限制

·     配置为IPP口的二层聚合接口不建议配置半自动聚合功能和全自动聚合功能。

·     IPP口必须允许DR接口的所有VLAN通过,建议配置IPP口的链路类型为Trunk,并允许所有VLAN通过IPP口。

·     基于IPP口允许通过的VLAN创建VLAN接口并配置IP地址,以便在DR设备之间通过IPL实现三层互通。

·     IPL链路和Keepalive链路建议部署在不同的单板上,避免接口板故障后,出现双主现象,影响业务流量转发。

4. Keepalive使用限制

·     Keepalive链路接口建议用三层物理接口,并需要手工配置为DRNI保留接口,否则IPL链路故障后无法做出正确的处理。建议在管理以太网接口上创建Keepalive链路。

·     IPL链路和Keepalive链路建议部署在不同的单板上,避免接口板故障后,出现双主现象,影响业务流量转发。

4  基于接入层的DRNI配置举例

4.1  组网需求

图1所示,Device A和Device B为接入设备,Device C和Device D为网关设备。现要求使用DRNI技术实现接入设备的冗余保护和流量负载分担功能。具体要求如下:

·     在Device A和Device B上部署DRNI,实现接入设备的冗余备份和流量负载分担。

·     分别在Device A和Device B上配置保留接口,用于DRNI主备设备间Keepalive报文的传输,检测Device A和Device B是否故障。

·     在Device C和Device D上部署VRRP,当网关设备工作正常时,区域A用户通过网关设备Device C进行数据转发;区域B用户通过网关设备Device D进行数据转发,实现流量的负载分担。

·     当Device C或者Device C的上行接口发生故障后,Device D能够迅速承担区域A内主机流量的转发任务;Device C故障恢复后,继续承担VRRP备份组1的网关功能。

·     当Device D或者Device D的上行接口发生故障后,Device C能够迅速承担区域B内主机流量的转发任务;Device D故障恢复后,继续承担VRRP备份组2的网关功能。

·     在Device C、Device D和Device E上搭建OSPF网络,Device C和Device D通过OSPF发布区域A和区域B内的主机所在网段的路由,以实现区域A和区域B内的主机与外部网络的三层互通。

图1 基于接入层的DRNI配置组网图

 

设备

接口

IP地址

设备

接口

IP地址

Device A

HGE1/0/5

1.1.1.1/24

Device B

HGE1/0/5

1.1.1.2/24

Device C

Vlan-int100

100.1.1.1/24

Device D

Vlan-int100

200.1.1.1/24

 

Vlan-int10

10.1.1.1/24

 

Vlan-int10

10.1.1.2/24

 

Vlan-int20

20.1.1.1/24

 

Vlan-int20

20.1.1.2/24

 

Virtual IP 1

10.1.1.100/24

 

Virtual IP 1

10.1.1.100/24

 

Virtual IP 2

20.1.1.100/24

 

Virtual IP 2

20.1.1.100/24

Device E

Vlan-int100

100.1.1.2/24

 

 

 

 

Vlan-int200

200.1.1.2/24

 

 

 

 

Vlan-int30

30.1.1.1/24

 

 

 

 

4.2  配置思路

·     分别在Device A和Device B上配置保留接口的IP地址,且保证能够三层互通,用于DRNI主备设备间Keepalive报文的传输。

·     为了让Device C和Device D分别成为VRRP备份组1和VRRP备份组2中的Master,需要在VRRP备份组1中为Device C配置较高的优先级,在VRRP备份组2中为Device D配置较高的优先级。

4.3  适用产品及版本

表1 适用产品及版本

产品

软件版本

S6805系列

Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S6825系列

Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S6850系列

S9850系列

Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S9820-64H

Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S9820-8C

Release 6616版本、Release 6616P01版本、Release 6635及以上版本

 

4.4  配置注意事项

配置DRNI时,需要注意:

·     要求所有DR设备配置相同的系统MAC地址和系统优先级,配置不同的系统编号。

·     一台DR设备上只能配置一个IPP口。

·     建议用户将Keepalive接口配置为保留接口,避免在DRNI建立过程中被置为MAD DOWN状态,造成错误检测。

配置VRRP时,需要注意:

·     建议使用VRRP标准协议模式。

·     VRRP备份组的虚拟IP地址不能为全零地址(0.0.0.0)、广播地址(255.255.255.255)、环回地址、非A/B/C类地址和其它非法IP地址(如0.0.0.1)。

·     建议将备份组的虚拟IP地址和备份组中设备下行接口的IP地址配置为同一网段,否则可能导致局域网内的主机无法访问外部网络。

4.5  配置步骤

4.5.1  配置Device A

# 配置DR系统参数。

<DeviceA> system-view

[DeviceA] drni system-mac 1-1-1

Changing the system MAC might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

[DeviceA] drni system-number 1

Changing the system number might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

[DeviceA] drni system-priority 123

Changing the system priority might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

# 配置Keepalive报文的目的IP地址和源IP地址。

[DeviceA] drni keepalive ip destination 1.1.1.2 source 1.1.1.1

# 配置端口HundredGigE1/0/5工作在三层模式,并配置IP地址为Keepalive报文的源IP地址。

[DeviceA] interface hundredgige 1/0/5

[DeviceA-HundredGigE1/0/5] port link-mode route

[DeviceA-HundredGigE1/0/5] ip address 1.1.1.1 24

[DeviceA-HundredGigE1/0/5] quit

# 配置Keepalive链路接口为保留接口。

[DeviceA] drni mad exclude interface hundredgige 1/0/5

# 创建VLAN 10和VLAN 20。

[DeviceA] vlan 10

[DeviceA-vlan10] quit

[DeviceA] vlan 20

[DeviceA-vlan20] quit

# 创建动态二层聚合接口1。

[DeviceA] interface bridge-aggregation 1

[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation1] quit

# 分别将端口HundredGigE1/0/6和HundredGigE1/0/7加入到聚合组1中。

[DeviceA] interface hundredgige 1/0/6

[DeviceA-HundredGigE1/0/6] port link-aggregation group 1

[DeviceA-HundredGigE1/0/6] quit

[DeviceA] interface hundredgige 1/0/7

[DeviceA-HundredGigE1/0/7] port link-aggregation group 1

[DeviceA-HundredGigE1/0/7] quit

# 配置二层聚合接口1为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceA] interface bridge-aggregation 1

[DeviceA-Bridge-Aggregation1] port link-type trunk

Configuring HundredGigE1/0/6 done.

Configuring HundredGigE1/0/7 done.

[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10 20

Configuring HundredGigE1/0/6 done.

Configuring HundredGigE1/0/7 done.

[DeviceA-Bridge-Aggregation1] quit

# 创建动态二层聚合接口3,并配置该接口为IPP口。

[DeviceA] interface bridge-aggregation 3

[DeviceA-Bridge-Aggregation3] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation3] port drni intra-portal-port 1

[DeviceA-Bridge-Aggregation3] quit

# 分别将端口HundredGigE1/0/3HundredGigE1/0/4加入到聚合组3中。

[DeviceA] interface hundredgige 1/0/3

[DeviceA-HundredGigE1/0/3] port link-aggregation group 3

[DeviceA-HundredGigE1/0/3] quit

[DeviceA] interface hundredgige 1/0/4

[DeviceA-HundredGigE1/0/4] port link-aggregation group 3

[DeviceA-HundredGigE1/0/4] quit

# 配置二层聚合接口3为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceA] interface bridge-aggregation 3

[DeviceA-Bridge-Aggregation3] port link-type trunk

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceA-Bridge-Aggregation3] port trunk permit vlan 10 20

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceA-Bridge-Aggregation3] quit

# 创建动态二层聚合接口4,并配置该接口为DR口4。

[DeviceA] interface bridge-aggregation 4

[DeviceA-Bridge-Aggregation4] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation4] port drni group 4

[DeviceA-Bridge-Aggregation4] quit

# 分别将端口HundredGigE1/0/1HundredGigE1/0/2加入到聚合组4中。

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] port link-aggregation group 4

[DeviceA-HundredGigE1/0/1] quit

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] port link-aggregation group 4

[DeviceA-HundredGigE1/0/2] quit

# 配置二层聚合接口4为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceA] interface bridge-aggregation 4

[DeviceA-Bridge-Aggregation4] port link-type trunk

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceA-Bridge-Aggregation4] port trunk permit vlan 10 20

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceA-Bridge-Aggregation4] quit

4.5.2  配置Device B

# 配置DR系统参数。

<DeviceB> system-view

[DeviceB] drni system-mac 1-1-1

Changing the system MAC might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

[DeviceB] drni system-number 2

Changing the system number might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

[DeviceB] drni system-priority 123

Changing the system priority might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

# 配置Keepalive报文的目的IP地址和源IP地址。

[DeviceB] drni keepalive ip destination 1.1.1.1 source 1.1.1.2

# 配置端口HundredGigE1/0/5工作在三层模式,并配置IP地址为Keepalive报文的源IP地址。

[DeviceB] interface hundredgige 1/0/5

[DeviceB-HundredGigE1/0/5] port link-mode route

[DeviceB-HundredGigE1/0/5] ip address 1.1.1.2 24

[DeviceB-HundredGigE1/0/5] quit

# 配置Keepalive链路接口为保留接口。

[DeviceB] drni mad exclude interface hundredgige 1/0/5

# 创建VLAN 10和VLAN 20。

[DeviceB] vlan 10

[DeviceB-vlan10] quit

[DeviceB] vlan 20

[DeviceB-vlan20] quit

# 创建动态二层聚合接口2。

[DeviceB] interface bridge-aggregation 2

[DeviceB-Bridge-Aggregation2] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation2] quit

# 分别将端口HundredGigE1/0/6和HundredGigE1/0/7加入到聚合组2中。

[DeviceB] interface hundredgige 1/0/6

[DeviceB-HundredGigE1/0/6] port link-aggregation group 2

[DeviceB-HundredGigE1/0/6] quit

[DeviceB] interface hundredgige 1/0/7

[DeviceB-HundredGigE1/0/7] port link-aggregation group 2

[DeviceB-HundredGigE1/0/7] quit

# 配置二层聚合接口2为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceB] interface bridge-aggregation 2

[DeviceB-Bridge-Aggregation2] port link-type trunk

Configuring HundredGigE1/0/6 done.

Configuring HundredGigE1/0/7 done.

[DeviceB-Bridge-Aggregation2] port trunk permit vlan 10 20

Configuring HundredGigE1/0/6 done.

Configuring HundredGigE1/0/7 done.

[DeviceB-Bridge-Aggregation2] quit

# 创建动态二层聚合接口3,并配置该接口为IPP口。

[DeviceB] interface bridge-aggregation 3

[DeviceB-Bridge-Aggregation3] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation3] port drni intra-portal-port 1

[DeviceB-Bridge-Aggregation3] quit

# 分别将端口HundredGigE1/0/3HundredGigE1/0/4加入到聚合组3中。

[DeviceB] interface hundredgige 1/0/3

[DeviceB-HundredGigE1/0/3] port link-aggregation group 3

[DeviceB-HundredGigE1/0/3] quit

[DeviceB] interface hundredgige 1/0/4

[DeviceB-HundredGigE1/0/4] port link-aggregation group 3

[DeviceB-HundredGigE1/0/4] quit

# 配置二层聚合接口3为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceB] interface bridge-aggregation 3

[DeviceB-Bridge-Aggregation3] port link-type trunk

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceB-Bridge-Aggregation3] port trunk permit vlan 10 20

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceB-Bridge-Aggregation3] quit

# 创建动态二层聚合接口4,并配置该接口为DR口4。

[DeviceB] interface bridge-aggregation 4

[DeviceB-Bridge-Aggregation4] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation4] port drni group 4

[DeviceB-Bridge-Aggregation4] quit

# 分别将端口HundredGigE1/0/1HundredGigE1/0/2加入到聚合组4中。

[DeviceB] interface hundredgige 1/0/1

[DeviceB-HundredGigE1/0/1] port link-aggregation group 4

[DeviceB-HundredGigE1/0/1] quit

[DeviceB] interface hundredgige 1/0/2

[DeviceB-HundredGigE1/0/2] port link-aggregation group 4

[DeviceB-HundredGigE1/0/2] quit

# 配置二层聚合接口4为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceB] interface bridge-aggregation 4

[DeviceB-Bridge-Aggregation4] port link-type trunk

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceB-Bridge-Aggregation4] port trunk permit vlan 10 20

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceB-Bridge-Aggregation4] quit

4.5.3  配置Device C

# 创建VLAN 10、20和100。

<DeviceC> system-view

[DeviceC] vlan 10

[DeviceC-vlan10] quit

[DeviceC] vlan 20

[DeviceC-vlan20] quit

[DeviceC] vlan 100

# 将HundredGigE1/0/3加入VLAN 100。

[DeviceC] vlan 100

[DeviceC-vlan100] port hundredgige 1/0/3

[DeviceC-vlan100] quit

# 创建二层聚合接口1,并配置该接口为动态聚合模式。

[DeviceC] interface bridge-aggregation 1

[DeviceC-Bridge-Aggregation1] link-aggregation mode dynamic

[DeviceC-Bridge-Aggregation1] quit

# 将端口HundredGigE1/0/1HundredGigE1/0/2加入到聚合组1中。

[DeviceC] interface range hundredgige 1/0/1 to hundredgige 1/0/2

[DeviceC-if-range] port link-aggregation group 1

[DeviceC-if-range] quit

# 配置二层聚合接口1为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceC] interface bridge-aggregation 1

[DeviceC-Bridge-Aggregation1] port link-type trunk

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceC-Bridge-Aggregation1] port trunk permit vlan 10 20

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceC-Bridge-Aggregation1] quit

# 创建上行接口Vlan-interface100,并配置其IP地址。

[DeviceC] interface vlan-interface 100

[DeviceC-Vlan-interface100] ip address 100.1.1.1 24

[DeviceC-Vlan-interface100] quit

# 创建接口Vlan-interface10和Vlan-interface20,并配置其IP地址。

[DeviceC] interface vlan-interface 10

[DeviceC-vlan-interface10] ip address 10.1.1.1 24

[DeviceC-vlan-interface10] quit

[DeviceC] interface vlan-interface 20

[DeviceC-vlan-interface20] ip address 20.1.1.1 24

[DeviceC-vlan-interface20] quit

# 为接口Vlan-interface10创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.100。

[DeviceC] interface vlan-interface 10

[DeviceC-Vlan-interface10] vrrp vrid 1 virtual-ip 10.1.1.100

# 设置Device C在备份组1中的优先级为200,以保证Device C成为Master,从而和Device C在DRNI中角色一致。

[DeviceC-Vlan-interface10] vrrp vrid 1 priority 200

[DeviceC-Vlan-interface10] quit

# 为接口Vlan-interface20创建备份组2,并配置备份组2的虚拟IP地址为20.1.1.100。

[DeviceC] interface vlan-interface 20

[DeviceC-Vlan-interface20] vrrp vrid 2 virtual-ip 20.1.1.100

[DeviceC-vlan-interface20] quit

# 设置Device C在备份组1中工作在抢占方式,配置抢占延迟时间为500厘秒。

[DeviceC] interface vlan-interface 10

[DeviceC-Vlan-interface10] vrrp vrid 1 preempt-mode delay 500

[DeviceC-Vlan-interface10] quit

# 创建和上行端口HundredGigE1/0/3关联的Track项1。

[DeviceC] track 1 interface hundredgige 1/0/3

# 配置监视Track项1,Track项的状态为Negative时,Device C在VRRP备份组1中的优先级降低的数值为150。

[DeviceC] interface vlan-interface 10

[DeviceC-Vlan-interface10] vrrp vrid 1 track 1 priority reduced 150

[DeviceC-Vlan-interface10] quit

# 配置OSPF。

[DeviceC] ospf

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

4.5.4  配置Device D

# 创建VLAN 10、20和200。

<DeviceD> system-view

[DeviceD] vlan 10

[DeviceD-vlan10] quit

[DeviceD] vlan 20

[DeviceD-vlan20] quit

[DeviceD] vlan 200

# 将HundredGigE1/0/3加入VLAN 200。

[DeviceD] vlan 200

[DeviceD-vlan200] port hundredgige 1/0/3

[DeviceD-vlan200] quit

# 创建二层聚合接口2,并配置该接口为动态聚合模式。

[DeviceD] interface bridge-aggregation 2

[DeviceD-Bridge-Aggregation2] link-aggregation mode dynamic

[DeviceD-Bridge-Aggregation2] quit

# 将端口HundredGigE1/0/1HundredGigE1/0/2加入到聚合组2中。

[DeviceD] interface range hundredgige 1/0/1 to hundredgige 1/0/2

[DeviceD-if-range] port link-aggregation group 2

[DeviceD-if-range] quit

# 配置二层聚合接口2为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceD] interface bridge-aggregation 2

[DeviceD-Bridge-Aggregation2] port link-type trunk

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceD-Bridge-Aggregation2] port trunk permit vlan 10 20

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceD-Bridge-Aggregation2] quit

# 创建上行接口Vlan-interface200,并配置其IP地址。

[DeviceD] interface vlan-interface 200

[DeviceD-Vlan-interface200] ip address 200.1.1.1 24

[DeviceD-Vlan-interface200] quit

# 创建接口Vlan-interface10和Vlan-interface20,并配置其IP地址。

[DeviceD] interface vlan-interface 10

[DeviceD-vlan-interface10] ip address 10.1.1.2 24

[DeviceD-vlan-interface10] quit

[DeviceD] interface vlan-interface 20

[DeviceD-vlan-interface20] ip address 20.1.1.2 24

[DeviceD-vlan-interface20] quit

# 为接口Vlan-interface10创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.100。

[DeviceD] interface vlan-interface 10

[DeviceD-Vlan-interface10] vrrp vrid 1 virtual-ip 10.1.1.100

[DeviceD-vlan-interface10] quit

# 为接口Vlan-interface20创建备份组2,并配置备份组2的虚拟IP地址为20.1.1.100。

[DeviceD] interface vlan-interface 20

[DeviceD-Vlan-interface20] vrrp vrid 2 virtual-ip 20.1.1.100

# 设置Device D在备份组2中的优先级为200,以保证Device D成为Master,从而和Device D在DRNI中角色一致。

[DeviceD-Vlan-interface20] vrrp vrid 2 priority 200

# 设置Device D在备份组2中工作在抢占方式,配置抢占延迟时间为500厘秒。

[DeviceD-Vlan-interface20] vrrp vrid 2 preempt-mode delay 500

[DeviceD-Vlan-interface20] quit

# 创建和上行端口HundredGigE1/0/3关联的Track项2。

[DeviceD] track 2 interface hundredgige 1/0/3

# 配置监视Track项2,Track项的状态为Negative时,Device D在VRRP备份组2中的优先级降低的数值为150。

[DeviceD] interface vlan-interface 20

[DeviceD-Vlan-interface20] vrrp vrid 2 track 2 priority reduced 150

[DeviceD-Vlan-interface20] quit

# 配置OSPF。

[DeviceD] ospf

[DeviceD-ospf-1] area 0

[DeviceD-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceD-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceD-ospf-1-area-0.0.0.0] network 200.1.1.0 0.0.0.255

[DeviceD-ospf-1-area-0.0.0.0] quit

[DeviceD-ospf-1] quit

4.5.5  配置Device E

# 创建VLAN 100,并将接口HundredGigE1/0/1加入该VLAN。

<DeviceE> system-view

[DeviceE] vlan 100

[DeviceE-vlan100] port hundredgige 1/0/1

[DeviceE-vlan100] quit

# 创建接口Vlan-interface100,并配置其IP地址。

[DeviceE] interface vlan-interface 100

[DeviceE-vlan-interface100] ip address 100.1.1.2 24

[DeviceE-vlan-interface100] quit

# 创建VLAN 200,并将接口HundredGigE1/0/2加入该VLAN。

[DeviceE] vlan 200

[DeviceE-vlan200] port hundredgige 1/0/2

[DeviceE-vlan200] quit

# 创建接口Vlan-interface200,并配置其IP地址。

[DeviceE] interface vlan-interface 200

[DeviceE-vlan-interface200] ip address 200.1.1.2 24

[DeviceE-vlan-interface200] quit

# 创建VLAN 30,并将接口HundredGigE1/0/3加入该VLAN。

[DeviceE] vlan 30

[DeviceE-vlan30] port hundredgige 1/0/3

[DeviceE-vlan30] quit

# 创建接口Vlan-interface30,并配置其IP地址。

[DeviceE] interface vlan-interface 30

[DeviceE-vlan-interface30] ip address 30.1.1.1 24

[DeviceE-vlan-interface30] quit

# 配置OSPF。

[DeviceD] ospf

[DeviceD-ospf-1] area 0

[DeviceD-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255

[DeviceD-ospf-1-area-0.0.0.0] network 200.1.1.0 0.0.0.255

[DeviceD-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[DeviceD-ospf-1-area-0.0.0.0] quit

[DeviceD-ospf-1] quit

4.5.6  配置Device F

# 创建VLAN 10和VLAN 20。

[DeviceF] vlan 10

[DeviceF-vlan10] quit

[DeviceF] vlan 20

[DeviceF-vlan20] quit

# 创建动态二层聚合接口4。

[DeviceF] interface bridge-aggregation 4

[DeviceF-Bridge-Aggregation4] link-aggregation mode dynamic

[DeviceF-Bridge-Aggregation4] quit

# 将端口HundredGigE1/0/1~HundredGigE1/0/4加入到聚合组4中。

[DeviceF] interface range hundredgige 1/0/1 to hundredgige 1/0/4

[DeviceF-if-range] port link-aggregation group 4

[DeviceF-if-range] quit

# 配置二层聚合接口4为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceF] interface bridge-aggregation 4

[DeviceF-Bridge-Aggregation4] port link-type trunk

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceF-Bridge-Aggregation4] port trunk permit vlan 10 20

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceF-Bridge-Aggregation4] quit

4.6  验证配置

# 在Device A上查看DRNI的简要信息和详细信息。可以看到Device A和Device B成功组成分布式聚合系统。

[DeviceA] display drni summary

Flags: A -- Aggregate interface down, B -- No peer DR interface configured

       C -- Configuration consistency check failed

 

IPP: BAGG3

IPP state (cause): UP

Keepalive link state (cause): UP

 

                     DR interface information

DR interface  DR group  Local state (cause)  Peer state  Remaining down time(s)

BAGG4         4         UP                   UP          -

[DeviceA] display drni verbose

Flags: A -- Home_Gateway, B -- Neighbor_Gateway, C -- Other_Gateway,

       D -- IPP_Activity, E -- DRCP_Timeout, F -- Gateway_Sync,

       G -- Port_Sync, H -- Expired

IPP/IPP ID: BAGG3/1

State: UP

Cause: -

Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG

Local Selected ports (index): HGE1/0/3 (2), HGE1/0/4 (5)

Peer Selected ports indexes: 2, 5

 

DR interface/DR group ID: BAGG4/4

Local DR interface state: UP

Peer DR interface state: UP

DR group state: UP

Local DR interface down cause: -

Remaining DRNI DOWN time: -

Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG

Local Selected ports (index): HGE1/0/1 (16385), HGE1/0/2 (16388)

Peer Selected ports indexes: 32769, 32772

# 在Device F上分别查看聚合组的详细信息。可以看到Device F的端口HundredGigE1/0/1~HundredGigE1/0/4均处于选中状态,此时Device F将Device A和Device B认为是一台设备,从而实现了跨设备的聚合。

[DeviceF] display link-aggregation verbose

Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing

Port Status: S -- Selected, U -- Unselected, I -- Individual

Port: A -- Auto port, M -- Management port, R -- Reference port

Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,

        D -- Synchronization, E -- Collecting, F -- Distributing,

        G -- Defaulted, H -- Expired

 

Aggregate Interface: Bridge-Aggregation4

Creation Mode: Manual

Aggregation Mode: Dynamic

Loadsharing Type: Shar

Management VLANs: None

System ID: 0x8000, 1eba-3c46-0300

Local:

  Port                Status   Priority Index    Oper-Key               Flag

  HGE1/0/1            S        32768    1        1                      {ACDEF}

  HGE1/0/2            S        32768    2        1                      {ACDEF}

  HGE1/0/3            S        32768    3        1                      {ACDEF}

  HGE1/0/4            S        32768    4        1                      {ACDEF}

Remote:

  Actor               Priority Index    Oper-Key SystemID               Flag

  HGE1/0/1(R)         32768    16385    40004    0x7b  , 0001-0001-0001 {ACDEF}

  HGE1/0/2            32768    16388    40004    0x7b  , 0001-0001-0001 {ACDEF}

  HGE1/0/3            32768    32769    40004    0x7b  , 0001-0001-0001 {ACDEF}

  HGE1/0/4            32768    32772    40004    0x7b  , 0001-0001-0001 {ACDEF}

# 在Device C和Device D上查看VRRP备份组的信息。可以看到Device C在备份组1中为Master,Device D在备份组2中为Master,从而保证区域A的主机通过Device C与外部通信,区域B的主机通过Device D与外部通信。

[DeviceC] display vrrp

IPv4 Virtual Router Information:

 Running mode : Standard

 Total number of virtual routers : 2

 Interface          VRID  State        Running Adver   Auth     Virtual

                                       Pri     Timer   Type        IP

 ---------------------------------------------------------------------

 Vlan10             1     Master       200     100     None     10.1.1.100

 Vlan20             2     Backup       100     100     None     20.1.1.100

[DeviceD] display vrrp

IPv4 Virtual Router Information:

 Running mode : Standard

 Total number of virtual routers : 2

 Interface          VRID  State        Running Adver   Auth     Virtual

                                       Pri     Timer   Type        IP

 ---------------------------------------------------------------------

 Vlan10             1     Backup       100     100     None     10.1.1.100

 Vlan20             2     Master       200     100     None     20.1.1.100

# 查看Device E上的OSPF邻居信息,可以看到Device E与Device C和Device D分别建立OSPF邻居,从而确保了三层互通。

[DeviceE] display ospf peer

 

         OSPF Process 1 with Router ID 200.1.1.2

               Neighbor Brief Information

 

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 100.1.1.1       100.1.1.1       1   35         Full/BDR          Vlan100

 200.1.1.1       200.1.1.1       1   33         Full/BDR          Vlan200

# 在区域A的主机上ping 30.1.1.1,可以ping通。

C:\Documents and Settings\Administrator>ping 30.1.1.1

 

Pinging 30.1.1.1 with 32 bytes of data:

 

Reply from 30.1.1.1: bytes=32 time=1ms TTL=126

Reply from 30.1.1.1: bytes=32 time=1ms TTL=126

Reply from 30.1.1.1: bytes=32 time=1ms TTL=126

Reply from 30.1.1.1: bytes=32 time=1ms TTL=126

 

Ping statistics for 30.1.1.1:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 1ms, Maximum = 1ms, Average = 1ms

4.7  配置文件

·     Device A:

#

vlan 10

#

vlan 20

#

interface Bridge-Aggregation1

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

#

interface Bridge-Aggregation3

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

 port drni intra-portal-port 1

#

interface Bridge-Aggregation4

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

 port drni group 4

#

interface HundredGigE1/0/5

 port link-mode route

 ip address 1.1.1.1 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 3

#

interface HundredGigE1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 3

#

interface HundredGigE1/0/6

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 1

#

interface HundredGigE1/0/7

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 1

#

 drni system-mac 0001-0001-0001

 drni system-number 1

 drni system-priority 123

 drni keepalive ip destination 1.1.1.2 source 1.1.1.1

#

 drni mad exclude interface HundredGigE1/0/5

#

·     Device B:

#

vlan 10

#

vlan 20

#

interface Bridge-Aggregation2

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

#

interface Bridge-Aggregation3

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

 port drni intra-portal-port 1

#

interface Bridge-Aggregation4

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

 port drni group 4

#

interface HundredGigE1/0/5

 port link-mode route

 ip address 1.1.1.2 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 3

#

interface HundredGigE1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 3

#

interface HundredGigE1/0/6

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 2

#

interface HundredGigE1/0/7

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 2

#

 drni system-mac 0001-0001-0001

 drni system-number 2

 drni system-priority 123

 drni keepalive ip destination 1.1.1.1 source 1.1.1.2

#

 drni mad exclude interface HundredGigE1/0/5

#

·     Device C:

#

ospf 1

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 20.1.1.0 0.0.0.255

  network 100.1.1.0 0.0.0.255

#

vlan 10

#

vlan 20

#

vlan 100

#

interface Bridge-Aggregation1

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

#

interface Vlan-interface10

 ip address 10.1.1.1 255.255.255.0

 vrrp vrid 1 virtual-ip 10.1.1.100

 vrrp vrid 1 priority 200

 vrrp vrid 1 preempt-mode delay 500

 vrrp vrid 1 track 1 priority reduced 150

#

interface Vlan-interface20

 ip address 20.1.1.1 255.255.255.0

 vrrp vrid 2 virtual-ip 20.1.1.100

#

interface Vlan-interface100

 ip address 100.1.1.1 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 1

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 1

#

interface HundredGigE1/0/3

 port link-mode bridge

 port access vlan 100

#

 track 1 interface HundredGigE1/0/3

#

·     Device D:

#

ospf 1

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 20.1.1.0 0.0.0.255

  network 200.1.1.0 0.0.0.255

#

vlan 10

#

vlan 20

#

vlan 200

#

interface Bridge-Aggregation2

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

#

interface Vlan-interface10

 ip address 10.1.1.2 255.255.255.0

 vrrp vrid 1 virtual-ip 10.1.1.100

#

interface Vlan-interface20

 ip address 20.1.1.2 255.255.255.0

 vrrp vrid 2 virtual-ip 20.1.1.100

 vrrp vrid 2 priority 200

 vrrp vrid 2 preempt-mode delay 500

 vrrp vrid 2 track 2 priority reduced 150

#

interface Vlan-interface200

 ip address 200.1.1.1 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 2

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 2

#

interface HundredGigE1/0/3

 port link-mode bridge

 port access vlan 200

#

 track 2 interface HundredGigE1/0/3

#

·     Device E:

#

ospf 1

 area 0.0.0.0

  network 30.1.1.0 0.0.0.255

  network 100.1.1.0 0.0.0.255

  network 200.1.1.0 0.0.0.255

#

vlan 30

#

vlan 100

#

vlan 200

#

interface Vlan-interface30

 ip address 30.1.1.1 255.255.255.0

#

interface Vlan-interface100

 ip address 100.1.1.2 255.255.255.0

#

interface Vlan-interface200

 ip address 200.1.1.2 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port access vlan 100

#

interface HundredGigE1/0/2

 port link-mode bridge

 port access vlan 200

#

interface HundredGigE1/0/3

 port link-mode bridge

 port access vlan 30

#

·     Device F:

#

vlan 10

#

vlan 20

#

interface Bridge-Aggregation4

 port link-type trunk

 port trunk permit vlan 1 10 20

 link-aggregation mode dynamic

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface HundredGigE1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

5  基于汇聚层的DRNI配置举例

5.1  组网需求

图2所示,Device A和Device B为汇聚层设备,通过在Device A和Device B上部署DRNI和VRRP,可以满足以下要求:

·     当Device A侧链路发生故障时,流量可以快速切换到Device B侧链路,保证可靠性。同时为了高效利用带宽,Device A和Device B侧链路可以同时转发报文,实现负载分担。

·     在网关设备工作正常时,区域A用户通过网关设备Device A进行数据转发;区域B用户通过网关设备Device B进行数据转发,实现流量的负载分担。

·     当Device A或者Device A的上行接口发生故障后,Device B能够迅速承担区域A内主机流量的转发任务;Device A故障恢复后,继续承担VRRP备份组1的网关功能。

·     当Device B或者Device B的上行接口发生故障后,Device A能够迅速承担区域B内主机流量的转发任务;Device B故障恢复后,继续承担VRRP备份组2的网关功能。

·     在Device A、Device B和Device E上搭建OSPF,Device A和Device B通过OSPF发布区域A和区域B内的主机所在网段的路由,以实现区域A和区域B内的主机与外部网络的三层互通。

图2 基于汇聚层的DRNI配置组网图

 

设备

接口

IP地址

设备

接口

IP地址

Device A

HGE1/0/5

1.1.1.1/24

Device B

HGE1/0/5

1.1.1.2/24

 

Vlan-int100

100.1.1.1/24

 

Vlan-int100

100.1.1.2/24

 

Vlan-int101

101.1.1.1/24

 

Vlan-int101

101.1.1.2/24

 

Vlan-int10

10.1.1.1/24

 

Vlan-int20

20.1.1.1/24

 

Virtual IP 1

100.1.1.100/24

 

Virtual IP 1

100.1.1.100/24

 

Virtual IP 2

101.1.1.100/24

 

Virtual IP 2

101.1.1.100/24

Device E

Vlan-int10

10.1.1.2/24

 

 

 

 

Vlan-int20

20.1.1.2/24

 

 

 

 

Vlan-int30

30.1.1.1/24

 

 

 

 

5.2  配置思路

·     分别在Device A和Device B上配置保留接口的IP地址,且保证能够三层互通,用于DRNI主备设备间Keepalive报文的传输。

·     为了让Device A和Device B分别成为VRRP备份组1和VRRP备份组2中的Master,需要在VRRP备份组1中为Device A配置较高的优先级,在VRRP备份组2中为Device B配置较高的优先级。

5.3  适用产品及版本

表2 适用产品及版本

产品

软件版本

S6805系列

Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S6825系列

Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S6850系列

S9850系列

Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S9820-64H

Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S9820-8C

Release 6616版本、Release 6616P01版本、Release 6635及以上版本

 

5.4  配置注意事项

配置DRNI时,需要注意:

·     要求所有DR设备配置相同的系统MAC地址和系统优先级,配置不同的系统编号。

·     一台DR设备上只能配置一个IPP口。

·     建议用户将Keepalive接口配置为保留接口,避免在DRNI建立过程中被置为MAD DOWN状态,造成错误检测。

配置VRRP时,需要注意:

·     建议使用VRRP标准协议模式。

·     备份组的虚拟IP地址不能为全零地址(0.0.0.0)、广播地址(255.255.255.255)、环回地址、非A/B/C类地址和其它非法IP地址(如0.0.0.1)。

·     建议将备份组的虚拟IP地址和备份组中设备下行接口的IP地址配置为同一网段,否则可能导致局域网内的主机无法访问外部网络。

5.5  配置步骤

5.5.1  配置Device A

# 配置DR系统参数。

<DeviceA> system-view

[DeviceA] drni system-mac 1-1-1

Changing the system MAC might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

[DeviceA] drni system-number 1

Changing the system number might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

[DeviceA] drni system-priority 123

Changing the system priority might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

# 配置Keepalive报文的目的IP地址和源IP地址。

[DeviceA] drni keepalive ip destination 1.1.1.2 source 1.1.1.1

# 配置端口HundredGigE1/0/5工作在三层模式,并配置IP地址为Keepalive报文的源IP地址。

[DeviceA] interface hundredgige 1/0/5

[DeviceA-HundredGigE1/0/5] port link-mode route

[DeviceA-HundredGigE1/0/5] ip address 1.1.1.1 24

[DeviceA-HundredGigE1/0/5] quit

# 配置Keepalive链路接口为保留接口。

[DeviceA] drni mad exclude interface hundredgige 1/0/5

# 创建动态二层聚合接口125,并配置该接口为IPP口。

[DeviceA] interface bridge-aggregation 125

[DeviceA-Bridge-Aggregation125] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation125] port drni intra-portal-port 1

[DeviceA-Bridge-Aggregation125] quit

# 分别将端口HundredGigE1/0/3HundredGigE1/0/4加入到聚合组125中。

[DeviceA] interface hundredgige 1/0/3

[DeviceA-HundredGigE1/0/3] port link-aggregation group 125

[DeviceA-HundredGigE1/0/3] quit

[DeviceA] interface hundredgige 1/0/4

[DeviceA-HundredGigE1/0/4] port link-aggregation group 125

[DeviceA-HundredGigE1/0/4] quit

# 创建动态二层聚合接口100,并配置该接口为DR口1。

[DeviceA] interface bridge-aggregation 100

[DeviceA-Bridge-Aggregation100] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation100] port drni group 1

[DeviceA-Bridge-Aggregation100] quit

# 将端口HundredGigE1/0/1加入到聚合组100中。

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] port link-aggregation group 100

[DeviceA-HundredGigE1/0/1] quit

# 创建动态二层聚合接口101,并配置该接口为DR口2。

[DeviceA] interface bridge-aggregation 101

[DeviceA-Bridge-Aggregation101] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation101] port drni group 2

[DeviceA-Bridge-Aggregation101] quit

# 将端口HundredGigE1/0/2加入到聚合组101中。

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] port link-aggregation group 101

[DeviceA-HundredGigE1/0/2] quit

# 创建VLAN 10、100和101。

[DeviceA] vlan 10

[DeviceA-vlan10] quit

[DeviceA] vlan 100

[DeviceA-vlan100] quit

[DeviceA] vlan 101

[DeviceA-vlan101] quit

# 将端口HundredGigE1/0/6加入VLAN 10。

[DeviceA] vlan 10

[DeviceA-vlan10] port hundredgige 1/0/6

[DeviceA-vlan10] quit

# 配置二层聚合接口100为Trunk端口,并允许VLAN 100的报文通过。

[DeviceA] interface bridge-aggregation 100

[DeviceA-Bridge-Aggregation100] port link-type trunk

Configuring HundredGigE1/0/1 done.

[DeviceA-Bridge-Aggregation100] port trunk permit vlan 100

Configuring HundredGigE1/0/1 done.

[DeviceA-Bridge-Aggregation100] quit

# 配置二层聚合接口101为Trunk端口,并允许VLAN 101的报文通过。

[DeviceA] interface bridge-aggregation 101

[DeviceA-Bridge-Aggregation101] port link-type trunk

Configuring HundredGigE1/0/2 done.

[DeviceA-Bridge-Aggregation101] port trunk permit vlan 101

Configuring HundredGigE1/0/2 done.

[DeviceA-Bridge-Aggregation101] quit

# 配置二层聚合接口125为Trunk端口,并允许VLAN 100和101的报文通过。

[DeviceA] interface bridge-aggregation 125

[DeviceA-Bridge-Aggregation125] port link-type trunk

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceA-Bridge-Aggregation125] port trunk permit vlan 100 101

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceA-Bridge-Aggregation125] quit

# 创建接口Vlan-interface10、Vlan-interface100和Vlan-interface101,并配置其IP地址。

[DeviceA] interface vlan-interface 10

[DeviceA-vlan-interface10] ip address 10.1.1.1 24

[DeviceA-vlan-interface10] quit

[DeviceA] interface vlan-interface 100

[DeviceA-vlan-interface100] ip address 100.1.1.1 24

[DeviceA-vlan-interface100] quit

[DeviceA] interface vlan-interface 101

[DeviceA-vlan-interface101] ip address 101.1.1.1 24

[DeviceA-vlan-interface101] quit

# 配置OSPF。

[DeviceA] ospf

[DeviceA-ospf-1] area 0

[DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] network 101.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] quit

[DeviceA-ospf-1] quit

# 为接口Vlan-interface100创建备份组1,并配置备份组1的虚拟IP地址为100.1.1.100。

[DeviceA] interface vlan-interface 100

[DeviceA-Vlan-interface100] vrrp vrid 1 virtual-ip 100.1.1.100

# 设置Device A在备份组1中的优先级为200,以保证Device A成为Master,从而和Device A在DRNI中角色一致。

[DeviceA-Vlan-interface100] vrrp vrid 1 priority 200

[DeviceA-Vlan-interface100] quit

# 为接口Vlan-interface101创建备份组2,并配置备份组2的虚拟IP地址为101.1.1.100。

[DeviceA] interface vlan-interface 101

[DeviceA-Vlan-interface101] vrrp vrid 2 virtual-ip 101.1.1.100

[DeviceA-Vlan-interface101] quit

# 设置Device A在备份组1中工作在抢占方式,配置抢占延迟时间为500厘秒。

[DeviceA] interface vlan-interface 100

[DeviceA-Vlan-interface100] vrrp vrid 1 preempt-mode delay 500

[DeviceA-Vlan-interface100] quit

# 创建和上行端口HundredGigE1/0/6关联的Track项1。

[DeviceA] track 1 interface hundredgige 1/0/6

# 配置监视Track项1,Track项的状态为Negative时,Device A在VRRP备份组1中的优先级降低的数值为150。

[DeviceA] interface vlan-interface 100

[DeviceA-Vlan-interface100] vrrp vrid 1 track 1 priority reduced 150

[DeviceA-Vlan-interface100] quit

5.5.2  配置Device B

# 配置DR系统参数。

<DeviceB> system-view

[DeviceB] drni system-mac 1-1-1

Changing the system MAC might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

[DeviceB] drni system-number 2

Changing the system number might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

[DeviceB] drni system-priority 123

Changing the system priority might flap the intra-portal link and cause DR system setup failure. Continue? [Y/N]:y

# 配置Keepalive报文的目的IP地址和源IP地址。

[DeviceB] drni keepalive ip destination 1.1.1.1 source 1.1.1.2

# 配置端口HundredGigE1/0/5工作在三层模式,并配置IP地址为Keepalive报文的源IP地址。

[DeviceB] interface hundredgige 1/0/5

[DeviceB-HundredGigE1/0/5] port link-mode route

[DeviceB-HundredGigE1/0/5] ip address 1.1.1.2 24

[DeviceB-HundredGigE1/0/5] quit

# 配置Keepalive链路接口为保留接口。

[DeviceB] drni mad exclude interface hundredgige 1/0/5

# 创建动态二层聚合接口125,并配置该接口为IPP口。

[DeviceB] interface bridge-aggregation 125

[DeviceB-Bridge-Aggregation125] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation125] port drni intra-portal-port 1

[DeviceB-Bridge-Aggregation125] quit

# 分别将端口HundredGigE1/0/3HundredGigE1/0/4加入到聚合组125中。

[DeviceB] interface hundredgige 1/0/3

[DeviceB-HundredGigE1/0/3] port link-aggregation group 125

[DeviceB-HundredGigE1/0/3] quit

[DeviceB] interface hundredgige 1/0/4

[DeviceB-HundredGigE1/0/4] port link-aggregation group 125

[DeviceB-HundredGigE1/0/4] quit

# 创建动态二层聚合接口100,并配置该接口为DR口1。

[DeviceB] interface bridge-aggregation 100

[DeviceB-Bridge-Aggregation100] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation100] port drni group 1

[DeviceB-Bridge-Aggregation100] quit

# 将端口HundredGigE1/0/2加入到聚合组100中。

[DeviceB] interface hundredgige 1/0/2

[DeviceB-HundredGigE1/0/2] port link-aggregation group 100

[DeviceB-HundredGigE1/0/2] quit

# 创建动态二层聚合接口101,并配置该接口为DR口2。

[DeviceB] interface bridge-aggregation 101

[DeviceB-Bridge-Aggregation101] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation101] port drni group 2

[DeviceB-Bridge-Aggregation101] quit

# 将端口HundredGigE1/0/1加入到聚合组101中。

[DeviceB] interface hundredgige 1/0/1

[DeviceB-HundredGigE1/0/1] port link-aggregation group 101

[DeviceB-HundredGigE1/0/1] quit

# 创建VLAN 20、100和101。

[DeviceB] vlan 20

[DeviceB-vlan20] quit

[DeviceB] vlan 100

[DeviceB-vlan100] quit

[DeviceB] vlan 101

[DeviceB-vlan101] quit

# 将端口HundredGigE1/0/6加入VLAN 20。

[DeviceB] vlan 20

[DeviceB-vlan20] port hundredgige 1/0/6

[DeviceB-vlan20] quit

# 配置二层聚合接口100为Trunk端口,并允许VLAN 100的报文通过。

[DeviceB] interface bridge-aggregation 100

[DeviceB-Bridge-Aggregation100] port link-type trunk

Configuring HundredGigE1/0/2 done.

[DeviceB-Bridge-Aggregation100] port trunk permit vlan 100

Configuring HundredGigE1/0/2 done.

[DeviceB-Bridge-Aggregation100] quit

# 配置二层聚合接口101为Trunk端口,并允许VLAN 101的报文通过。

[DeviceB] interface bridge-aggregation 101

[DeviceB-Bridge-Aggregation101] port link-type trunk

Configuring HundredGigE1/0/1 done.

[DeviceB-Bridge-Aggregation101] port trunk permit vlan 101

Configuring HundredGigE1/0/1 done.

[DeviceB-Bridge-Aggregation101] quit

# 配置二层聚合接口125为Trunk端口,并允许VLAN 100和101的报文通过。

[DeviceB] interface bridge-aggregation 125

[DeviceB-Bridge-Aggregation125] port link-type trunk

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceB-Bridge-Aggregation125] port trunk permit vlan 100 101

Configuring HundredGigE1/0/3 done.

Configuring HundredGigE1/0/4 done.

[DeviceB-Bridge-Aggregation125] quit

# 创建接口Vlan-interface20、Vlan-interface100和Vlan-interface101,并配置其IP地址。

[DeviceB] interface vlan-interface 20

[DeviceB-vlan-interface20] ip address 20.1.1.1 24

[DeviceB-vlan-interface20] quit

[DeviceB] interface vlan-interface 100

[DeviceB-vlan-interface100] ip address 100.1.1.2 24

[DeviceB-vlan-interface100] quit

[DeviceB] interface vlan-interface 101

[DeviceB-vlan-interface101] ip address 101.1.1.2 24

[DeviceB-vlan-interface101] quit

# 配置OSPF。

[DeviceB] ospf

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] network 101.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

# 为接口Vlan-interface100创建备份组1,并配置备份组1的虚拟IP地址为100.1.1.100。

[DeviceB] interface vlan-interface 100

[DeviceB-Vlan-interface100] vrrp vrid 1 virtual-ip 100.1.1.100

[DeviceB-Vlan-interface100] quit

# 为接口Vlan-interface101创建备份组2,并配置备份组2的虚拟IP地址为101.1.1.100。

[DeviceB] interface vlan-interface 101

[DeviceB-Vlan-interface101] vrrp vrid 2 virtual-ip 101.1.1.100

# 设置Device B在备份组2中的优先级为200,以保证Device B成为Master,从而和Device B在DRNI中角色一致。

[DeviceA-Vlan-interface101] vrrp vrid 2 priority 200

# 设置Device B在备份组2中工作在抢占方式,配置抢占延迟时间为500厘秒。

[DeviceB-Vlan-interface101] vrrp vrid 2 preempt-mode delay 500

[DeviceB-Vlan-interface101] quit

# 创建和上行端口HundredGigE1/0/6关联的Track项2。

[DeviceB] track 2 interface hundredgige 1/0/6

# 配置监视Track项2,Track项的状态为Negative时,Device B在VRRP备份组2中的优先级降低的数值为150。

[DeviceB] interface vlan-interface 101

[DeviceB-Vlan-interface101] vrrp vrid 2 track 2 priority reduced 150

[DeviceB-Vlan-interface101] quit

5.5.3  配置Device C

# 创建VLAN 100。

[DeviceC] vlan 100

[DeviceC-vlan100] quit

# 将端口HundredGigE1/0/3加入VLAN 100。

[DeviceC] interface hundredgige 1/0/3

[DeviceC-HundredGigE1/0/3] port access vlan 100

[DeviceC-HundredGigE1/0/3] quit

# 创建二层聚合接口100,并配置该接口为动态聚合模式。

<DeviceC> system-view

[DeviceC] interface bridge-aggregation 100

[DeviceC-Bridge-Aggregation100] link-aggregation mode dynamic

[DeviceC-Bridge-Aggregation100] quit

# 分别将端口HundredGigE1/0/1HundredGigE1/0/2加入到聚合组100中。

[DeviceC] interface range hundredgige 1/0/1 to hundredgige 1/0/2

[DeviceC-if-range] port link-aggregation group 100

[DeviceC-if-range] quit

# 配置二层聚合接口100为Trunk端口,并允许VLAN 100的报文通过。

[DeviceC] interface bridge-aggregation 100

[DeviceC-Bridge-Aggregation100] port link-type trunk

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceC-Bridge-Aggregation100] port trunk permit vlan 100

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceC-Bridge-Aggregation100] quit

5.5.4  配置Device D

# 创建VLAN 101。

[DeviceD] vlan 101

[DeviceD-vlan101] quit

# 将端口HundredGigE1/0/3加入VLAN 101。

[DeviceD] interface hundredgige 1/0/3

[DeviceD-HundredGigE1/0/3] port access vlan 101

[DeviceD-HundredGigE1/0/3] quit

# 创建二层聚合接口101,并配置该接口为动态聚合模式。

<DeviceD> system-view

[DeviceD] interface bridge-aggregation 101

[DeviceD-Bridge-Aggregation101] link-aggregation mode dynamic

[DeviceD-Bridge-Aggregation101] quit

# 分别将端口HundredGigE1/0/1HundredGigE1/0/2加入到聚合组101中。

[DeviceD] interface range hundredgige 1/0/1 to hundredgige 1/0/2

[DeviceD-if-range] port link-aggregation group 101

[DeviceD-if-range] quit

# 配置二层聚合接口101为Trunk端口,并允许VLAN 101的报文通过。

[DeviceD] interface bridge-aggregation 101

[DeviceD-Bridge-Aggregation101] port link-type trunk

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceD-Bridge-Aggregation101] port trunk permit vlan 101

Configuring HundredGigE1/0/1 done.

Configuring HundredGigE1/0/2 done.

[DeviceD-Bridge-Aggregation101] quit

5.5.5  配置Device E

# 创建VLAN 10,并将接口HundredGigE1/0/1加入该VLAN。

<DeviceE> system-view

[DeviceE] vlan 10

[DeviceE-vlan10] port hundredgige 1/0/1

[DeviceE-vlan10] quit

# 创建接口Vlan-interface10,并配置其IP地址。

[DeviceE] interface vlan-interface 10

[DeviceE-vlan-interface10] ip address 10.1.1.2 24

[DeviceE-vlan-interface10] quit

# 创建VLAN 20,并将接口HundredGigE1/0/2加入该VLAN。

[DeviceE] vlan 20

[DeviceE-vlan20] port hundredgige 1/0/2

[DeviceE-vlan20] quit

# 创建接口Vlan-interface20,并配置其IP地址。

[DeviceE] interface vlan-interface 20

[DeviceE-vlan-interface20] ip address 20.1.1.2 24

[DeviceE-vlan-interface20] quit

# 创建VLAN 30,并将接口HundredGigE1/0/3加入该VLAN。

[DeviceE] vlan 30

[DeviceE-vlan30] port hundredgige 1/0/3

[DeviceE-vlan30] quit

# 创建接口Vlan-interface30,并配置其IP地址。

[DeviceE] interface vlan-interface 30

[DeviceE-vlan-interface30] ip address 30.1.1.1 24

[DeviceE-vlan-interface30] quit

# 配置OSPF。

[DeviceE] ospf

[DeviceE-ospf-1] area 0

[DeviceE-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceE-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceE-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[DeviceE-ospf-1-area-0.0.0.0] quit

[DeviceE-ospf-1] quit

5.6  验证配置

# 在Device A上查看DRNI的简要信息和详细信息。可以看到Device A和Device B成功组成分布式聚合系统。

[DeviceA] display drni summary

Flags: A -- Aggregate interface down, B -- No peer DR interface configured

       C -- Configuration consistency check failed

 

IPP: BAGG125

IPP state (cause): UP

Keepalive link state (cause): UP

 

                     DR interface information

DR interface  DR group  Local state (cause)  Peer state  Remaining down time(s)

BAGG100       1         UP                   UP          -

BAGG101       2         UP                   UP          -

[DeviceA] display drni verbose

Flags: A -- Home_Gateway, B -- Neighbor_Gateway, C -- Other_Gateway,

       D -- IPP_Activity, E -- DRCP_Timeout, F -- Gateway_Sync,

       G -- Port_Sync, H -- Expired

 

IPP/IPP ID: BAGG125/1

State: UP

Cause: -

Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG

Local Selected ports (index): HGE1/0/3 (1), HGE1/0/4 (4)

 

Peer Selected ports indexes: 1, 4

 

DR interface/DR group ID: BAGG100/1

Local DR interface state: UP

Peer DR interface state: UP

DR group state: UP

Local DR interface down cause: -

Remaining DRNI DOWN time: -

Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG

Local Selected ports (index): HGE1/0/1 (16386)

Peer Selected ports indexes: 32771

 

DR interface/DR group ID: BAGG101/2

Local DR interface state: UP

Peer DR interface state: UP

DR group state: UP

Local DR interface down cause: -

Remaining DRNI DOWN time: -

Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG

Local Selected ports (index): HGE1/0/2 (16387)

Peer Selected ports indexes: 32772

# 在Device C和Device D上分别查看二层聚合组100和二层聚合组101的详细信息。可以看到Device C和Device D的端口HundredGigE1/0/1、HundredGigE1/0/2均处于选中状态,此时Device C和Device D将DeviceA和DeviceB认为是一台设备,从而实现了跨设备的聚合。

[DeviceC] display link-aggregation verbose

Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing

Port Status: S -- Selected, U -- Unselected, I -- Individual

Port: A -- Auto port, M -- Management port, R -- Reference port

Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,

        D -- Synchronization, E -- Collecting, F -- Distributing,

        G -- Defaulted, H -- Expired

 

Aggregate Interface: Bridge-Aggregation100

Creation Mode: Manual

Aggregation Mode: Dynamic

Loadsharing Type: Shar

Management VLANs: None

System ID: 0x8000, 8e33-8e4a-0300

Local:

  Port                Status   Priority Index    Oper-Key               Flag

  HGE1/0/1            S        32768    1        1                      {ACDEF}

  HGE1/0/2            S        32768    2        1                      {ACDEF}

Remote:

  Actor               Priority Index    Oper-Key SystemID               Flag

  HGE1/0/1(R)         32768    16386    40001    0x7b  , 0001-0001-0001 {ACDEF}

  HGE1/0/2            32768    32770    40001    0x7b  , 0001-0001-0001 {ACDEF}

[DeviceD] display link-aggregation verbose

Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing

Port Status: S -- Selected, U -- Unselected, I -- Individual

Port: A -- Auto port, M -- Management port, R -- Reference port

Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,

        D -- Synchronization, E -- Collecting, F -- Distributing,

        G -- Defaulted, H -- Expired

 

Aggregate Interface: Bridge-Aggregation101

Creation Mode: Manual

Aggregation Mode: Dynamic

Loadsharing Type: Shar

Management VLANs: None

System ID: 0x8000, 8e33-9400-0400

Local:

  Port                Status   Priority Index    Oper-Key               Flag

  HGE1/0/1            S        32768    1        1                      {ACDEF}

  HGE1/0/2            S        32768    2        1                      {ACDEF}

Remote:

  Actor               Priority Index    Oper-Key SystemID               Flag

  HGE1/0/1(R)         32768    16387    40002    0x7b  , 0001-0001-0001 {ACDEF}

  HGE1/0/2            32768    32771    40002    0x7b  , 0001-0001-0001 {ACDEF}

# 在Device A和Device B上查看VRRP备份组的信息。可以看到Device A在备份组1中为Master,Device B在备份组2中为Master,从而保证区域A内的主机通过Device A与外部通信,区域B内的主机通过Device B与外部通信。

[DeviceA] display vrrp

IPv4 Virtual Router Information:

 Running mode : Standard

 Total number of virtual routers : 2

 Interface          VRID  State        Running Adver   Auth     Virtual

                                       Pri     Timer   Type        IP

 ---------------------------------------------------------------------

 Vlan100            1     Master       200     100     None     100.1.1.100

 Vlan101            2     Backup       100     100     None     101.1.1.100

[DeviceB] display vrrp

IPv4 Virtual Router Information:

 Running mode : Standard

 Total number of virtual routers : 2

 Interface          VRID  State        Running Adver   Auth     Virtual

                                       Pri     Timer   Type        IP

 ---------------------------------------------------------------------

 Vlan100            1     Backup       100     100     None     100.1.1.100

 Vlan101            2     Master       200     100     None     101.1.1.100

# 查看Device E上的OSPF邻居信息,可以看到Device E与Device A和Device B分别建立OSPF邻居,从而确保了三层互通。

[DeviceE] display ospf peer

 

         OSPF Process 1 with Router ID 30.1.1.1

               Neighbor Brief Information

 

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 101.1.1.1       10.1.1.1        1   34         Full/DR           Vlan10

 101.1.1.2       20.1.1.1        1   36         Full/DR           Vlan20

# 在区域A内的主机上使用ping命令验证区域B内的主机是否可达(主机安装的操作系统为Windows XP),可以看出区域A和区域B内的主机可以互相ping通;在区域A内的主机ping 30.1.1.1,可以ping通。以上表明通过DRNI实现三层转发。

C:\Documents and Settings\Administrator>ping 101.1.1.4

 

Pinging 101.1.1.4 with 32 bytes of data:

 

Reply from 101.1.1.4: bytes=32 time=1ms TTL=126

Reply from 101.1.1.4: bytes=32 time=1ms TTL=126

Reply from 101.1.1.4: bytes=32 time=1ms TTL=126

Reply from 101.1.1.4: bytes=32 time=1ms TTL=126

 

Ping statistics for 101.1.1.4:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 1ms, Maximum = 1ms, Average = 1ms

 

C:\Documents and Settings\Administrator>ping 30.1.1.1

 

Pinging 30.1.1.1 with 32 bytes of data:

 

Reply from 30.1.1.1: bytes=32 time=1ms TTL=126

Reply from 30.1.1.1: bytes=32 time=1ms TTL=126

Reply from 30.1.1.1: bytes=32 time=1ms TTL=126

Reply from 30.1.1.1: bytes=32 time=1ms TTL=126

 

Ping statistics for 30.1.1.1:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 1ms, Maximum = 1ms, Average = 1ms

5.7  配置文件

·     Device A:

#

ospf 1

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 100.1.1.0 0.0.0.255

  network 101.1.1.0 0.0.0.255

#

vlan 10

#

vlan 100 to 101

#

interface Bridge-Aggregation100

 port link-type trunk

 port trunk permit vlan 1 100

 link-aggregation mode dynamic

 port drni group 1

#

interface Bridge-Aggregation101

 port link-type trunk

 port trunk permit vlan 1 101

 link-aggregation mode dynamic

 port drni group 2

#

interface Bridge-Aggregation125

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 link-aggregation mode dynamic

 port drni intra-portal-port 1

#

interface Vlan-interface10

 ip address 10.1.1.1 255.255.255.0

#

interface Vlan-interface100

 ip address 100.1.1.1 255.255.255.0

 vrrp vrid 1 virtual-ip 100.1.1.100

 vrrp vrid 1 priority 200

 vrrp vrid 1 preempt-mode delay 500

 vrrp vrid 1 track 1 priority reduced 150

#

interface Vlan-interface101

 ip address 101.1.1.1 255.255.255.0

 vrrp vrid 2 virtual-ip 101.1.1.100

#

interface HundredGigE1/0/5

 port link-mode route

 ip address 1.1.1.1 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

 port link-aggregation group 100

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 101

 port link-aggregation group 101

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 port link-aggregation group 125

#

interface HundredGigE1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 port link-aggregation group 125

#

interface HundredGigE1/0/6

 port link-mode bridge

 port access vlan 10

#

 drni system-mac 0001-0001-0001

 drni system-number 1

 drni system-priority 123

 drni keepalive ip destination 1.1.1.2 source 1.1.1.1

#

 drni mad exclude interface HundredGigE1/0/5

#

 track 1 interface HundredGigE1/0/6

#

·     Device B:

#

ospf 1

 area 0.0.0.0

  network 20.1.1.0 0.0.0.255

  network 100.1.1.0 0.0.0.255

  network 101.1.1.0 0.0.0.255

#

vlan 20

#

vlan 100 to 101

#

interface Bridge-Aggregation100

 port link-type trunk

 port trunk permit vlan 1 100

 link-aggregation mode dynamic

 port drni group 1

#

interface Bridge-Aggregation101

 port link-type trunk

 port trunk permit vlan 1 101

 link-aggregation mode dynamic

 port drni group 2

#

interface Bridge-Aggregation125

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 link-aggregation mode dynamic

 port drni intra-portal-port 1

#

interface Vlan-interface20

 ip address 20.1.1.1 255.255.255.0

#

interface Vlan-interface100

 ip address 100.1.1.2 255.255.255.0

 vrrp vrid 1 virtual-ip 100.1.1.100

#

interface Vlan-interface101

 ip address 101.1.1.2 255.255.255.0

 vrrp vrid 2 virtual-ip 101.1.1.100

 vrrp vrid 2 priority 200

 vrrp vrid 2 preempt-mode delay 500

 vrrp vrid 2 track 2 priority reduced 150

#

interface HundredGigE1/0/5

 port link-mode route

 ip address 1.1.1.2 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 101

 port link-aggregation group 101

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

 port link-aggregation group 100

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 port link-aggregation group 125

#

interface HundredGigE1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 port link-aggregation group 125

#

interface HundredGigE1/0/6

 port link-mode bridge

 port access vlan 20

#

 drni system-mac 0001-0001-0001

 drni system-number 2

 drni system-priority 123

 drni keepalive ip destination 1.1.1.1 source 1.1.1.2

#

 drni mad exclude interface HundredGigE1/0/5

#

 track 2 interface HundredGigE1/0/6

#

·     Device C:

#

vlan 100

#

interface Bridge-Aggregation100

 port link-type trunk

 port trunk permit vlan 1 100

 link-aggregation mode dynamic

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

 port link-aggregation group 100

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

 port link-aggregation group 100

#

interface HundredGigE1/0/3

 port link-mode bridge

 port access vlan 100

#

·     Device D:

#

vlan 101

#

interface Bridge-Aggregation101

 port link-type trunk

 port trunk permit vlan 1 101

 link-aggregation mode dynamic

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 101

 port link-aggregation group 101

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 101

 port link-aggregation group 101

#

interface HundredGigE1/0/3

 port link-mode bridge

 port access vlan 101

#

·     Device E:

#

ospf 1

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 20.1.1.0 0.0.0.255

  network 30.1.1.0 0.0.0.255

#

vlan 10

#

vlan 20

#

vlan 30

#

interface Vlan-interface10

 ip address 10.1.1.2 255.255.255.0

#

interface Vlan-interface20

 ip address 20.1.1.2 255.255.255.0

#

interface Vlan-interface30

 ip address 30.1.1.1 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port access vlan 10

#

interface HundredGigE1/0/2

 port link-mode bridge

 port access vlan 20

#

interface HundredGigE1/0/3

 port link-mode bridge

 port access vlan 30

#

6  DRNI组网IPv4和IPv6 VLAN双活网关配置举例

6.1  组网需求

图3所示:

·     Device A和Device B组成DR系统,Device D通过DR接口接入DR系统。

·     Device A和Device B通过等价路由接入到上行设备Device C。

由于用户对服务器的入网需求,现需要:

·     两台DR设备Device A和Device B同时作为服务器的IPv4网关和IPv6网关。

·     如果Device A或Device B与上行设备Device C的链路故障,报文可以通过路由绕行到对端DR设备处理,不影响服务器与外部网络的通信。

图3 DRNI组网IPv4和IPv6 VLAN双活网关组网图

设备

接口

IP地址

对接设备及接口

Device A

HGE1/0/1

-

Device D: HGE1/0/1

HGE1/0/2

-

Device D: HGE1/0/2

HGE1/0/3

-

Device B: HGE1/0/3

HGE1/0/4

-

Device B: HGE1/0/4

HGE1/0/5

IPv421.1.1.1

IPv621::1

Device B: HGE1/0/5

HGE1/0/6

-

Device C: HGE1/0/1

Vlan-int100

IPv4100.1.1.100/24

IPv6100::100/64

-

Vlan-int101

IPv4101.1.1.1/24

IPv6101::1/64

Device B: Vlan-int101

·     IPv4101.1.1.2/24

·     IPv6101::2/64

Vlan-int32

IPv432.1.1.1/24

IPv632::1/64

Device C: Vlan-int32

·     IPv432.1.1.2/24

·     IPv632::2/64

Device B

HGE1/0/1

-

Device D: HGE1/0/3

HGE1/0/2

-

Device D: HGE1/0/4

HGE1/0/3

-

Device A: HGE1/0/3

HGE1/0/4

-

Device A: HGE1/0/4

HGE1/0/5

IPv421.1.1.2

IPv621::2

Device A: HGE1/0/5

HGE1/0/6

-

Device C: HGE1/0/6

Vlan-int100

IPv4100.1.1.100/24

IPv6100::100/64

-

Vlan-int101

IPv4101.1.1.2/24

IPv6101::2/64

Device A: Vlan-int101

·     IPv4101.1.1.1/24

·     IPv6101::1/64

Vlan-int33

IPv433.1.1.1/24

IPv633::1/64

Device C: Vlan-int33

·     IPv433.1.1.2/24

·     IPv633::2/64

Device C

HGE1/0/1

-

Device A: HGE1/0/6

HGE1/0/2

-

Device B: HGE1/0/6

HGE1/0/3

-

Network 1

Vlan-int22

IPv422.1.1.1/24

IPv622::1/64

Network 1

Vlan-int32

IPv432.1.1.2/24

IPv632::2/64

Device A: Vlan-int32

·     IPv432.1.1.1/24

·     IPv632::1/64

Vlan-int33

IPv433.1.1.2/24

IPv633::2/64

Device B: Vlan-int33

·     IPv433.1.1.1/24

·     IPv633::1/64

Device D

HGE1/0/1

-

Device A: HGE1/0/1

HGE1/0/2

-

Device A: HGE1/0/2

HGE1/0/3

-

Device B: HGE1/0/1

HGE1/0/4

-

Device B: HGE1/0/2

 

6.2  配置思路

·     Device A和Device B配置VLAN接口100作为IPv4和IPv6的双活网关。Device A和Device B在VLAN接口100配置相同的IPv4地址和MAC地址、IPv6地址和IPv6 Link-local地址,以便IPv4和IPv6用户均可通过该网关访问外部网络。

·     配置Device A和Device B通过VLAN接口101实现三层互通。如果Device A或Device B与上行设备Device C的链路故障,报文可以通过路由绕行到对端DR设备处理。

6.3  适用产品及版本

表3 适用产品及版本

产品

软件版本

S6805系列

Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S6825系列

Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S6850系列

S9850系列

Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S9820-64H

Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本

S9820-8C

Release 6616版本、Release 6616P01版本、Release 6635及以上版本

 

6.4  配置注意事项

同级DRNI设备的drni system-mac应配置为相同,不同级DRNI设备的drni system-mac一定要配置为不同。

6.5  配置步骤

6.5.1  配置Device A

# 配置DRNI系统参数。

<DeviceA> system-view

[DeviceA] drni system-mac 0002-0002-0002

[DeviceA] drni system-number 1

[DeviceA] drni system-priority 123

# 配置Keepalive报文的目的IP地址和源IP地址。

[DeviceA] drni keepalive ip destination 21.1.1.2 source 21.1.1.1

# 配置端口HundredGigE1/0/5工作在三层模式,并配置IP地址为Keepalive报文的源IP地址。

[DeviceA] interface hundredgige 1/0/5

[DeviceA-HundredGigE1/0/5] port link-mode route

[DeviceA-HundredGigE1/0/5] ip address 21.1.1.1 255.255.255.0

[DeviceA-HundredGigE1/0/5] ipv6 address 21::1 64

[DeviceA-HundredGigE1/0/5] quit

# 配置Keepalive链路接口为DRNI保留接口。

[DeviceA] drni mad exclude interface hundredgige 1/0/5

# 创建动态二层聚合接口1。

[DeviceA] interface bridge-aggregation 1

[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation1] quit

# 分别将端口HundredGigE1/0/3和HundredGigE1/0/4加入到聚合组1中。

[DeviceA] interface hundredgige 1/0/3

[DeviceA-HundredGigE1/0/3] port link-aggregation group 1

[DeviceA-HundredGigE1/0/3] quit

[DeviceA] interface hundredgige 1/0/4

[DeviceA-HundredGigE1/0/4] port link-aggregation group 1

[DeviceA-HundredGigE1/0/4] quit

# 将二层聚合接口1配置为IPP口。

[DeviceA] interface bridge-aggregation 1

[DeviceA-Bridge-Aggregation1] port drni intra-portal-port 1

[DeviceA-Bridge-Aggregation1] undo port trunk permit vlan 1

[DeviceA-Bridge-Aggregation1] quit

# 创建动态二层聚合接口3,并配置该接口为DR口1。

[DeviceA] interface bridge-aggregation 3

[DeviceA-Bridge-Aggregation3] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation3] port drni group 1

[DeviceA-Bridge-Aggregation3] quit

# 将端口HundredGigE1/0/1和HundredGigE1/0/2加入到聚合组3中。

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] port link-aggregation group 3

[DeviceA-HundredGigE1/0/1] quit

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] port link-aggregation group 3

[DeviceA-HundredGigE1/0/2] quit

# 创建VLAN 100、VLAN 101。

[DeviceA] vlan 100

[DeviceA-vlan100] quit

[DeviceA] vlan 101

[DeviceA-vlan101] quit

# 配置二层聚合接口3为Trunk端口,并允许VLAN 100的报文通过。

[DeviceA] interface bridge-aggregation 3

[DeviceA-Bridge-Aggregation3] port link-type trunk

[DeviceA-Bridge-Aggregation3] port trunk permit vlan 100

[DeviceA-Bridge-Aggregation3] undo port trunk permit vlan 1

[DeviceA-Bridge-Aggregation3] quit

# 配置接口Vlan-interface100的IPv4地址和MAC地址,使其作为IPv4双活网关,IPv4地址为100.1.1.100,MAC地址为0000-0010-0010。

[DeviceA] interface vlan-interface 100

[DeviceA-Vlan-interface100] ip address 100.1.1.100 255.255.255.0

[DeviceA-Vlan-interface100] mac-address 0000-0010-0010

# 配置接口Vlan-interface100的IPv6地址和Link-local地址,使其作为IPv6双活网关,IPv6地址为100::100,Link-local地址为FE80::80。

[DeviceA] interface vlan-interface 100

[DeviceA-Vlan-interface100] ipv6 address 100::100 64

[DeviceA-Vlan-interface100] ipv6 address FE80::80 link-local

# 配置Vlan-interface100接口为DRNI保留接口。

[DeviceA] drni mad exclude interface vlan-interface100

# 创建接口Vlan-interface101,并配置其IPv4和IPv6地址,用于DR设备间三层互通。

[DeviceA] interface vlan-interface 101

[DeviceA-Vlan-interface101] ip address 101.1.1.1 255.255.255.0

[DeviceA-Vlan-interface101] ipv6 address 101::1 64

[DeviceA-Vlan-interface101] quit

# 配置Vlan-interface101接口为DRNI保留接口。

[DeviceA] drni mad exclude interface vlan-interface101

# 配置Router ID为3.3.3.3。

[DeviceA] router id 3.3.3.3

# 配置OSPF,配置VLAN 100、VLAN 101接口使能OSPF,VLAN 100接口在OSPF中静默,实现DR设备间IPv4网络互通。

[DeviceA] ospf 1

[DeviceA-ospf-1] silent-interface vlan-interface 100

[DeviceA-ospf-1] import-route direct

[DeviceA-ospf-1] area 0

[DeviceA-ospf-1-area-0.0.0.0] quit

[DeviceA-ospf-1] quit

[DeviceA] interface vlan-interface 100

[DeviceA-Vlan-interface100] ospf 1 area 0.0.0.0

[DeviceA-Vlan-interface100] quit

[DeviceA] interface vlan-interface 101

[DeviceA-Vlan-interface101] ospf 1 area 0.0.0.0

[DeviceA-Vlan-interface101] quit

# 配置OSPFv3,配置VLAN 100、VLAN 101接口使能OSPFv3,VLAN 100接口在OSPFv3中静默,实现DR设备间IPv6网络互通。

[DeviceA] ospfv3 1

[DeviceA-ospfv3-1] silent-interface vlan-interface 100

[DeviceA-ospfv3-1] import-route direct

[DeviceA-ospfv3-1] area 0

[DeviceA-ospfv3-1-area-0.0.0.0] quit

[DeviceA-ospfv3-1] quit

[DeviceA] interface vlan-interface 100

[DeviceA-Vlan-interface100] ospfv3 1 area 0.0.0.0

[DeviceA-Vlan-interface100] quit

[DeviceA] interface vlan-interface 101

[DeviceA-Vlan-interface101] ospfv3 1 area 0.0.0.0

[DeviceA-Vlan-interface101] quit

# 创建VLAN 32,配置DR上行口HundredGigE1/0/6属于VLAN 32。

[DeviceA] vlan 32

[DeviceA-vlan32] quit

[DeviceA] interface hundredgige 1/0/6

[DeviceA-HundredGigE1/0/6] port link-type trunk

[DeviceA-HundredGigE1/0/6] port trunk permit vlan 32

[DeviceA-HundredGigE1/0/6] undo port trunk permit vlan 1

[DeviceA-HundredGigE1/0/6] quit

# 创建VLAN 32接口,配置VLAN 32接口的IPv4地址和IPv6地址,并使能该接口的OSPF和OSPFv3功能。

[DeviceA] interface vlan-interface 32

[DeviceA-Vlan-interface32] ip address 32.1.1.1 255.255.255.0

[DeviceA-Vlan-interface32] ipv6 address 32::1 64

[DeviceA-Vlan-interface32] ospf 1 area 0

[DeviceA-Vlan-interface32] ospfv3 1 area 0

[DeviceA-Vlan-interface32] quit

6.5.2  配置Device B

# 配置DRNI系统参数。

<DeviceB> system-view

[DeviceB] drni system-mac 0002-0002-0002

[DeviceB] drni system-number 2

[DeviceB] drni system-priority 123

# 配置Keepalive报文的目的IP地址和源IP地址。

[DeviceB] drni keepalive ip destination 21.1.1.1 source 21.1.1.2

# 配置端口HundredGigE1/0/5工作在三层模式,并配置IP地址为Keepalive报文的源IP地址。

[DeviceB] interface hundredgige 1/0/5

[DeviceB-HundredGigE1/0/5] port link-mode route

[DeviceB-HundredGigE1/0/5] ip address 21.1.1.2 255.255.255.0

[DeviceB-HundredGigE1/0/5] ipv6 address 21::2 64

[DeviceB-HundredGigE1/0/5] quit

# 配置Keepalive链路接口为保留接口。

[DeviceB] drni mad exclude interface hundredgige 1/0/5

# 创建动态二层聚合接口1。

[DeviceB] interface bridge-aggregation 1

[DeviceB-Bridge-Aggregation1] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation1] quit

# 分别将端口HundredGigE1/0/3和HundredGigE1/0/4加入到聚合组1中。

[DeviceB] interface hundredgige 1/0/3

[DeviceB-HundredGigE1/0/3] port link-aggregation group 1

[DeviceB-HundredGigE1/0/3] quit

[DeviceB] interface hundredgige 1/0/4

[DeviceB-HundredGigE1/0/4] port link-aggregation group 1

[DeviceB-HundredGigE1/0/4] quit

# 将二层聚合接口1配置为IPP口。

[DeviceB] interface bridge-aggregation 1

[DeviceB-Bridge-Aggregation1] port drni intra-portal-port 1

[DeviceB-Bridge-Aggregation1] undo port trunk permit vlan 1

[DeviceB-Bridge-Aggregation1] quit

# 创建动态二层聚合接口3,并配置该接口为DR口1。

[DeviceB] interface bridge-aggregation 3

[DeviceB-Bridge-Aggregation3] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation3] port drni group 1

[DeviceB-Bridge-Aggregation3] quit

# 将端口HundredGigE1/0/1和HundredGigE1/0/2加入到聚合组3中。

[DeviceB] interface hundredgige 1/0/1

[DeviceB-HundredGigE1/0/1] port link-aggregation group 3

[DeviceB-HundredGigE1/0/1] quit

[DeviceB] interface hundredgige 1/0/2

[DeviceB-HundredGigE1/0/2] port link-aggregation group 3

[DeviceB-HundredGigE1/0/2] quit

# 创建VLAN 100、101。

[DeviceB] vlan 100

[DeviceB-vlan100] quit

[DeviceB] vlan 101

[DeviceB-vlan101] quit

# 配置二层聚合接口3为Trunk端口,并允许VLAN 100的报文通过。

[DeviceB] interface bridge-aggregation 3

[DeviceB-Bridge-Aggregation3] port link-type trunk

[DeviceB-Bridge-Aggregation3] port trunk permit vlan 100

[DeviceB-Bridge-Aggregation3] undo port trunk permit vlan 1

[DeviceB-Bridge-Aggregation3] quit

# 配置接口Vlan-interface100的IPv4地址和MAC地址,使其作为IPv4双活网关,IPv4地址为100.1.1.100,MAC地址为0000-0010-0010。

[DeviceB] interface vlan-interface 100

[DeviceB-Vlan-interface100] ip address 100.1.1.100 255.255.255.0

[DeviceB-Vlan-interface100] mac-address 0000-0010-0010

# 配置接口Vlan-interface100的IPv6地址和Link-local地址,使其作为IPv6双活网关,IPv6地址为100::100,Link-local地址为FE80::80。

[DeviceB] interface vlan-interface 100

[DeviceB-Vlan-interface100] ipv6 address 100::100 64

[DeviceB-Vlan-interface100] ipv6 address FE80::80 link-local

# 配置Vlan-interface100接口为DRNI保留接口。

[DeviceB] drni mad exclude interface vlan-interface100

# 创建接口Vlan-interface101,并配置其IPv4和IPv6地址,用于DR设备间三层互通。

[DeviceB] interface vlan-interface 101

[DeviceB-vlan-interface101] ip address 101.1.1.2 24

[DeviceB-vlan-interface101] ipv6 address 101::2 64

[DeviceB-vlan-interface101] quit

# 配置Vlan-interface101接口为DRNI保留接口。

[DeviceB] drni mad exclude interface vlan-interface101

# 配置Router ID为4.4.4.4。

[DeviceB] router id 4.4.4.4

# 配置OSPF,配置VLAN 100、VLAN 101接口使能OSPF,VLAN 100接口在OSPF中静默,实现DR设备间IPv4网络互通。

[DeviceB] ospf 1

[DeviceB-ospf-1] silent-interface vlan-interface100

[DeviceB-ospf-1] import-route direct

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

[DeviceB] interface vlan-interface 100

[DeviceB-Vlan-interface100] ospf 1 area 0.0.0.0

[DeviceB-Vlan-interface100] quit

[DeviceB] interface vlan-interface 101

[DeviceB-Vlan-interface101] ospf 1 area 0.0.0.0

[DeviceB-Vlan-interface101] quit

# 配置OSPFv3,配置VLAN 100、VLAN 101接口使能OSPFv3,VLAN 100接口在OSPFv3中静默,实现DR设备间IPv6网络互通。

[DeviceB] ospfv3 1

[DeviceB-ospf-1] silent-interface vlan-interface100

[DeviceB-ospfv3-1] import-route direct

[DeviceB-ospfv3-1] area 0

[DeviceB-ospfv3-1-area-0.0.0.0] quit

[DeviceB-ospfv3-1] quit

[DeviceB] interface vlan-interface 100

[DeviceB-vlan-interface100] ospfv3 1 area 0

[DeviceB-vlan-interface100] quit

[DeviceB] interface vlan-interface 101

[DeviceB-vlan-interface101] ospfv3 1 area 0

[DeviceB-vlan-interface101] quit

# 创建VLAN 33,配置DR上行口HundredGigE1/0/6属于VLAN 33。

[DeviceB] vlan 33

[DeviceB-vlan33] quit

[DeviceB] interface hundredgige 1/0/6

[DeviceB-HundredGigE1/0/6] port link-type trunk

[DeviceB-HundredGigE1/0/6] port trunk permit vlan 33

[DeviceB-HundredGigE1/0/6] undo port trunk permit vlan 1

[DeviceB-HundredGigE1/0/6] quit

# 创建VLAN 33接口,配置VLAN 33接口的IPv4地址和IPv6地址,并使能该接口的OSPF和OSPFv3功能。

[DeviceB] interface vlan-interface 33

[DeviceB-Vlan-interface33] ip address 33.1.1.1 255.255.255.0

[DeviceB-Vlan-interface33] ipv6 address 33::1 64

[DeviceB-Vlan-interface33] ospf 1 area 0

[DeviceB-Vlan-interface33] ospfv3 1 area 0

[DeviceB-Vlan-interface33] quit

6.5.3  配置Device C

# 创建VLAN 32,将Device C连接Device A的接口HundredGigE1/0/1加入VLAN 32,并配置VLAN接口32的IPv4地址和IPv6地址。

<DeviceC> system-view

[DeviceC] vlan 32

[DeviceC-vlan32] quit

[DeviceC] interface hundredgige 1/0/1

[DeviceC-HundredGigE1/0/1] port link-type trunk

[DeviceC-HundredGigE1/0/1] port trunk permit vlan 32

[DeviceC-HundredGigE1/0/1] undo port trunk permit vlan 1

[DeviceC-HundredGigE1/0/] quit

[DeviceC] interface vlan-interface 32

[DeviceC-Vlan-interface32] ip address 32.1.1.2 24

[DeviceC-Vlan-interface32] ipv6 address 32::2 64

[DeviceC-Vlan-interface32] quit

# 创建VLAN 33,将Device C连接Device B的接口HundredGigE1/0/2加入VLAN 33,并配置VLAN接口33的IPv4地址和IPv6地址。

[DeviceC] vlan 33

[DeviceC-vlan33] quit

[DeviceC] interface hundredgige 1/0/2

[DeviceC-HundredGigE1/0/2] port link-type trunk

[DeviceC-HundredGigE1/0/2] port trunk permit vlan 33

[DeviceC-HundredGigE1/0/2] undo port trunk permit vlan 1

[DeviceC-HundredGigE1/0/2] quit

[DeviceC] interface vlan-interface 33

[DeviceC-Vlan-interface33] ip address 33.1.1.2 24

[DeviceC-Vlan-interface33] ipv6 address 33::2 64

[DeviceC-Vlan-interface33] quit

# 配置Router ID为5.5.5.5。

[DeviceC] router id 5.5.5.5

# 配置VLAN 32接口和VLAN 33接口使能OSPF功能。

[DeviceC] ospf 1

[DeviceC-ospf-1] import-route direct

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

[DeviceC] interface vlan-interface 32

[DeviceC-Vlan-interface32] ospf 1 area 0

[DeviceC-Vlan-interface32] quit

[DeviceC] interface vlan-interface 33

[DeviceC-Vlan-interface33] ospf 1 area 0

[DeviceC-Vlan-interface33] quit

# 配置VLAN 32接口和VLAN 33接口使能OSPFv3功能。

[DeviceC] ospfv3 1

[DeviceC-ospfv3-1] import-route direct

[DeviceC-ospfv3-1] area 0

[DeviceC-ospfv3-1-area-0.0.0.0] quit

[DeviceC-ospfv3-1] quit

[DeviceC] interface vlan-interface 32

[DeviceC-Vlan-interface32] ospfv3 1 area 0

[DeviceC-Vlan-interface32] quit

[DeviceC] interface vlan-interface 33

[DeviceC-Vlan-interface33] ospfv3 1 area 0

[DeviceC-Vlan-interface33] quit

# 创建VLAN 22,配置与Network1网络连接的接口HundredGigE1/0/3加入VLAN 22,并配置VLAN 22接口的IPv4地址和IPv6地址。

[DeviceC] vlan 22

[DeviceC-vlan22] quit

[DeviceC] interface hundredgige 1/0/3

[DeviceC-HundredGigE1/0/3] port link-type trunk

[DeviceC-HundredGigE1/0/3] port trunk permit vlan 22

[DeviceC-HundredGigE1/0/3] undo port trunk permit vlan 1

[DeviceC-HundredGigE1/0/3] quit

[DeviceC] interface vlan-interface 22

[DeviceC-Vlan-interface22] ip address 22.1.1.1 24

[DeviceC-Vlan-interface22] ipv6 address 22::1 64

[DeviceC-Vlan-interface22] quit

6.5.4  配置Device D

# 创建二层聚合接口3,并配置该接口为动态聚合模式。

<DeviceD> system-view

[DeviceD] interface bridge-aggregation 3

[DeviceD-Bridge-Aggregation3] link-aggregation mode dynamic

[DeviceD-Bridge-Aggregation3] quit

# 将端口HundredGigE 1/0/1~HundredGigE 1/0/4加入到聚合组3中。

[DeviceD] interface range hundredgige 1/0/1 to hundredgige 1/0/4

[DeviceD-if-range] port link-aggregation group 3

[DeviceD-if-range] quit

# 创建VLAN 100。

[DeviceD] vlan 100

[DeviceD-vlan100] quit

# 配置二层聚合接口3为Trunk端口,并允许VLAN 100的报文通过。

[DeviceD] interface bridge-aggregation 3

[DeviceD-Bridge-Aggregation3] port link-type trunk

[DeviceD-Bridge-Aggregation3] port trunk permit vlan 100

[DeviceD-Bridge-Aggregation3] undo port trunk permit vlan 1

[DeviceD-Bridge-Aggregation3] quit

6.6  验证配置

1. DRNI系统状态正常

 查看DeviceA和Device B之间DRNI系统状态,DRNI正常建立。以DeviceA为例:

# 显示分布式聚合系统的接口摘要信息。

[DeviceA] display drni summary

Flags: A -- Aggregate interface down, B -- No peer DR interface configured

       C -- Configuration consistency check failed

 

IPP: BAGG1

IPP state (cause): UP

Keepalive link state (cause): UP

 

                     DR interface information

DR interface  DR group  Local state (cause)  Peer state  Remaining down time (s)

BAGG3         1         UP                   UP          -

# 显示分布式聚合Keepalive报文的信息。

[DeviceA] display drni keepalive

Neighbor keepalive link status: Up

Neighbor is alive for: 64765 s 28 ms

Keepalive packet transmission status:

  Sent: Successful

  Received: Successful

Last received keepalive packet information:

  Source IP address: 21.1.1.2

  Time: 2021/01/17 17:10:52

  Action: Accept

 

Distributed relay keepalive parameters:

Destination IP address: 21.1.1.2

Source IP address: 21.1.1.1

Keepalive UDP port : 6400

Keepalive VPN name : N/A

Keepalive interval : 1000 ms

Keepalive timeout  : 5 sec

Keepalive hold time: 3 sec

# 显示分布式聚合系统信息。

<Sysname> display drni system

                     System information

Local system number: 1                      Peer system number: 2

Local system MAC: 0002-0002-0002            Peer system MAC: 0002-0002-0002

Local system priority: 123                  Peer system priority: 123

Local bridge MAC: 3cd4-3ce1-0200            Peer bridge MAC: 3cd4-437d-0300

Local effective role: Primary               Peer effective role: Secondary

Health level: 0

Standalone mode on split: Disabled

In standalone mode: No

 

                     System timer information

Timer                      State       Value (s)    Remaining time (s)

Auto recovery              Disabled    -            -

Restore delay              Disabled    30           -

Consistency-check delay    Disabled    15           -

Standalone delay           Disabled    -            -

Role to None delay         Disabled    60           -

# 显示分布式聚合系统的接口详细信息。

[DeviceA] display drni verbose

Flags: A -- Home_Gateway, B -- Neighbor_Gateway, C -- Other_Gateway,

       D -- IPP_Activity, E -- DRCP_Timeout, F -- Gateway_Sync,

       G -- Port_Sync, H -- Expired

 

IPP/IPP ID: BAGG1/1

State: UP

Cause: -

Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG

Local Selected ports (index): HGE1/0/3 (27), HGE1/0/4 (32)

Peer Selected ports indexes: 125, 130

 

DR interface/DR group ID: BAGG3/1

Local DR interface state: UP

Peer DR interface state: UP

DR group state: UP

Local DR interface down cause: -

Remaining DRNI DOWN time: -

Local DR interface LACP MAC: Config=N/A, Effective=0002-0002-0002

Peer DR interface LACP MAC: Config=N/A, Effective=0002-0002-0002

Local DR interface LACP priority: Config=32768, Effective=123

Peer DR interface LACP priority: Config=32768, Effective=123

Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG

Local Selected ports (index): HGE1/0/1 (12), HGE1/0/2 (13)

Peer Selected ports indexes: 56, 57

2. 路由协议正常

# 查看Device  A上OSPF邻居信息。

[DeviceA] display ospf peer

 

         OSPF Process 1 with Router ID 3.3.3.3

               Neighbor Brief Information

 

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 4.4.4.4         101.1.1.2       1   36         Full/DR           Vlan101

 5.5.5.5         32.1.1.2        1   38         Full/DR           Vlan32

# 查看Device A上OSPFv3邻居信息。

[DeviceA] display ospfv3 peer

 

               OSPFv3 Process 1 with Router ID 3.3.3.3

 

 Area: 0.0.0.0

-------------------------------------------------------------------------

 Router ID       Pri State             Dead-Time InstID Interface

 4.4.4.4         1   Full/DR           00:00:36  0      Vlan101

 5.5.5.5         1   Full/DR           00:00:35  0      Vlan32

# 查看Device B上OSPF邻居信息。

[DeviceB] display ospf peer

 

         OSPF Process 1 with Router ID 4.4.4.4

               Neighbor Brief Information

 

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 3.3.3.3         101.1.1.1       1   32         Full/BDR          Vlan101

 5.5.5.5         33.1.1.2        1   33         Full/DR           Vlan33

# 查看Device B上OSPFv3邻居信息。

[DeviceB] display ospfv3 peer

 

               OSPFv3 Process 1 with Router ID 4.4.4.4

 

 Area: 0.0.0.0

-------------------------------------------------------------------------

 Router ID       Pri State             Dead-Time InstID Interface

 3.3.3.3         1   Full/BDR          00:00:35  0      Vlan101

 5.5.5.5         1   Full/DR           00:00:38  0      Vlan33

# 在Device C上查看OSPF邻居信息。

[DeviceC] display ospf peer

 

         OSPF Process 1 with Router ID 5.5.5.5

               Neighbor Brief Information

 

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 3.3.3.3         32.1.1.1        1   32         Full/DR           Vlan32

 4.4.4.4         33.1.1.1        1   38         Full/DR           Vlan33

# 在Device C上查看OSPFv3邻居信息。

[DeviceC] display ospfv3 peer

 

               OSPFv3 Process 1 with Router ID 5.5.5.5

 

 Area: 0.0.0.0

-------------------------------------------------------------------------

 Router ID       Pri State             Dead-Time InstID Interface

 3.3.3.3         1   Full/DR           00:00:37  0      Vlan32

 4.4.4.4         1   Full/DR           00:00:34  0      Vlan33

3. Server 1和Server 2可以与Network 1互通

Server 1和Server 2可以与Network 1 IPv4、IPv6互通。

4. Device A或Device B的上行接口故障时,Server 1和Server 2仍然可以与Network 1通信

断开Device A连接Device C的接口,Server 1和Server 2仍然可以与Network 1通信(流量切换过程中有短暂丢包)。

6.7  配置文件

·     Device A:

#

 router id 3.3.3.3

#

ospf 1

 import-route direct

 silent-interface Vlan-interface100

 area 0.0.0.0

#

ospfv3 1

 import-route direct

 silent-interface Vlan-interface100

 area 0.0.0.0

#

vlan 1

#

vlan 32

#

vlan 100 to 101

#

interface Bridge-Aggregation1

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 2 to 4094

 link-aggregation mode dynamic

 port drni intra-portal-port 1

#

interface Bridge-Aggregation3

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 link-aggregation mode dynamic

 port drni group 1

#

interface Vlan-interface32

 ip address 32.1.1.1 255.255.255.0

 ospf 1 area 0.0.0.0

 ospfv3 1 area 0.0.0.0

 ipv6 address 32::1/64

#

interface Vlan-interface100

 ip address 100.1.1.100 255.255.255.0

 ospf 1 area 0.0.0.0

 ospfv3 1 area 0.0.0.0

 mac-address 0000-0010-0010

 ipv6 address FE80::80 link-local

 ipv6 address 100::100/64

#

interface Vlan-interface101

 ip address 101.1.1.1 255.255.255.0

 ospf 1 area 0.0.0.0

 ospfv3 1 area 0.0.0.0

 ipv6 address 101::1/64

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 combo enable fiber

 port link-aggregation group 3

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 combo enable fiber

 port link-aggregation group 3

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 2 to 4094

 port link-aggregation group 1

#

interface HundredGigE1/0/4

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 2 to 4094

 port link-aggregation group 1

#

interface HundredGigE1/0/5

 port link-mode route

 ip address 21.1.1.1 255.255.255.0

 ipv6 address 21::1/64

#

interface HundredGigE1/0/6

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 32

#

 drni system-mac 0002-0002-0002

 drni system-number 1

 drni system-priority 123

 drni keepalive ip destination 21.1.1.2 source 21.1.1.1

 drni mad exclude interface HundredGigE2/0/19

 drni mad exclude interface Vlan-interface100

 drni mad exclude interface Vlan-interface101

#

·     Device B:

#

 router id 4.4.4.4

#

ospf 1

 import-route direct

 silent-interface Vlan-interface100

 area 0.0.0.0

#

ospfv3 1

 import-route direct

 silent-interface Vlan-interface100

 area 0.0.0.0

#

vlan 1

#

vlan 33

#

vlan 100 to 101

#

interface Bridge-Aggregation1

 port link-type trunk

 port trunk permit vlan all

 link-aggregation mode dynamic

 port drni intra-portal-port 1

#

interface Bridge-Aggregation3

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 link-aggregation mode dynamic

 port drni group 1

#

interface Vlan-interface33

 ip address 33.1.1.1 255.255.255.0

 ospf 1 area 0.0.0.0

 ospfv3 1 area 0.0.0.0

 ipv6 address 33::1/64

#

interface Vlan-interface100

 ip address 100.1.1.100 255.255.255.0

 ospf 1 area 0.0.0.0

 ospfv3 1 area 0.0.0.0

 mac-address 0000-0010-0010

 ipv6 address FE80::80 link-local

 ipv6 address 100::100/64

#

interface Vlan-interface101

 ip address 101.1.1.2 255.255.255.0

 ospf 1 area 0.0.0.0

 ospfv3 1 area 0.0.0.0

 ipv6 address 101::2/64

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 combo enable fiber

 port link-aggregation group 3

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 combo enable fiber

 port link-aggregation group 3

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan all

 port link-aggregation group 1

#

interface HundredGigE1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan all

 port link-aggregation group 1

#

interface HundredGigE1/0/5

 port link-mode route

 ip address 21.1.1.2 255.255.255.0

 ipv6 address 21::2/64

#

interface HundredGigE1/0/6

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 33

#

 drni system-mac 0002-0002-0002

 drni system-number 2

 drni system-priority 123

 drni keepalive ip destination 21.1.1.1 source 21.1.1.2

 drni mad exclude interface HundredGigE2/0/19

 drni mad exclude interface Vlan-interface100

 drni mad exclude interface Vlan-interface101

#

·     Device C:

#

 router id 5.5.5.5

#

ospf 1

 import-route direct

 area 0.0.0.0

#

ospfv3 1

 import-route direct

 area 0.0.0.0

#

vlan 1

#

vlan 22

#

vlan 32 to 33

#

interface Vlan-interface22

 ip address 22.1.1.1 255.255.255.0

 ipv6 address 22::1/64

#

interface Vlan-interface32

 ip address 32.1.1.1 255.255.255.0

 ospf 1 area 0.0.0.0

 ospfv3 1 area 0.0.0.0

 ipv6 address 32::2/64

#

interface Vlan-interface33

 ip address 33.1.1.2 255.255.255.0

 ospf 1 area 0.0.0.0

 ospfv3 1 area 0.0.0.0

 ipv6 address 33::2/64

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 32

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 33

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 22

#

·     Device D:

#

vlan 1

#

vlan 100

#

interface Bridge-Aggregation3

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 link-aggregation mode dynamic

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 port link-aggregation group 3

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 port link-aggregation group 3

#

interface HundredGigE1/0/3

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 port link-aggregation group 3

#

interface HundredGigE1/0/4

 port link-mode bridge

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

 port link-aggregation group 3

#

7  相关资料

请参考对应产品和版本的如下手册:

·     二层技术-以太网交换配置指导

·     二层技术-以太网交换命令参考

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

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

新华三官网
联系我们