06
2024
06
11:43:21

H3C S6860系列以太网交换机 典型配置举例-Release 26xx系列-6W100

https://www.h3c.com/cn/d_201811/1127675_30005_0.htm


1  简介

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

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

2  配置前提

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

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

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

3.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

XGE1/0/5

1.1.1.1/24

Device B

XGE1/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




 

3.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配置较高的优先级。

3.3  使用版本

本举例是在S6860-CMW710-R2612版本上进行配置和验证的。

3.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地址配置为同一网段,否则可能导致局域网内的主机无法访问外部网络。

3.5  配置步骤

3.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

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

[DeviceA] interface ten-gigabitethernet 1/0/5

[DeviceA-Ten-GigabitEthernet1/0/5] port link-mode route

[DeviceA-Ten-GigabitEthernet1/0/5] ip address 1.1.1.1 24

[DeviceA-Ten-GigabitEthernet1/0/5] quit

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

[DeviceA] drni mad exclude interface ten-gigabitethernet 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

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

[DeviceA] interface ten-gigabitethernet 1/0/6

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

[DeviceA-Ten-GigabitEthernet1/0/6] quit

[DeviceA] interface ten-gigabitethernet 1/0/7

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

[DeviceA-Ten-GigabitEthernet1/0/7] quit

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

[DeviceA] interface bridge-aggregation 1

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

Configuring Ten-GigabitEthernet1/0/6 done.

Configuring Ten-GigabitEthernet1/0/7 done.

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

Configuring Ten-GigabitEthernet1/0/6 done.

Configuring Ten-GigabitEthernet1/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

# 分别将端口Ten-GigabitEthernet1/0/3和Ten-GigabitEthernet1/0/4加入到聚合组3中。

[DeviceA] interface ten-gigabitethernet 1/0/3

[DeviceA-Ten-GigabitEthernet1/0/3] port link-aggregation group 3

[DeviceA-Ten-GigabitEthernet1/0/3] quit

[DeviceA] interface ten-gigabitethernet 1/0/4

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

[DeviceA-Ten-GigabitEthernet1/0/4] quit

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

[DeviceA] interface bridge-aggregation 3

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

Configuring Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/0/4 done.

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

Configuring Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/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

# 分别将端口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2加入到聚合组4中。

[DeviceA] interface ten-gigabitethernet 1/0/1

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

[DeviceA-Ten-GigabitEthernet1/0/1] quit

[DeviceA] interface ten-gigabitethernet 1/0/2

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

[DeviceA-Ten-GigabitEthernet1/0/2] quit

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

[DeviceA] interface bridge-aggregation 4

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

[DeviceA-Bridge-Aggregation4] quit

3.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

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

[DeviceB] interface ten-gigabitethernet 1/0/5

[DeviceB-Ten-GigabitEthernet1/0/5] port link-mode route

[DeviceB-Ten-GigabitEthernet1/0/5] ip address 1.1.1.2 24

[DeviceB-Ten-GigabitEthernet1/0/5] quit

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

[DeviceB] drni mad exclude interface ten-gigabitethernet 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

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

[DeviceB] interface ten-gigabitethernet 1/0/6

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

[DeviceB-Ten-GigabitEthernet1/0/6] quit

[DeviceB] interface ten-gigabitethernet 1/0/7

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

[DeviceB-Ten-GigabitEthernet1/0/7] quit

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

[DeviceB] interface bridge-aggregation 2

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

Configuring Ten-GigabitEthernet1/0/6 done.

Configuring Ten-GigabitEthernet1/0/7 done.

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

Configuring Ten-GigabitEthernet1/0/6 done.

Configuring Ten-GigabitEthernet1/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

# 分别将端口Ten-GigabitEthernet1/0/3和Ten-GigabitEthernet1/0/4加入到聚合组3中。

[DeviceB] interface ten-gigabitethernet 1/0/3

[DeviceB-Ten-GigabitEthernet1/0/3] port link-aggregation group 3

[DeviceB-Ten-GigabitEthernet1/0/3] quit

[DeviceB] interface ten-gigabitethernet 1/0/4

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

[DeviceB-Ten-GigabitEthernet1/0/4] quit

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

[DeviceB] interface bridge-aggregation 3

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

Configuring Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/0/4 done.

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

Configuring Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/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

# 分别将端口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2加入到聚合组4中。

