网
工
圈
本文档介绍以太网链路聚合特性的配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解以太网链路聚合特性。
如图2所示,接入层和汇聚层都有两台设备,现要求使用链路聚合特性和IRF特性实现以下需求:
图2 以太网链路聚合配置IRF配置组网图
(1) Device A的IRF相关配置
# 关闭GigabitEthernet1/0/1。关于IRF配置的介绍,请参见“IRF配置指导”。
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] shutdown
[DeviceA-GigabitEthernet1/0/1] quit
# 配置IRF端口1/1,并将它与物理端口GigabitEthernet1/0/1绑定。
[DeviceA] irf-port 1/1
[DeviceA-irf-port1/1] port group interface gigabitethernet 1/0/1
You must perform the following tasks for a successful IRF setup:
Save the configuration after completing IRF configuration.
Execute the 'irf-port-configuration active' command to activate the IRF ports.
[DeviceA-irf-port1/1] quit
# 开启GigabitEthernet1/0/1端口,并保存配置。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] undo shutdown
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] save
# 激活IRF端口下的配置。
[DeviceA] irf-port-configuration active
(2) Device B的IRF相关配置
# 将Device B的成员编号配置为2,并重启设备使新编号生效。
<DeviceB> system-view
[DeviceB] irf member 1 renumber 2
Renumbering the member ID may result in configuration change or loss. Continue? [Y/N]:y
[DeviceB] quit
<DeviceB> reboot
# IRF物理端口绑定要求与Device A相同,本例中以GigabitEthernet2/0/1为例,关闭该端口。关于IRF配置的介绍,请参见“IRF配置指导”。
<DeviceB> system-view
[DeviceB] interface gigabitethernet 2/0/1
[DeviceB-GigabitEthernet2/0/1] shutdown
[DeviceB-GigabitEthernet2/0/1] quit
# 配置IRF端口2/2,并将它与物理端口GigabitEthernet2/0/1绑定。
[DeviceB] irf-port 2/2
[DeviceB-irf-port2/2] port group interface gigabitethernet 2/0/1
You must perform the following tasks for a successful IRF setup:
Save the configuration after completing IRF configuration.
Execute the 'irf-port-configuration active' command to activate the IRF ports.
[DeviceB-irf-port2/2] quit
# 开启GigabitEthernet2/0/1端口,并保存配置。
[DeviceB] interface gigabitethernet 2/0/1
[DeviceB-GigabitEthernet2/0/1] undo shutdown
[DeviceB-GigabitEthernet2/0/1] quit
[DeviceB] save
# 激活IRF端口下的配置。
[DeviceB] irf-port-configuration active
# Device A和Device B间将会进行Master竞选,竞选失败的一方将重启,重启完成后,IRF形成。
# 通过display irf命令来显示IRF相关信息,Device A为Master主设备。
[DeviceA] display irf
MemberID Role Priority CPU-Mac Description
* 1 Master 1 00a0-fc00-5801 ---
2 Standby 1 00e0-fc58-1235 ---
--------------------------------------------------
* indicates the device is the master.
indicates the device through which the user logs in.
The bridge MAC of the IRF is: 00a0-fc00-5800
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
Auto merge : yes
(3) Device A的二层动态聚合组相关配置
# 创建二层动态聚合组1。
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation1] quit
# 将GigabitEthernet1/0/9、GigabitEthernet1/0/10、GigabitEthernet2/0/9、GigabitEthernet2/0/10加入该聚合组中。
[DeviceA] interface range gigabitethernet 1/0/9 to gigabitethernet 1/0/10
gigabitethernet 2/0/9 to gigabitethernet 2/0/10
[DeviceA-if-range] port link-aggregation group 1
[DeviceA-if-range] quit
(4) Device A的LACP MAD相关配置
# 设置IRF域编号为1。
[DeviceA] irf domain 1
# 在动态聚合组1上使能LACP MAD检测功能。
[DeviceA] interface Bridge-Aggregation 1
[DeviceA-Bridge-Aggregation1] mad enable
You need to assign a domain ID (range: 0-4294967295)
[Current domain is: 1]:
The assigned domain ID is: 1
MAD LACP only enable on dynamic aggregation interface.
(5) Device C的IRF相关配置
#Device C上的IRF相关配置与Device A完全相同,此处不再赘述。
(6) Device D的IRF相关配置
#Device D上的IRF相关配置与Device B完全相同,此处不再赘述。
#Device C和Device D间将会进行Master竞选,竞选失败的一方将重启,重启完成后,IRF形成,Device C为Master主设备。
(7) Device C的二层动态聚合组相关配置。
#Device C上的二层动态聚合组相关配置与Device A完全相同,此处不再赘述。
(8) Device C的LACP MAD相关配置
# 设置IRF域编号为2。
<DeviceC> system-view
[DeviceC] irf domain 2
# 在动态聚合组1上使能LACP MAD检测功能。
[DeviceC] interface Bridge-Aggregation 1
[DeviceC-Bridge-Aggregation1] mad enable
You need to assign a domain ID (range: 0-4294967295)
[Current domain is: 2]:
The assigned domain ID is: 2
MAD LACP only enable on dynamic aggregation interface.
#在Device A上通过display link-aggregation verbose命令来显示聚合组的相关信息,以验证配置是否成功。
[DeviceA] 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-Aggregation1
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0x8000, 00a0-fc00-5800
Local:
Port Status Priority Index Oper-Key Flag
GE1/0/9(R) S 32768 10 1 {ACG}
GE1/0/10 S 32768 11 1 {ACG}
GE2/0/9 S 32768 138 1 {ACG}
GE2/0/10 S 32768 139 1 {ACG}
Remote:
Actor Priority Index Oper-Key SystemID Flag
GE1/0/9 32768 0 0 0x8000, 0000-0000-0000 {EF}
GE1/0/10 32768 0 0 0x8000, 0000-0000-0000 {EF}
GE2/0/9 32768 0 0 0x8000, 0000-0000-0000 {EF}
GE2/0/10 32768 0 0 0x8000, 0000-0000-0000 {EF}
结果说明:本端和对端设备上聚合组内的成员端口都处于Selected状态。原因是在动态链路聚合中通过LACP协议报文交互,可使两端聚合组内的成员端口选中状态达成一致,可顺利实现对用户数据的转发。
#由于配置了LACP MAD功能,当IRF分裂时,设备会收到相关日志信息,提示IRF分裂原因。
[DeviceA]
%Jul 9 16:52:41:734 2016 DeviceA STM/3/STM_LINK_DOWN: IRF port 1 went down.
%Jul 9 16:52:41:800 2016 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 9 16:52:41:854 2016 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 9 16:52:41:867 2016 DeviceA DEV/3/BOARD_REMOVED: Board was removed from slot 2, type is Simware.
结果说明:因为与IRF端口2/2绑定的GigabitEthernet2/0/1物理端口的物理状态为关闭,造成汇聚层IRF分裂。可通过检查物理连线或者线路故障来解决此问题。
!! 说明 部分交换机的配置文件中会显示port link-mode bridge命令,请以实际情况为准。
· Device A:
#
irf domain 1
irf mac-address persistent timer
irf auto-update enable
irf auto-merge enable
undo irf link-delay
irf member 1 priority 1
irf member 2 priority 1
#
irf-port 1/1
port group interface GigabitEthernet1/0/1
#
irf-port 2/2
port group interface GigabitEthernet2/0/1
#
interface Bridge-Aggregation1
link-aggregation mode dynamic
#
interface GigabitEthernet1/0/9
port link-mode bridge
port link-aggregation group 1
#
interface GigabitEthernet1/0/10
port link-mode bridge
port link-aggregation group 1
#
interface GigabitEthernet2/0/9
port link-mode bridge
port link-aggregation group 1
#
interface GigabitEthernet2/0/10
port link-mode bridge
port link-aggregation group 1
#
· Device C:
Device C上的配置文件与Device A类似。
联系客服