[DeviceB] interface ten-gigabitethernet 1/0/1

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

[DeviceB-Ten-GigabitEthernet1/0/1] quit

[DeviceB] interface ten-gigabitethernet 1/0/2

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

[DeviceB-Ten-GigabitEthernet1/0/2] quit

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

[DeviceB] interface bridge-aggregation 4

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

[DeviceB-Bridge-Aggregation4] quit

3.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

# 将Ten-GigabitEthernet1/0/3加入VLAN 100。

[DeviceC] vlan 100

[DeviceC-vlan100] port ten-gigabitethernet 1/0/3

[DeviceC-vlan100] quit

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

[DeviceC] interface bridge-aggregation 1

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

[DeviceC-Bridge-Aggregation1] quit

# 将端口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2加入到聚合组1中。

[DeviceC] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 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 Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/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负责转发流量。

[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

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

[DeviceC] track 1 interface ten-gigabitethernet 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

3.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

# 将Ten-GigabitEthernet1/0/3加入VLAN 200。

[DeviceD] vlan 200

[DeviceD-vlan200] port ten-gigabitethernet 1/0/3

[DeviceD-vlan200] quit

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

[DeviceD] interface bridge-aggregation 2

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

[DeviceD-Bridge-Aggregation2] quit

# 将端口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2加入到聚合组2中。

[DeviceD] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 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 Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/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负责转发流量。

[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

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

[DeviceD] track 2 interface ten-gigabitethernet 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

3.5.5  配置Device E

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

<DeviceE> system-view

[DeviceE] vlan 100

[DeviceE-vlan100] port ten-gigabitethernet 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,并将接口Ten-GigabitEthernet1/0/2加入该VLAN。

[DeviceE] vlan 200

[DeviceE-vlan200] port ten-gigabitethernet 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,并将接口Ten-GigabitEthernet1/0/3加入该VLAN。

[DeviceE] vlan 30

[DeviceE-vlan30] port ten-gigabitethernet 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

3.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

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

[DeviceF] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 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 Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

Configuring Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/0/4 done.

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

Configuring Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/0/4 done.

[DeviceF-Bridge-Aggregation4] quit

3.6  验证配置

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

[DeviceA] display drni summary

Global consistency check           : SUCCESS

Inconsistent type 1 global settings: -

 

IPP             IPP ID        State

BAGG3           1             UP

 

DR interface    DR group ID   State    Check result   Type 1 inconsistency

BAGG4           4             UP       SUCCESS        -

[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

Local state/Peer state: ABDFG/ABDFG

Local Selected ports Index: 2, 5

Peer Selected ports Index: 2, 5

 

DR interface/DR group ID: BAGG4/4

State: UP

Local state/Peer state: ABDFG/ABDFG

Local Selected ports Index: 16385, 16388

Peer Selected ports Index: 32769, 32772

# 在Device F上分别查看聚合组的详细信息。可以看到Device F的端口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/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

Aggregation Mode: Dynamic

Loadsharing Type: Shar

Management VLANs: None

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

Local:

  Port                Status   Priority Index    Oper-Key               Flag

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

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

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

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

Remote:

  Actor               Priority Index    Oper-Key SystemID               Flag

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

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

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

  XGE1/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

3.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 Ten-GigabitEthernet1/0/5

 port link-mode route

 ip address 1.1.1.1 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 3

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 3

#

interface Ten-GigabitEthernet1/0/6

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 1

#

interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/5

 port link-mode route

 ip address 1.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 3

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 3

#

interface Ten-GigabitEthernet1/0/6

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 2

#

interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 1

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 1

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 100

#

 track 1 interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 2

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 2

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 200

#

 track 2 interface Ten-GigabitEthernet1/0/3

#

·     Device E:

#

ospf 1

 area 0.0.0.0

  network 3.3.3.3 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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 100

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 200

#

interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 10 20

 port link-aggregation group 4

#

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

4.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

XGE1/0/5

1.1.1.1/24

Device B

XGE1/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




 

4.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配置较高的优先级。

4.3  使用版本

本举例是在S6860-CMW710-R2612版本上进行配置和验证的。

4.4  配置注意事项

配置DRNI时,需要注意:

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

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

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

配置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

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

[DeviceA] interface ten-gigabitethernet 1/0/5

[DeviceA-Ten-GigabitEthernet1/0/5] port link-mode route

[DeviceA-Ten-GigabitEthernet1/0/5] ip address 1.1.1.1 24

[DeviceA-Ten-GigabitEthernet1/0/5] quit

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

[DeviceA] drni mad exclude interface ten-gigabitethernet 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

# 分别将端口Ten-GigabitEthernet1/0/3和Ten-GigabitEthernet1/0/4加入到聚合组125中。

[DeviceA] interface ten-gigabitethernet 1/0/3

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

[DeviceA-Ten-GigabitEthernet1/0/3] quit

[DeviceA] interface ten-gigabitethernet 1/0/4

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

[DeviceA-Ten-GigabitEthernet1/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

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

[DeviceA] interface ten-gigabitethernet 1/0/1

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

[DeviceA-Ten-GigabitEthernet1/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

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

[DeviceA] interface ten-gigabitethernet 1/0/2

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

[DeviceA-Ten-GigabitEthernet1/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

# 将端口Ten-GigabitEthernet1/0/6加入VLAN 10。

[DeviceA] vlan 10

[DeviceA-vlan10] port ten-gigabitethernet 1/0/6

[DeviceA-vlan10] quit

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

[DeviceA] interface bridge-aggregation 100

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

Configuring Ten-GigabitEthernet1/0/1 done.

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

Configuring Ten-GigabitEthernet1/0/1 done.

[DeviceA-Bridge-Aggregation100] quit

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

[DeviceA] interface bridge-aggregation 101

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

Configuring Ten-GigabitEthernet1/0/2 done.

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

Configuring Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/0/4 done.

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

Configuring Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/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负责转发流量。

[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

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

[DeviceA] track 1 interface ten-gigabitethernet 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

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

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

[DeviceB] interface ten-gigabitethernet 1/0/5

[DeviceB-Ten-GigabitEthernet1/0/5] port link-mode route

[DeviceB-Ten-GigabitEthernet1/0/5] ip address 1.1.1.2 24

[DeviceB-Ten-GigabitEthernet1/0/5] quit

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

[DeviceB] drni mad exclude interface ten-gigabitethernet 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

# 分别将端口Ten-GigabitEthernet1/0/3和Ten-GigabitEthernet1/0/4加入到聚合组125中。

[DeviceB] interface ten-gigabitethernet 1/0/3

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

[DeviceB-Ten-GigabitEthernet1/0/3] quit

[DeviceB] interface ten-gigabitethernet 1/0/4

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

[DeviceB-Ten-GigabitEthernet1/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

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

[DeviceB] interface ten-gigabitethernet 1/0/2

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

[DeviceB-Ten-GigabitEthernet1/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

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

[DeviceB] interface ten-gigabitethernet 1/0/1

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

[DeviceB-Ten-GigabitEthernet1/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

# 将端口Ten-GigabitEthernet1/0/6加入VLAN 20。

[DeviceB] vlan 20

[DeviceB-vlan20] port ten-gigabitethernet 1/0/6

[DeviceB-vlan20] quit

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

[DeviceB] interface bridge-aggregation 100

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

Configuring Ten-GigabitEthernet1/0/2 done.

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

Configuring Ten-GigabitEthernet1/0/2 done.

[DeviceB-Bridge-Aggregation100] quit

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

[DeviceB] interface bridge-aggregation 101

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

Configuring Ten-GigabitEthernet1/0/1 done.

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

Configuring Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/0/4 done.

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

Configuring Ten-GigabitEthernet1/0/3 done.

Configuring Ten-GigabitEthernet1/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负责转发流量。

[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

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

[DeviceB] track 2 interface ten-gigabitethernet 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

4.5.3  配置Device C

# 创建VLAN 100。

[DeviceC] vlan 100

[DeviceC-vlan100] quit

# 将端口Ten-GigabitEthernet1/0/3加入VLAN 100。

[DeviceC] interface ten-gigabitethernet 1/0/3

[DeviceC-Ten-GigabitEthernet1/0/3] port access vlan 100

[DeviceC-Ten-GigabitEthernet1/0/3] quit

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

<DeviceC> system-view

[DeviceC] interface bridge-aggregation 100

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

[DeviceC-Bridge-Aggregation100] quit

# 分别将端口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2加入到聚合组100中。

[DeviceC] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 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 Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

[DeviceC-Bridge-Aggregation100] quit

4.5.4  配置Device D

# 创建VLAN 101。

[DeviceD] vlan 101

[DeviceD-vlan101] quit

# 将端口Ten-GigabitEthernet1/0/3加入VLAN 101。

[DeviceD] interface ten-gigabitethernet 1/0/3

[DeviceD-Ten-GigabitEthernet1/0/3] port access vlan 101

[DeviceD-Ten-GigabitEthernet1/0/3] quit

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

<DeviceD> system-view

[DeviceD] interface bridge-aggregation 101

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

[DeviceD-Bridge-Aggregation101] quit

# 分别将端口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2加入到聚合组101中。

[DeviceD] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 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 Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

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

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

[DeviceD-Bridge-Aggregation101] quit

4.5.5  配置Device E

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

<DeviceE> system-view

[DeviceE] vlan 10

[DeviceE-vlan10] port ten-gigabitethernet 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,并将接口Ten-GigabitEthernet1/0/2加入该VLAN。

[DeviceE] vlan 20

[DeviceE-vlan20] port ten-gigabitethernet 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,并将接口Ten-GigabitEthernet1/0/3加入该VLAN。

[DeviceE] vlan 30

[DeviceE-vlan30] port ten-gigabitethernet 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

4.6  验证配置

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

[DeviceA] display drni summary

Global consistency check           : SUCCESS

Inconsistent type 1 global settings: -

 

IPP             IPP ID        State

BAGG125         1             UP

 

DR interface    DR group ID   State    Check result   Type 1 inconsistency

BAGG100         1             UP       SUCCESS        -

BAGG101         2             UP       SUCCESS        -

[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

Local state/Peer state: ABDFG/ABDFG

Local Selected ports Index: 1, 4

Peer Selected ports Index: 1, 4

 

DR interface/DR group ID: BAGG100/1

State: UP

Local state/Peer state: ABDFG/ABDFG

Local Selected ports Index: 16386

Peer Selected ports Index: 32771

 

DR interface/DR group ID: BAGG101/2

State: UP

Local state/Peer state: ABDFG/ABDFG

Local Selected ports Index: 16387

Peer Selected ports Index: 32772

# 在Device C和Device D上分别查看二层聚合组100和二层聚合组101的详细信息。可以看到Device C和Device D的端口Ten-GigabitEthernet1/0/1、Ten-GigabitEthernet1/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

Aggregation Mode: Dynamic

Loadsharing Type: Shar

Management VLANs: None

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

Local:

  Port                Status   Priority Index    Oper-Key               Flag

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

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

Remote:

  Actor               Priority Index    Oper-Key SystemID               Flag

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

  XGE1/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

Aggregation Mode: Dynamic

Loadsharing Type: Shar

Management VLANs: None

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

Local:

  Port                Status   Priority Index    Oper-Key               Flag

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

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

Remote:

  Actor               Priority Index    Oper-Key SystemID               Flag

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

  XGE1/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

4.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 Ten-GigabitEthernet1/0/5

 port link-mode route

 ip address 1.1.1.1 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

 port link-aggregation group 100

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 101

 port link-aggregation group 101

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 port link-aggregation group 125

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 port link-aggregation group 125

#

interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/5

#

 track 1 interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/5

 port link-mode route

 ip address 1.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 101

 port link-aggregation group 101

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

 port link-aggregation group 100

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 port link-aggregation group 125

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100 to 101

 port link-aggregation group 125

#

interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/5

#

 track 2 interface Ten-GigabitEthernet1/0/6

#

·     Device C:

#

vlan 100

#

interface Bridge-Aggregation100

 port link-type trunk

 port trunk permit vlan 1 100

 link-aggregation mode dynamic

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

 port link-aggregation group 100

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

 port link-aggregation group 100

#

interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 101

 port link-aggregation group 101

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 101

 port link-aggregation group 101

#

interface Ten-GigabitEthernet1/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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 30

#

5  相关资料

·     H3C S6860系列以太网交换机 二层技术-以太网交换配置指导-Release 26xx系列

·     H3C S6860系列以太网交换机 二层技术-以太网交换命令参考-Release 26xx系列




推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

本文链接:https://www.hqyman.cn/post/6532.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:
打赏





休息一下~~


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

请先 登录 再评论,若不是会员请先 注册

您的IP地址是: