01-H3C_IRF典型配置举例
本章节下载: 01-H3C_IRF典型配置举例 (452.18 KB)
H3C IRF典型配置举例
资料版本:6W100-20190330
产品版本:Release 7577P04
Copyright © 2019 新华三技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。 除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。 并不得以任何形式传播。 |
本文档介绍了配置两台成员设备的IRF、配置四台成员设备的IRF和IRF扩容升级的配置举例。
IRF(Intelligent Resilient Framework,智能弹性架构)是H3C自主研发的软件虚拟化技术,它的核心思想是将多台设备通过物理IRF端口连接在一起,进行必要的配置后,虚拟化成一台“虚拟设备”,通过该“虚拟设备”来实现多台设备的协同工作、统一管理和不间断维护。
为了便于描述,本文把这个虚拟化形成的设备称为IRF。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
请确保成员设备间的IRF物理连线正确连接,与配置组网图保持一致。
本文假设您已了解IRF特性。
在配置IRF前,S7600-X必须满足以下条件,否则不能形成IRF:
· IRF中所有成员设备的主控板型号必须相同。
· IRF中所有成员设备的软件版本必须相同,如果有软件版本不同的设备要加入IRF,请确保IRF的启动文件同步加载功能处于使能状态;
· 如果两个IRF的桥MAC地址相同,请修改其中一个IRF的桥MAC地址,否则,它们不能合并为一个IRF;
· 在多台设备形成IRF之前,请确保各设备上最大等价路由条数的配置保持一致。关于最大等价路由的介绍,请参见“三层技术-IP路由配置指导”中的“IP路由基础配置”;
· 在多台设备形成IRF之前,请确保各设备的工作模式相同。关于工作模式的配置,请参见“基础配置指导”中的“设备管理配置”。
本设备上与IRF-Port1绑定的IRF物理端口只能和邻居成员设备IRF-Port2口上绑定的IRF物理端口相连,本设备上与IRF-Port2口绑定的IRF物理端口只能和邻居成员设备IRF-Port1口上绑定的IRF物理端口相连,如表1所示。否则,不能形成IRF。
表1 IRF物理端口连接限制
邻居成员设备上的 IRF物理端口 本设备上的 IRF物理端口 |
IRF-Port1绑定的IRF物理端口 |
IRF-Port2绑定的IRF物理端口 |
IRF-Port1绑定的IRF物理端口 |
不能连接 |
可以连接 |
IRF-Port2绑定的IRF物理端口 |
可以连接 |
不能连接 |
· IRF物理端口可以选择10GE/40GE/100GE以太网光口。
· 以下单板上的接口作为IRF物理端口与IRF端口绑定时,需要注意分组及分组使用方式,具体如表2所示:
分组情况 |
||
下列SF系列接口板: · LSUM2TGS16SF3 · LSUM2TGS16SF3 |
以下编号的10GE端口为一组: · 1、2、15、16的端口 · 3、4、5的端口 · 6、7、8的端口 · 9、10、11的端口 · 12、13、14的端口 |
· 如果直接使用40GE端口作为IRF物理端口,则不需要考虑端口的分组 · 同一组中的所有端口用途必须相同,即当组内某一端口与IRF端口绑定后,该组中其它端口也必须与IRF端口绑定,不能再作为普通业务端口使用,反之亦然 · 在将组内某个端口与IRF端口进行绑定或取消绑定之前,必须先对该端口所在组内的所有端口执行shutdown操作,在完成绑定或取消绑定操作后,再对同组内所有端口执行undo shutdown操作 |
EC系列接口板 下列SC系列接口板: · LSQ1TGS32SC3 · LSQ1QGS4SC3 · LSQ1TGS48SC3 · LSQ1QGS8SC3 · LSQ1QGC4SC3 · LSQ1TGT24SC3 SF系列接口板(除LSUM2TGS16SF3、LSQM2TGS16SF3) |
从第一个10GE端口的编号开始,按端口编号由小到大的顺序,每4个连续的端口分为一组 如果使用using tengige命令将一个40GE接口拆分成四个10GE接口,这四个10GE接口将分作一组 |
· 当选用具有40GE QSFP+端口的单板进行IRF连接时,由于40GE QSFP+端口具备拆分成4个10GE端口的功能,当执行拆分或合并操作时需要重启该单板,因此请提前规划好40GE QSFP+端口的使用方式,避免IRF形成后重启单板可能对IRF拓扑产生的影响。
· 在独立运行模式下将IRF端口和IRF物理端口绑定,并不会影响IRF物理端口的当前业务。当设备切换到IRF模式后,IRF物理端口的配置将恢复到缺省状态(即原有的业务配置会被删除),IRF物理端口下只能配置以下命令:
¡ 接口配置命令,包括shutdown、description、flow-interval、priority-flow-control 和priority-flow-control no-drop dot1p命令。有关这些命令的详细介绍,请参见“接口管理命令参考”中的“以太网接口”。
¡ LLDP功能命令,包括lldp admin-status、lldp check-change-interval、lldp enable、lldp encapsulation snap、lldp notification remote-change enable和lldp tlv-enable。有关这些命令的详细介绍,请参见“二层技术-以太网交换配置指导”中的“LLDP”。
· MAC配置命令,包括mac-address static source-check enable命令。为了保证跨成员设备的三层报文的正常转发,请在每个IRF物理端口下配置undo mac-address static source-check enable命令。有关命令的详细介绍,请参见“二层技术——以太网交换”中的“MAC地址表”。
本系列交换机最多支持使用四台设备建立IRF。
LACP MAD和BFD MAD、ARP MAD、NDMAD冲突处理的原则不同,请不要同时配置。BFD MAD和ARP MAD、ND MAD冲突处理的原则不同,并且BFD MAD和生成树协议互斥,ARP MAD、ND MAD需要开启生成树协议,因此BFD MAD和ARP MAD、ND MAD无法同时配置。
请确保IRF中各成员设备上安装的特性License一致,否则,可能会导致这些License对应的特性不能正常运行。
· 如图1所示,Device A为公司的核心设备,但由于公司网络规模日益增大,汇聚层SW设备扩展至N台,Device A单台设备的转发能力已无法达到公司网络的需求。为了拓展核心设备的转发能力,又尽量不改变现有网络。现公司希望增加Device B,与Device A组成IRF,来满足当前网络的需求。
· IRF的上行设备(Router A和Router B)为公司网络的出口路由器;IRF的下行交换机(SW 1、SW 2等)为各个服务器集群的汇聚层设备。
图1 IRF典型配置组网图
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
Router A |
Vlan-int30 |
172.24.2.2/24 |
Router B |
Vlan-int30 |
172.24.2.3/24 |
|
Vlan-int40 |
172.24.40.2/24 |
|
Vlan-int41 |
172.24.41.3/24 |
|
Vlan-int50 |
172.24.1.2/24 |
|
Vlan-int50 |
172.24.4.3/24 |
IRF |
Vlan-int10 |
172.24.10.254/24 |
|
|
|
|
Vlan-int20 |
172.24.20.254/24 |
|
|
|
|
Vlan-int40 |
172.24.40.254/24 |
|
|
|
|
Vlan-int41 |
172.24.41.254/24 |
|
|
|
· 为避免成员设备的单点故障影响到正常的业务转发,可在IRF中配置跨框聚合端口进行业务转发。
· 为尽量降低IRF分裂对业务造成的影响,可在IRF中配置LACP MAD检测。LACP MAD检测只需在一个聚合组中配置即可,其他聚合组中无需配置。LACP MAD检测使用的中间设备必须为H3C的交换机设备且使用的软件版本必须能够识别、处理携带了ActiveID值的LACPDU协议报文,在本例中使用SW 1作为LACP MAD检测的中间设备。
(1) 设置Device A的成员编号为1
<DeviceA> system-view
[DeviceA] irf member 1
(2) 创建IRF端口2,并将它与物理端口Ten-GigabitEthernet 3/0/1和Ten-GigabitEthernet 3/0/2绑定
[DeviceA] irf-port 2
[DeviceA-irf-port2] port group interface ten-gigabitethernet 3/0/1
[DeviceA-irf-port2] port group interface ten-gigabitethernet 3/0/2
[DeviceA-irf-port2] quit
(3) 将当前配置保存到下次启动配置文件
切换运行模式后,设备会自动重启,使新的运行模式生效。为防止配置丢失,请在切换模式前,保存当前配置。
[DeviceA] save
(4) 将Device A的运行模式切换到IRF模式,之后设备会自动重启
[DeviceA] chassis convert mode irf
The device will switch to IRF mode and reboot.
You are recommended to save the current running configuration and specify the co
nfiguration file for the next startup. Continue? [Y/N]:y
Do you want to convert the content of the next startup configuration file cfa0:/
irf.cfg to make it available in stack mode? [Y/N]:y
Now rebooting, please wait...
(1) 设置Device B的成员编号为2
<DeviceB> system-view
[DeviceB] irf member 2
(2) 创建设备的IRF端口1,并将它与物理端口Ten-GigabitEthernet 3/0/1和Ten-GigabitEthernet 3/0/2绑定
[DeviceB] irf-port 1
[DeviceB-irf-port1] port group interface ten-gigabitethernet 3/0/1
[DeviceB-irf-port1] port group interface ten-gigabitethernet 3/0/2
[DeviceB-irf-port1] quit
(3) 保存配置
[DeviceB] save
(4) 参照图1和端口连接表连接Device A和Device B之间的IRF端口
(5) 将设备的运行模式切换到IRF模式
[DeviceB] chassis convert mode irf
The device will switch to IRF mode and reboot.
You are recommended to save the current running configuration and specify the co
nfiguration file for the next startup. Continue? [Y/N]:y
Do you want to convert the content of the next startup configuration file cfa0:
/irf.cfg to make it available in stack mode? [Y/N]:y
Now rebooting, please wait...
在前面配置完成并重新启动后,IRF已经组建完成,此时可以进行各个业务模块的配置。IRF形成之后,可以从任何一台成员设备登录进行配置,设备名称缺省为Master的名称(此例中为Device A)。
# 创建连接接入层交换机SW 1的动态聚合组,编号为1,并使能LACP MAD检测功能。
<DeviceA> system-view
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation1] mad enable
You need to assign a domain ID (range: 0-4294967295)
[Current domain is: 0]:
The assigned domain ID is: 0
MAD LACP only enable on dynamic aggregation interface.
[DeviceA-Bridge-Aggregation1] quit
# 配置连接SW 1的端口加入聚合组1。
[DeviceA] interface ten-gigabitethernet 1/3/0/3
[DeviceA-Ten-GigabitEthernet1/3/0/3] port link-aggregation group 1
[DeviceA-Ten-GigabitEthernet1/3/0/3] quit
[DeviceA] interface ten-gigabitethernet 2/3/0/3
[DeviceA-Ten-GigabitEthernet2/3/0/3] port link-aggregation group 1
[DeviceA-Ten-GigabitEthernet2/3/0/3] quit
# 创建连接接入层交换机SW 2的聚合组,编号为2。
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] quit
# 配置连接SW 2的端口加入聚合组2。
[DeviceA] interface ten-gigabitethernet 1/3/0/4
[DeviceA-Ten-GigabitEthernet1/3/0/4] port link-aggregation group 2
[DeviceA-Ten-GigabitEthernet1/3/0/4] quit
[DeviceA] interface ten-gigabitethernet 2/3/0/4
[DeviceA-Ten-GigabitEthernet2/3/0/4] port link-aggregation group 2
[DeviceA-Ten-GigabitEthernet2/3/0/4] quit
# 配置与SW 1之间通过Vlan-interface 10连接。
[DeviceA] vlan 10
[DeviceA-vlan10] quit
[DeviceA] interface vlan-interface 10
[DeviceA-Vlan-interface10] ip address 172.24.10.254 24
[DeviceA-Vlan-interface10] quit
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] undo port trunk permit vlan 1
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10
[DeviceA-Bridge-Aggregation1] quit
# 配置与SW 2之间通过Vlan-interface 20连接。
[DeviceA] vlan 20
[DeviceA-vlan20] quit
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] ip address 172.24.20.254 24
[DeviceA-Vlan-interface20] quit
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] port link-type trunk
[DeviceA-Bridge-Aggregation2] undo port trunk permit vlan 1
[DeviceA-Bridge-Aggregation2] port trunk permit vlan 20
[DeviceA-Bridge-Aggregation2] quit
# 创建连接IRF的动态聚合组,编号为1,该聚合组同时用于IRF的LACP MAD检测。
<SW1> system-view
[SW1] interface bridge-aggregation 1
[SW1-Bridge-Aggregation1] link-aggregation mode dynamic
[SW1-Bridge-Aggregation1] quit
# 配置连接IRF的端口加入聚合组1。
[SW1] interface ten-gigabitethernet 4/0/1
[SW1-Ten-GigabitEthernet4/0/1] port link-aggregation group 1
[SW1-Ten-GigabitEthernet4/0/1] quit
[SW1] interface ten-gigabitethernet 4/0/2
[SW1-Ten-GigabitEthernet4/0/2] port link-aggregation group 1
[SW1-Ten-GigabitEthernet4/0/2] quit
# 接入设备SW1上创建所有VLAN。
[SW1] vlan all
# 配置与IRF连接的端口。
[SW1] interface bridge-aggregation 1
[SW1-Bridge-Aggregation1] port link-type trunk
[SW1-Bridge-Aggregation1] undo port trunk permit vlan 1
[SW1-Bridge-Aggregation1] port trunk permit vlan 10
[SW1-Bridge-Aggregation1] quit
# 配置连接服务器的端口GigabitEthernet3/0/1。
[SW1] interface gigabitethernet 3/0/1
[SW1-GigabitEthernet3/0/1] port link-type trunk
[SW1-GigabitEthernet3/0/1] port trunk permit vlan all
[SW1-GigabitEthernet3/0/1] undo port trunk permit vlan 1
[SW1-GigabitEthernet3/0/1] quit
# 创建连接IRF的聚合组,编号为1。
<SW2> system-view
[SW2] interface bridge-aggregation 1
[SW2-Bridge-Aggregation1] quit
# 配置连接IRF的端口加入聚合组1。
[SW2] interface ten-gigabitethernet 4/0/1
[SW2-Ten-GigabitEthernet4/0/1] port link-aggregation group 1
[SW2-Ten-GigabitEthernet4/0/1] quit
[SW2] interface ten-gigabitethernet 4/0/2
[SW2-Ten-GigabitEthernet4/0/2] port link-aggregation group 1
[SW2-Ten-GigabitEthernet4/0/2] quit
# 接入设备SW 2上创建所有VLAN。
[SW2] vlan all
# 配置与IRF连接的端口。
[SW2] interface bridge-aggregation 1
[SW2-Bridge-Aggregation1] port link-type trunk
[SW2-Bridge-Aggregation1] undo port trunk permit vlan 1
[SW2-Bridge-Aggregation1] port trunk permit vlan 20
[SW2-Bridge-Aggregation1] quit
# 配置连接服务器的端口。
[SW2] interface gigabitethernet 3/0/1
[SW2-GigabitEthernet3/0/1] port link-type trunk
[SW2-GigabitEthernet3/0/1] port trunk permit vlan all
[SW2-GigabitEthernet3/0/1] undo port trunk permit vlan 1
[SW2-GigabitEthernet3/0/1] quit
# 创建连接出口路由器Router A的聚合组,编号为1023。
[DeviceA] interface bridge-aggregation 1023
[DeviceA-Bridge-Aggregation1023] quit
# 配置连接Router A的端口加入聚合组1023。
[DeviceA] interface ten-gigabitethernet 1/3/0/7
[DeviceA-Ten-GigabitEthernet1/3/0/7] port link-aggregation group 1023
[DeviceA-Ten-GigabitEthernet1/3/0/7] quit
[DeviceA] interface ten-gigabitethernet 2/3/0/7
[DeviceA-Ten-GigabitEthernet2/3/0/7] port link-aggregation group 1023
[DeviceA-Ten-GigabitEthernet2/3/0/7] quit
# 配置与Router A之间通过Vlan-interface40连接。
[DeviceA] vlan 40
[DeviceA-vlan40] quit
[DeviceA] interface vlan-interface 40
[DeviceA-Vlan-interface40] ip address 172.24.40.254 24
[DeviceA-Vlan-interface40] quit
[DeviceA] interface bridge-aggregation 1023
[DeviceA-Bridge-Aggregation1023] port access vlan 40
[DeviceA-Bridge-Aggregation1023] quit
# 创建连接出口路由器Router B的聚合组,编号为1024。
[DeviceA] interface bridge-aggregation 1024
[DeviceA-Bridge-Aggregation1024] quit
# 配置连接Router B的端口加入聚合组1024。
[DeviceA] interface ten-gigabitethernet 1/3/0/8
[DeviceA-Ten-GigabitEthernet1/3/0/8] port link-aggregation group 1024
[DeviceA-Ten-GigabitEthernet1/3/0/8] quit
[DeviceA] interface ten-gigabitethernet 2/3/0/8
[DeviceA-Ten-GigabitEthernet2/3/0/8] port link-aggregation group 1024
[DeviceA-Ten-GigabitEthernet2/3/0/8] quit
# 配置与Router B之间通过Vlan-interface41连接。
[DeviceA] vlan 41
[DeviceA-vlan41] quit
[DeviceA] interface vlan-interface 41
[DeviceA-Vlan-interface41] ip address 172.24.41.254 24
[DeviceA-Vlan-interface41] quit
[DeviceA] interface bridge-aggregation 1024
[DeviceA-Bridge-Aggregation1024] port access vlan 41
[DeviceA-Bridge-Aggregation1024] quit
# 配置IRF与出口路由器之间运行OSPF路由协议。
[DeviceA] ospf
[DeviceA-ospf-1] import-route direct
[DeviceA-ospf-1] area 0
[DeviceA-ospf-1-area-0.0.0.0] network 172.24.40.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] network 172.24.41.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] quit
[DeviceA-ospf-1] quit
出口路由器配置本用例只描述与IRF连接的部分,外网使用何种路由协议不予描述。
# 创建连接IRF的聚合组,编号为1。
<RouterA> system-view
[RouterA] interface bridge-aggregation 1
[RouterA-Bridge-Aggregation1] quit
# 配置连接IRF的端口加入聚合组1。
[RouterA] interface ten-gigabitethernet 4/0/1
[RouterA-Ten-GigabitEthernet4/0/1] port link-mode bridge
[RouterA-Ten-GigabitEthernet4/0/1] port link-aggregation group 1
[RouterA-Ten-GigabitEthernet4/0/1] quit
[RouterA] interface ten-gigabitethernet 2/0/1
[RouterA-Ten-GigabitEthernet2/0/1] port link-mode bridge
[RouterA-Ten-GigabitEthernet2/0/1] port link-aggregation group 1
[RouterA-Ten-GigabitEthernet2/0/1] quit
# 配置与IRF之间通过Vlan-interface 40连接。
[RouterA] vlan 40
[RouterA-vlan40] quit
[RouterA] interface vlan-interface 40
[RouterA-Vlan-interface40] ip address 172.24.40.2 24
[RouterA-Vlan-interface40] quit
[RouterA] interface bridge-aggregation 1
[RouterA-Bridge-Aggregation1] port access vlan 40
[RouterA-Bridge-Aggregation1] quit
# 配置与RouterB之间通过Vlan-interface 30连接。
[RouterA] vlan 30
[RouterA-vlan30] quit
[RouterA] interface vlan-interface 30
[RouterA-Vlan-interface30] ip address 172.24.2.2 24
[RouterA-Vlan-interface30] quit
[RouterA] interface bridge-aggregation 2
[RouterA-Bridge-Aggregation2] port link-type access
[RouterA-Bridge-Aggregation2] port access vlan 30
[RouterA-Bridge-Aggregation2] quit
[RouterA] interface bridge-aggregation 2
[RouterA-Bridge-Aggregation2] quit
[RouterA] interface ten-gigabitethernet 4/0/2
[RouterA-Ten-GigabitEthernet4/0/2] port link-mode bridge
[RouterA-Ten-GigabitEthernet4/0/2] port link-aggregation group 2
[RouterA-Ten-GigabitEthernet4/0/2] quit
[RouterA] interface ten-gigabitethernet 2/0/2
[RouterA-Ten-GigabitEthernet2/0/2] port link-mode bridge
[RouterA-Ten-GigabitEthernet2/0/2] port link-aggregation group 2
[RouterA-Ten-GigabitEthernet2/0/2] quit
# 配置Router A通过Vlan-interface 50连接外网。
[RouterA] vlan 50
[RouterA-vlan50] quit
[RouterA] interface vlan-interface 50
[RouterA-Vlan-interface50] ip address 172.24.1.2 24
[RouterA-Vlan-interface50] quit
[RouterA] interface ten-gigabitethernet 4/0/3
[RouterA-Ten-GigabitEthernet4/0/3] port link-mode bridge
[RouterA-Ten-GigabitEthernet4/0/3] port access vlan 50
[RouterA-Ten-GigabitEthernet4/0/3] quit
# 配置Router A与IRF之间运行OSPF路由协议。
[RouterA] ospf
[RouterA-ospf-1] import-route direct
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] network 172.24.40.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] network 172.24.2.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
# 配置与IRF之间通过Vlan-interface 41连接。
<RouterB> system-view
[RouterB] vlan 41
[RouterB-vlan41] quit
[RouterB] interface vlan-interface 41
[RouterB-Vlan-interface41] ip address 172.24.41.3 24
[RouterB-Vlan-interface41] quit
[RouterB] interface bridge-aggregation 1
[RouterB-Bridge-Aggregation1] port access vlan 41
[RouterB-Bridge-Aggregation1] quit
[RouterB] interface bridge-aggregation 1
[RouterB-Bridge-Aggregation1] quit
[RouterB] interface ten-gigabitethernet 4/0/1
[RouterB-Ten-GigabitEthernet4/0/1] port link-mode bridge
[RouterB-Ten-GigabitEthernet4/0/1] port link-aggregation group 1
[RouterB-Ten-GigabitEthernet4/0/1] quit
[RouterB] interface ten-gigabitethernet 2/0/1
[RouterB-Ten-GigabitEthernet2/0/1] port link-mode bridge
[RouterB-Ten-GigabitEthernet2/0/1] port link-aggregation group 1
[RouterB-Ten-GigabitEthernet2/0/1] quit
# 配置与Router A之间通过Vlan-interface 30连接。
[RouterB] vlan 30
[RouterB-vlan30] quit
[RouterB] interface vlan-interface 30
[RouterB-Vlan-interface30] ip address 172.24.2.3 24
[RouterB-Vlan-interface30] quit
[RouterB] interface bridge-aggregation 2
[RouterB-Bridge-Aggregation2] port link-type access
[RouterB-Bridge-Aggregation2] port access vlan 30
[RouterB-Bridge-Aggregation2] quit
[RouterB] interface ten-gigabitethernet 4/0/2
[RouterB-Ten-GigabitEthernet4/0/2] port link-aggregation group 2
[RouterB-Ten-GigabitEthernet4/0/2] quit
[RouterB] interface ten-gigabitethernet 2/0/2
[RouterB-Ten-GigabitEthernet2/0/2] port link-aggregation group 2
[RouterB-Ten-GigabitEthernet2/0/2] quit
# 配置Router B通过Vlan-interface 50连接外网。
[RouterB] vlan 50
[RouterB-vlan50] quit
[RouterB] interface vlan-interface 50
[RouterB-Vlan-interface50] ip address 172.24.4.3 24
[RouterB-Vlan-interface50] quit
[RouterB] interface ten-gigabitethernet 4/0/3
[RouterB-Ten-GigabitEthernet4/0/3] port link-mode bridge
[RouterB-Ten-GigabitEthernet4/0/3] port access vlan 50
[RouterB-Ten-GigabitEthernet4/0/3] quit
# 配置Router B与IRF之间运行OSPF路由协议。
[RouterB] ospf
[RouterB-ospf-1] import-route direct
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 172.24.41.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] network 172.24.2.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
(1) 验证IRF建立成功
[DeviceA] display irf
MemberID Slot Role Priority CPU-Mac Description
*+1 0 Master 1 0210-fc01-0000 ---
2 0 Standby 1 0210-fc02-0000 ---
--------------------------------------------------
* indicates the device is the master.
+ indicates the device through which the user logs in.
The Bridge MAC of the IRF is: 3822-d60f-2800
Auto upgrade : yes
Mac persistent : always
Domain ID : 0
Auto merge : yes
IRF mode : normal
从命令行的显示看,当前两台设备IRF成功建立。
(2) 验证跨框聚合有链路备份的作用
从serverGroup 1任意挑选一台PC ping外网IP,关闭IRF的上行端口Ten-GigabitEthernet 1/3/0/8,出现短暂中断后仍然可以ping通外网。
C:\Users>ping 202.108.22.5 –t
正在 Ping 202.108.22.5 具有 32 字节的数据:
来自 202.108.22.5 的回复: 字节=32 时间=1ms TTL=122
来自 202.108.22.5 的回复: 字节=32 时间=13ms TTL=122
来自 202.108.22.5 的回复: 字节=32 时间<1ms TTL=122
请求超时。
来自 202.108.22.5 的回复: 字节=32 时间<1ms TTL=122
来自 202.108.22.5 的回复: 字节=32 时间<1ms TTL=122
来自 202.108.22.5 的回复: 字节=32 时间<1ms TTL=122
重新开启端口Ten-GigabitEthernet 1/3/0/8,持续ping,将另外一个上行端口Ten-GigabitEthernet 2/3/0/8关闭,出现短暂中断后仍然可以ping通外网。
C:\Users>ping 202.108.22.5 –t
正在 Ping 202.108.22.5 具有 32 字节的数据:
来自 202.108.22.5 的回复: 字节=32 时间=1ms TTL=122
来自 202.108.22.5 的回复: 字节=32 时间=13ms TTL=122
来自 202.108.22.5 的回复: 字节=32 时间<1ms TTL=122
请求超时。
来自 202.108.22.5 的回复: 字节=32 时间<1ms TTL=122
来自 202.108.22.5 的回复: 字节=32 时间<1ms TTL=122
来自 202.108.22.5 的回复: 字节=32 时间<1ms TTL=122
(3) 验证IRF物理链路的冗余备份
断开IRF物理链路中的任意一条,IRF仍能正常工作、没有分裂。
· IRF:
#
irf mac-address persistent always
irf auto-update enable
irf auto-merge enable
undo irf link-delay
irf member 1 priority 1
irf member 2 priority 1
#
ospf 1
import-route direct
area 0.0.0.0
network 172.24.40.0 0.0.0.255
network 172.24.41.0 0.0.0.255
#
vlan 10
#
vlan 20
#
vlan 40
#
vlan 41
#
irf-port 1/2
port group interface Ten-GigabitEthernet1/3/0/1 mode enhanced
port group interface Ten-GigabitEthernet1/3/0/2 mode enhanced
#
irf-port 2/1
port group interface Ten-GigabitEthernet2/3/0/1 mode enhanced
port group interface Ten-GigabitEthernet2/3/0/2 mode enhanced
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
link-aggregation mode dynamic
mad enable
#
interface bridge-aggregation 2
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
#
interface bridge-aggregation 1023
port access vlan 40
#
interface bridge-aggregation 1024
port access vlan 41
#
interface vlan-interface 10
ip address 172.24.10.254 255.255.255.0
#
interface vlan-interface 20
ip address 172.24.20.254 255.255.255.0
#
interface vlan-interface 40
ip address 172.24.40.254 255.255.255.0
#
interface Ten-GigabitEthernet 1/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 1/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 1/3/0/7
port link-mode bridge
port access vlan 40
port link-aggregation group 1023
#
interface Ten-GigabitEthernet 1/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
interface Ten-GigabitEthernet 2/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 2/3/0/7
port link-mode bridge
port access vlan 40
port link-aggregation group 1023
#
interface Ten-GigabitEthernet 2/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
· SW1:
#
vlan 10
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
link-aggregation mode dynamic
#
interface gigabitethernet 3/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 2 to 4094
#
interface Ten-GigabitEthernet 4/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 4/0/2
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
· SW2:
#
vlan 20
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
#
interface gigabitethernet 3/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 2 to 4094
#
interface Ten-GigabitEthernet 4/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
interface Ten-GigabitEthernet 4/0/2
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
· RouterA:
#
ospf 1
import-route direct
area 0.0.0.0
network 172.24.2.0 0.0.0.255
network 172.24.40.0 0.0.0.255
#
vlan 30
#
vlan 40
#
vlan 50
#
interface bridge-aggregation 1
port access vlan 40
#
interface bridge-aggregation 2
port access vlan 30
#
interface vlan-interface 30
ip address 172.24.2.2 255.255.255.0
#
interface vlan-interface 40
ip address 172.24.40.2 255.255.255.0
#
interface vlan-interface 50
ip address 172.24.1.2 255.255.255.0
#
interface Ten-GigabitEthernet 2/0/1
port link-mode bridge
port access vlan 40
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/2
port link-mode bridge
port access vlan 30
port link-aggregation group 2
#
interface Ten-GigabitEthernet 4/0/1
port link-mode bridge
port access vlan 40
port link-aggregation group 1
#
interface Ten-GigabitEthernet 4/0/2
port link-mode bridge
port access vlan 30
port link-aggregation group 2
#
interface Ten-GigabitEthernet 4/0/3
port link-mode bridge
port access vlan 50
#
· RouterB:
#
ospf 1
import-route direct
area 0.0.0.0
network 172.24.2.0 0.0.0.255
network 172.24.41.0 0.0.0.255
#
vlan 30
#
vlan 41
#
vlan 50
#
interface bridge-aggregation 1
port access vlan 41
#
interface bridge-aggregation 2
port access vlan 30
#
interface vlan-interface 30
ip address 172.24.2.3 255.255.255.0
#
interface vlan-interface 41
ip address 172.24.41.3 255.255.255.0
#
interface vlan-interface 50
ip address 172.24.4.3 255.255.255.0
#
interface Ten-GigabitEthernet 2/0/1
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/2
port link-mode bridge
port access vlan 30
port link-aggregation group 2
#
interface Ten-GigabitEthernet 4/0/1
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 4/0/2
port link-mode bridge
port access vlan 30
port link-aggregation group 2
#
interface Ten-GigabitEthernet 4/0/3
port link-mode bridge
port access vlan 50
#
· 如图2所示,由于网络规模迅速扩大,汇聚层SW设备扩展至N台,当前中心设备设备A的转发能力已经不能满足需求。现在需要另增三台设备,组成一个四框IRF才能满足当前网络的转发需求。
· 升级到四框IRF设备后,必须保证即使IRF中有N台设备发生故障(1≤N≤3),RouterA与汇聚层交换机(如:SW1,SW2等)之间通信也不能中断。
图2 四台成员设备的IRF典型配置组网图(采用LACP MAD)
表3 IP地址配置信息
设备 |
接口 |
IP地址 |
RouterA |
Vlan-interface41 |
172.24.41.2/24 |
Vlan-interface50 |
172.24.1.2/24 |
|
IRF |
Vlan-interface41 |
172.24.41.254/24 |
Vlan-interface10 |
172.24.10.254/24 |
|
Vlan-interface20 |
172.24.20.254/24 |
|
… |
… |
|
Vlan-interfaceN |
172.24.N.254/24 |
表4 IRF设备互联信息
设备 |
IRF端口 |
对端IRF端口 |
IRF成员端口 |
Device A |
irf-port 1/1 |
irf-port 4/2 |
XGE1/2/0/4 |
Device A |
irf-port 1/2 |
irf-port 2/1 |
XGE1/2/0/1 |
Device B |
irf-port 2/1 |
irf-port 1/2 |
XGE2/4/0/2 |
Device B |
irf-port 2/2 |
irf-port 3/1 |
XGE2/3/0/30 |
Device C |
irf-port 3/1 |
irf-port 2/2 |
XGE3/3/0/15 |
Device C |
irf-port 3/2 |
irf-port 4/1 |
XGE3/12/0/1 |
Device D |
irf-port 4/1 |
irf-port 3/2 |
XGE4/6/0/4 |
Device D |
irf-port 4/2 |
irf-port 1/1 |
XGE4/6/0/2 |
表5 IRF设备的上下行互联信息
IRF的对端设备 |
接口 |
所属vlan |
所属聚合组 |
下行连SW2 |
XGE1/3/0/1 |
Vlan 13(BFD MAD) |
|
下行连SW2 |
XGE2/3/0/1 |
Vlan 13(BFD MAD) |
|
下行连SW2 |
XGE3/3/0/1 |
Vlan 13(BFD MAD) |
|
下行连SW2 |
XGE4/3/0/1 |
Vlan 13(BFD MAD) |
|
下行连SW1 |
XGE1/3/0/3 |
Vlan 10 |
Bridge-aggregation 1(LACP MAD) |
下行连SW1 |
XGE2/3/0/3 |
Vlan 10 |
Bridge-aggregation 1(LACP MAD) |
下行连SW1 |
XGE3/3/0/3 |
Vlan 10 |
Bridge-aggregation 1(LACP MAD) |
下行连SW1 |
XGE4/3/0/3 |
Vlan 10 |
Bridge-aggregation 1(LACP MAD) |
下行连SW2 |
XGE1/3/0/4 |
Vlan 20 |
Bridge-aggregation 2 |
下行连SW2 |
XGE2/3/0/4 |
Vlan 20 |
Bridge-aggregation 2 |
下行连SW2 |
XGE3/3/0/4 |
Vlan 20 |
Bridge-aggregation 2 |
下行连SW2 |
XGE4/3/0/4 |
Vlan 20 |
Bridge-aggregation 2 |
上行连Router A |
XGE1/3/0/8 |
Vlan 41 |
Bridge-aggregation 1024 |
上行连Router A |
XGE2/3/0/8 |
Vlan 41 |
Bridge-aggregation 1024 |
上行连Router A |
XGE3/3/0/8 |
Vlan 41 |
Bridge-aggregation 1024 |
上行连Router A |
XGE4/3/0/8 |
Vlan 41 |
Bridge-aggregation 1024 |
表6 SW1设备的上下行互联信息
SW1的对端设备 |
接口 |
所属vlan |
所属聚合组 |
下行连服务组 |
GE3/0/1 |
Vlan 10 |
|
上行连IRF |
XGE2/0/21 |
Vlan 10 |
Bridge-aggregation 1(LACP MAD) |
上行连IRF |
XGE2/0/22 |
Vlan 10 |
Bridge-aggregation 1(LACP MAD) |
上行连IRF |
XGE2/0/23 |
Vlan 10 |
Bridge-aggregation 1(LACP MAD) |
上行连IRF |
XGE2/0/24 |
Vlan 10 |
Bridge-aggregation 1(LACP MAD) |
表7 SW2设备的上下行互联信息
SW2的对端设备 |
接口 |
所属vlan |
所属聚合组 |
下行连服务组 |
GE3/0/1 |
Vlan 20 |
|
上行连IRF |
XGE2/0/21 |
Vlan 20 |
Bridge-aggregation 1 |
上行连IRF |
XGE2/0/22 |
Vlan 20 |
Bridge-aggregation 1 |
上行连IRF |
XGE2/0/23 |
Vlan 20 |
Bridge-aggregation 1 |
上行连IRF |
XGE2/0/24 |
Vlan 20 |
Bridge-aggregation 1 |
表8 Router A设备的上下行互联信息
Router A的对端设备 |
接口 |
所属vlan |
所属聚合组 |
下行连IRF |
XGE2/0/1 |
Vlan 41 |
Bridge-aggregation 1 |
下行连IRF |
XGE2/0/2 |
Vlan 41 |
Bridge-aggregation 1 |
下行连IRF |
XGE2/0/3 |
Vlan 41 |
Bridge-aggregation 1 |
下行连IRF |
XGE2/0/4 |
Vlan 41 |
Bridge-aggregation 1 |
上行连外网 |
XGE2/0/2 |
Vlan 50 |
|
· 为避免成员设备的单点故障影响到正常的业务转发,可在IRF中配置跨框聚合端口进行业务转发。
· LACP MAD检测只需在一个聚合组中配置即可,其他聚合组中无需配置。LACP MAD检测使用的二层交换机必须为H3C的交换机设备且使用的软件版本必须能够识别、处理携带了ActiveID值的LACPDU协议报文,在本例中使用SW 1作为LACP MAD检测的中间设备。
(1) 设置Device A的成员编号为1
<DeviceA> system-view
[DeviceA] irf member 1
(2) 配置IRF端口1与物理端口Ten-GigabitEthernet 2/0/4绑定
[DeviceA] irf-port 1
[DeviceA-irf-port1] port group interface ten-gigabitethernet 2/0/4
[DeviceA-irf-port1] quit
(3) 配置IRF端口2与物理端口Ten-GigabitEthernet 2/0/1绑定
[DeviceA] irf-port 2
[DeviceA-irf-port2] port group interface ten-gigabitethernet 2/0/1
[DeviceA-irf-port2] quit
(4) 将当前配置保存到下次启动配置文件
[DeviceA] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
(5) 将Device A的运行模式切换到IRF模式之后,设备会自动重启
[DeviceA] chassis convert mode irf
The device will switch to IRF mode and reboot.
You are recommended to save the current running configuration and specify the c
onfiguration file for the next startup. Continue? [Y/N]:y
Do you want to convert the content of the next startup configuration file flash
:/startup.cfg to make it available in stack mode? [Y/N]:y
(1) 设置Device B的成员编号为2
<DeviceB> system-view
[DeviceB] irf member 2
(2) 配置IRF端口1与物理端口Ten-GigabitEthernet 4/0/2绑定
[DeviceB] irf-port 1
[DeviceB-irf-port1] port group interface ten-gigabitethernet 4/0/2
[DeviceB-irf-port1] quit
(3) 配置IRF端口2与物理端口Ten-GigabitEthernet 3/0/30绑定
[DeviceB] irf-port 2
[DeviceB-irf-port2] port group interface ten-gigabitethernet3/0/30
[DeviceB-irf-port2] quit
(4) 保存配置
[DeviceB] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
(5) 参照图2和端口连接表连接Device A和Device B之间的IRF端口
(6) 将设备的运行模式切换到IRF模式
[DeviceB] chassis convert mode irf
The device will switch to IRF mode and reboot.
You are recommended to save the current running configuration and specify the c
onfiguration file for the next startup. Continue? [Y/N]:y
Do you want to convert the content of the next startup configuration file flash
:/startup.cfg to make it available in stack mode? [Y/N]:y
Now rebooting, please wait...
(1) 设置Device C的成员编号为3
<DeviceC> system-view
[DeviceC] irf member 3
(2) 配置IRF端口1与物理端口Ten-GigabitEthernet 3/0/15绑定
[DeviceC] irf-port 1
[DeviceC-irf-port1] port group interface ten-gigabitethernet 3/0/15
[DeviceC-irf-port1] quit
(3) 配置IRF端口2与物理端口Ten-GigabitEthernet 12/0/1绑定
[DeviceC] irf-port 2
[DeviceC-irf-port2] port group interface ten-gigabitethernet12/0/1
[DeviceC-irf-port2] quit
(4) 保存配置
[DeviceC] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
(5) 参照图2和端口连接表连接Device B和Device C之间的IRF端口
(6) 将设备的运行模式切换到IRF模式
[DeviceC] chassis convert mode irf
The device will switch to IRF mode and reboot.
You are recommended to save the current running configuration and specify the c
onfiguration file for the next startup. Continue? [Y/N]:y
Do you want to convert the content of the next startup configuration file flash
:/startup.cfg to make it available in stack mode? [Y/N]:y
Now rebooting, please wait...
(1) 设置Device D的成员编号为4
<DeviceD> system-view
[DeviceD] irf member 4
(2) 配置IRF端口1与物理端口Ten-GigabitEthernet 6/0/4绑定
[DeviceD] irf-port 1
[DeviceD-irf-port1] port group interface ten-gigabitethernet 6/0/4
[DeviceD-irf-port1] quit
(3) 配置IRF端口2与物理端口Ten-GigabitEthernet 6/0/2绑定
[DeviceD] irf-port 2
[DeviceD-irf-port2] port group interface ten-gigabitethernet6/0/2
[DeviceD-irf-port2] quit
(4) 保存配置
[DeviceD] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
(5) 参照图2和端口连接表连接Device C和Device D以及Device A和Device D之间的IRF端口
(6) 将设备的运行模式切换到IRF模式
[DeviceD] chassis convert mode irf
The device will switch to IRF mode and reboot.
You are recommended to save the current running configuration and specify the c
onfiguration file for the next startup. Continue? [Y/N]:y
Do you want to convert the content of the next startup configuration file flash
:/startup.cfg to make it available in stack mode? [Y/N]:y
Now rebooting, please wait...
在前面配置完成并重新启动后,IRF已经组建完成,此时可以进行各个业务模块的配置。IRF形成之后,可以从任何一台成员设备登录进行配置,设备名称缺省为Master的名称(此例中为Device A)。
# 创建连接接入层交换机SW 1的动态聚合组,编号为1,并使能LACP MAD检测功能。
<DeviceA> system-view
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation1] mad enable
You need to assign a domain ID (range: 0-4294967295)
[Current domain is: 0]:
The assigned domain ID is: 0
MAD LACP only enable on dynamic aggregation interface.
[DeviceA-Bridge-Aggregation1] quit
# 使用接口批量配置功能配置连接SW 1的端口加入聚合组1。
[DeviceA] interface range ten-gigabitethernet 1/3/0/3 ten-gigabitethernet 2/3/0/3 ten-gigabitethernet 3/3/0/3 ten-gigabitethernet 4/3/0/3
[DeviceA-if-range] port link-aggregation group 1
[DeviceA-if-range] quit
# 创建连接接入层交换机SW 2的聚合组,编号为2。
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] quit
# 使用接口批量配置功能配置连接SW 2的端口加入聚合组2。
[DeviceA] interface ten-gigabitethernet 1/3/0/4 ten-gigabitethernet 2/3/0/4 ten-gigabitethernet 3/3/0/4 ten-gigabitethernet 4/3/0/4
[DeviceA-if-range] port link-aggregation group 2
[DeviceA-if-range] quit
# 配置与SW 1之间通过Vlan-interface 10连接。
[DeviceA] vlan 10
[DeviceA-vlan10] quit
[DeviceA] interface vlan-interface 10
[DeviceA-Vlan-interface10] ip address 172.24.10.254 24
[DeviceA-Vlan-interface10] quit
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] undo port trunk permit vlan 1
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10
[DeviceA-Bridge-Aggregation1] quit
# 配置与SW 2之间通过Vlan-interface 20连接。
[DeviceA] vlan 20
[DeviceA-vlan20] quit
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] ip address 172.24.20.254 24
[DeviceA-Vlan-interface20] quit
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] port link-type trunk
[DeviceA-Bridge-Aggregation2] undo port trunk permit vlan 1
[DeviceA-Bridge-Aggregation2] port trunk permit vlan 20
[DeviceA-Bridge-Aggregation2] quit
# 创建连接IRF的动态聚合组,编号为1,该聚合组同时用于IRF的LACP MAD检测。
<SW1> system-view
[SW1] interface bridge-aggregation 1
[SW1-Bridge-Aggregation1] link-aggregation mode dynamic
[SW1-Bridge-Aggregation1] quit
# 使用接口批量配置功能配置连接IRF的端口加入聚合组1。
[SW1] interface range ten-gigabitethernet 2/0/21 to ten-gigabitethernet 2/0/24
[SW1-if-range] port link-aggregation group 1
[SW1-if-range] quit
# 接入设备SW1上创建所有VLAN。
[SW1] vlan all
# 配置与IRF连接的端口。
[SW1] interface bridge-aggregation 1
[SW1-Bridge-Aggregation1] port link-type trunk
[SW1-Bridge-Aggregation1] undo port trunk permit vlan 1
[SW1-Bridge-Aggregation1] port trunk permit vlan 10
[SW1-Bridge-Aggregation1] quit
# 配置连接服务器的端口GigabitEthernet3/0/1。
[SW1] interface gigabitethernet 3/0/1
[SW1-GigabitEthernet3/0/1] port link-type trunk
[SW1-GigabitEthernet3/0/1] port trunk permit vlan all
[SW1-GigabitEthernet3/0/1] undo port trunk permit vlan 1
[SW1-GigabitEthernet3/0/1] quit
# 创建连接IRF的聚合组,编号为1。
<SW2> system-view
[SW2] interface bridge-aggregation 1
[SW2-Bridge-Aggregation1] quit
# 使用接口批量配置功能配置连接IRF的端口加入聚合组1。
[SW2] interface range ten-gigabitethernet 2/0/21 to ten-gigabitethernet 2/0/24
[SW2-if-range] port link-aggregation group 1
[SW2-if-range] quit
# 接入设备SW 2上创建所有VLAN。
[SW2] vlan all
# 配置与IRF连接的端口。
[SW2] interface bridge-aggregation 1
[SW2-Bridge-Aggregation1] port link-type trunk
[SW2-Bridge-Aggregation1] undo port trunk permit vlan 1
[SW2-Bridge-Aggregation1] port trunk permit vlan 20
[SW2-Bridge-Aggregation1] quit
# 配置连接服务器的端口。
[SW2] interface gigabitethernet 3/0/1
[SW2-GigabitEthernet3/0/1] port link-type trunk
[SW2-GigabitEthernet3/0/1] port trunk permit vlan all
[SW2-GigabitEthernet3/0/1] undo port trunk permit vlan 1
[SW2-GigabitEthernet3/0/1] quit
# 创建连接出口路由器Router A的聚合组,编号为1024。
[DeviceA] interface bridge-aggregation 1024
[DeviceA-Bridge-Aggregation1024] quit
# 使用接口批量配置功能配置连接Router A的端口加入聚合组1024。
[DeviceA] interface range ten-gigabitethernet 1/3/0/8 ten-gigabitethernet 2/3/0/8 ten-gigabitethernet 3/3/0/8 ten-gigabitethernet 4/3/0/8
[DeviceA-if-range] port link-aggregation group 1024
[DeviceA-if-range] quit
# 配置与Router A之间通过Vlan-interface41连接。
[DeviceA] vlan 41
[DeviceA-vlan41] quit
[DeviceA] interface vlan-interface 41
[DeviceA-Vlan-interface41] ip address 172.24.41.254 24
[DeviceA-Vlan-interface41] quit
[DeviceA] interface bridge-aggregation 1024
[DeviceA-Bridge-Aggregation1024] port access vlan 41
[DeviceA-Bridge-Aggregation1024] quit
# 配置IRF与出口路由器之间运行OSPF路由协议。
[DeviceA] interface loopback 0
[DeviceA-LoopBack0] ip address 172.24.254.1 255.255.255.255
[DeviceA-LoopBack0] quit
[DeviceA] ospf 1 router-id 172.24.254.1
[DeviceA-ospf-1] import-route direct
[DeviceA-ospf-1] area 0
[DeviceA-ospf-1-area-0.0.0.0] network 172.24.41.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] quit
[DeviceA-ospf-1] quit
出口路由器配置本用例只描述与IRF连接的部分,外网使用何种路由协议不予描述。
# 创建连接IRF的聚合组,编号为1。
<RouterA> system-view
[RouterA] interface bridge-aggregation 1
[RouterA-Bridge-Aggregation1] quit
# 配置连接IRF的端口加入聚合组1。
[RouterA] interface range ten-gigabitethernet 2/0/1 to interface ten-gigabitethernet 2/0/4
[RouterA-if-range] port link-aggregation group 1
[RouterA-if-range] quit
# 配置与IRF之间通过Vlan-interface 41连接。
[RouterA] vlan 41
[RouterA-vlan41] quit
[RouterA] interface vlan-interface 41
[RouterA-Vlan-interface41] ip address 172.24.41.2 24
[RouterA-Vlan-interface41] quit
[RouterA] interface bridge-aggregation 1
[RouterA-Bridge-Aggregation1] port access vlan 41
[RouterA-Bridge-Aggregation1] quit
# 配置Router A通过Vlan-interface 50连接外网。
[RouterA] vlan 50
[RouterA-vlan50] quit
[RouterA] interface vlan-interface 50
[RouterA-Vlan-interface50] ip address 172.24.1.2 24
[RouterA-Vlan-interface50] quit
[RouterA] interface ten-gigabitethernet 4/0/3
[RouterA-Ten-GigabitEthernet4/0/3] port link-mode bridge
[RouterA-Ten-GigabitEthernet4/0/3] port access vlan 50
[RouterA-Ten-GigabitEthernet4/0/3] quit
# 配置Router A与IRF之间运行OSPF路由协议。
[RouterA] interface loopback 0
[RouterA-LoopBack0] ip addresss 172.24.254.2 255.255.255.255
[RouterA-LoopBack0] quit
[RouterA] ospf 1 router-id 172.24.254.2
[RouterA-ospf-1] import-route direct
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] network 172.24.41.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
(1) 验证IRF是否建立成功
# 使用display irf topology命令查看八个IRF口都是UP状态,说明四台设备建立IRF成功。
<DeviceA> display irf topology
Topology Info
-------------------------------------------------------------------------
IRF-Port1 IRF-Port2
Switch Link neighbor Link neighbor Belong To
1 UP 4 UP 2 0210-fc01-0000
4 UP 3 UP 1 0210-fc01-0000
3 UP 2 UP 4 0210-fc01-0000
2 UP 1 UP 3 0210-fc01-0000
(2) 验证跨框聚合链路备份功能
# 从serverGroup 1任意挑选一台PC ping外网IP,同时关闭IRF的上行端口Ten-GigabitEthernet 1/3/0/8。
[DeviceA] interface ten-gigabitethernet 1/3/0/8
[DeviceA-Ten-GigabitEthernet1/3/0/8] shutdown
仍然可以ping通外网。
# 重新开启IRF的上行端口Ten-GigabitEthernet 1/3/0/8端口,持续ping外网IP。
[DeviceA-Ten-GigabitEthernet1/3/0/8] undo shutdown
[DeviceA-Ten-GigabitEthernet1/3/0/8] quit
# 关闭IRF的另一个上行端口Ten-GigabitEthernet 2/3/0/8。
[DeviceA] interface ten-gigabitethernet 2/3/0/8
[DeviceA-Ten-GigabitEthernet2/3/0/8] shutdown
仍然可以ping通外网。
· IRF:
#
irf mac-address persistent always
irf auto-update enable
undo irf auto-merge enable
undo irf link-delay
irf member 1 priority 1
irf member 2 priority 1
irf member 3 priority 1
irf member 4 priority 1
#
ospf 1 router-id 172.24.254.1
import-route direct
area 0.0.0.0
network 172.24.41.0 0.0.0.255
#
vlan 10
#
vlan 20
#
vlan 13
#
vlan 41
#
irf-port 1/1
port group interface Ten-GigabitEthernet1/2/0/4 mode enhanced
#
irf-port 1/2
port group interface Ten-GigabitEthernet1/2/0/1 mode enhanced
#
irf-port 2/1
port group interface Ten-GigabitEthernet2/4/0/2 mode enhanced
#
irf-port 2/2
port group interface Ten-GigabitEthernet2/3/0/30 mode enhanced
#
irf-port 3/1
port group interface Ten-GigabitEthernet3/3/0/15 mode enhanced
#
irf-port 3/2
port group interface Ten-GigabitEthernet3/12/0/1 mode enhanced
#
irf-port 4/1
port group interface Ten-GigabitEthernet4/6/0/4 mode enhanced
#
irf-port 4/2
port group interface Ten-GigabitEthernet4/6/0/2 mode enhanced
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
mad enable
link-aggregation mode dynamic
#
interface bridge-aggregation 2
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
#
interface bridge-aggregation 1024
port access vlan 41
#
interface loopback 0
ip address 172.24.254.1 255.255.255.255
#
interface vlan-interface 10
ip address 172.24.10.254 24
#
interface vlan-interface 20
ip address 172.24.20.254 24
#
interface vlan-interface 41
ip address 172.24.41.254 24
#
interface Ten-GigabitEthernet 1/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 1/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 1/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
interface Ten-GigabitEthernet 2/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 2/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
interface Ten-GigabitEthernet 3/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 3/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 3/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
interface Ten-GigabitEthernet 4/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 4/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 4/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
· SW1:
#
vlan 10
#
interface gigabitethernet 3/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 2 to 4094
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
link-aggregation mode dynamic
#
interface Ten-GigabitEthernet 2/0/21
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/22
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/23
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/24
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
· SW2:
#
vlan 20
#
interface gigabitethernet 3/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 2 to 4094
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
#
interface Ten-GigabitEthernet 2/0/21
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/22
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/23
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/24
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
· RouterA:
#
ospf 1 router-id 172.24.254.2
import-route direct
area 0.0.0.0
network 172.24.41.0 0.0.0.255
#
vlan 41
#
vlan 50
#
interface bridge-aggregation 1
port access vlan 41
#
interface loopback 0
ip address 172.24.254.2 255.255.255.255
#
interface vlan-interface 41
ip address 172.24.41.2 24
#
interface vlan-interface 50
ip address 172.24.1.2 24
#
interface Ten-GigabitEthernet 2/0/1
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/2
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/3
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/4
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/12
port link-mode bridge
port access vlan 50
#
由于网络规模迅速扩大,汇聚层SW设备扩展至N台,当前中心设备设备A和设备B组成IRF的转发能力已经不能满足需求。现在需要在保留原有设备的基础上完成扩容,满足当前网络的转发需求。采用的升级方案为:扩大汇聚层设备的IRF规模,升级成四框IRF来满足当前网络的转发需求,如图5所示。
图3 升级之前组网图(两个IRF成员设备)
图4 升级过程组网图(新增两个成员设备Device C和Device D)
IP地址配置信息及设备间的互联端口信息请参见5 四台成员设备的IRF配置举例。
· 为避免成员设备的单点故障影响到正常的业务转发,在IRF中配置跨框聚合端口进行业务转发。
· 为尽量降低IRF分裂对业务造成的影响,可在IRF中配置BFD MAD检测。检测速度较快,组网形式灵活,对于中间设备没有要求,但是会占用额外的三层接口。
BFD MAD与STP功能互斥,因此需要在用于BFD MAD检测的接口上关闭STP功能。
· 如果新加入的DeviceC和DeviceD都是独立运行模式,搭建四框IRF的配置步骤请参考6.4.1 搭建IRF(配置DeviceC和DeviceD加入IRF);
· 如果新加入的DeviceC和DeviceD已经组成了另一个IRF(假设名称为IRF-C),搭建四框IRF的配置步骤请参考6.4.2 搭建IRF(配置原IRF和IRF-C合并成IRF)。
由于DeviceA和DeviceB已经组成了IRF,所以只需将DeviceC和DeviceD加入IRF即可。
(1) 配置IRF端口1/1与物理端口Ten-GigabitEthernet 1/2/0/4绑定
<DeviceA> system-view
[DeviceA] interface ten-gigabitethernet 1/2/0/4
[DeviceA-Ten-GigabitEthernet1/2/0/4] shutdown
[DeviceA-Ten-GigabitEthernet1/2/0/4] quit
[DeviceA] irf-port 1/1
[DeviceA-irf-port1/1] port group interface ten-gigabitethernet 1/2/0/4
[DeviceA-irf-port1/1] quit
[DeviceA] interface ten-gigabitethernet 1/2/0/4
[DeviceA-Ten-GigabitEthernet1/2/0/4] undo shutdown
[DeviceA-Ten-GigabitEthernet1/2/0/4] quit
(2) 配置IRF端口2/2与物理端口Ten-GigabitEthernet 2/3/0/30绑定
[DeviceA] interface ten-gigabitEthernet 2/3/0/30
[DeviceA-Ten-GigabitEthernet2/3/0/30] undo shutdown
[DeviceA-Ten-GigabitEthernet2/3/0/30] quit
[DeviceA] irf-port 2/2
[DeviceA-irf-port2/2] port group interface ten-gigabitethernet2/3/0/30
[DeviceA-irf-port2/2] quit
[DeviceA] interface ten-gigabitEthernet 2/3/0/30
[DeviceA-Ten-GigabitEthernet2/3/0/30] undo shutdown
[DeviceA-Ten-GigabitEthernet2/3/0/30] quit
(3) 将当前配置保存
[DeviceA] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
[DeviceA] irf-port-configuration active
(1) 设置Device C的成员编号为3
<DeviceC> system-view
[DeviceC] irf member 3
(2) 配置IRF端口1与物理端口Ten-GigabitEthernet 3/0/15绑定
[DeviceC] irf-port 1
[DeviceC-irf-port1] port group interface ten-gigabitethernet 3/0/15
[DeviceC-irf-port1] quit
(3) 配置IRF端口2与物理端口Ten-GigabitEthernet 12/0/1绑定
[DeviceC] irf-port 2
[DeviceC-irf-port2] port group interface ten-gigabitethernet12/0/1
[DeviceC-irf-port2] quit
(4) 保存配置
[DeviceC] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
参照图5和端口连接表连接Device B和Device C之间的IRF端口。
(5) 将设备的运行模式切换到IRF模式
[DeviceC] chassis convert mode irf
The device will switch to IRF mode and reboot.
You are recommended to save the current running configuration and specify the c
onfiguration file for the next startup. Continue? [Y/N]:y
Do you want to convert the content of the next startup configuration file flash
:/startup.cfg to make it available in stack mode? [Y/N]:y
Now rebooting, please wait...
(1) 设置Device D的成员编号为4
<DeviceD> system-view
[DeviceD] irf member 4
(2) 创建IRF端口1与物理端口Ten-GigabitEthernet 6/0/4绑定
[DeviceD] irf-port 1
[DeviceD-irf-port1] port group interface ten-gigabitethernet 6/0/4
[DeviceD-irf-port1] quit
(3) 配置IRF端口2与物理端口Ten-GigabitEthernet 6/0/2绑定
[DeviceD] irf-port 2
[DeviceD-irf-port2] port group interface ten-gigabitethernet6/0/2
[DeviceD-irf-port2] quit
(4) 保存配置
[DeviceD] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
参照图5和端口连接表连接Device C和Device D以及Device A和Device D之间的IRF端口。
(5) 将设备的运行模式切换到IRF模式
[DeviceD] chassis convert mode irf
The device will switch to IRF mode and reboot.
You are recommended to save the current running configuration and specify the c
onfiguration file for the next startup. Continue? [Y/N]:y
Do you want to convert the content of the next startup configuration file flash
:/startup.cfg to make it available in stack mode? [Y/N]:y
Now rebooting, please wait...
(1) 配置IRF端口1/1与物理端口Ten-GigabitEthernet1/2/0/4绑定
<DeviceA> system-view
[DeviceA] interface ten-gigabitethernet 1/2/0/4
[DeviceA-Ten-GigabitEthernet1/2/0/4] shutdown
[DeviceA-Ten-GigabitEthernet1/2/0/4] quit
[DeviceA] irf-port 1/1
[DeviceA-irf-port1/1] port group interface ten-gigabitethernet 1/2/0/4
[DeviceA-irf-port1/1] quit
[DeviceA] interface ten-gigabitethernet 1/2/0/4
[DeviceA-Ten-GigabitEthernet1/2/0/4] undo shutdown
[DeviceA-Ten-GigabitEthernet1/2/0/4] quit
(2) 配置IRF端口2/2与物理端口Ten-GigabitEthernet2/3/0/30绑定
[DeviceA] interface ten-gigabitethernet 2/3/0/30
[DeviceA-Ten-GigabitEthernet2/3/0/30] shutdown
[DeviceA-Ten-GigabitEthernet2/3/0/30] quit
[DeviceA] irf-port 2/2
[DeviceA-irf-port2/2] port group interface ten-gigabitethernet2/3/0/30
[DeviceA-irf-port2/2] quit
[DeviceA] interface ten-gigabitethernet 2/3/0/30
[DeviceA-Ten-GigabitEthernet2/3/0/30] undo shutdown
[DeviceA-Ten-GigabitEthernet2/3/0/30] quit
(3) 将当前配置保存
[DeviceA] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
[DeviceA] irf-port-configuration active
(1) 设置IRF-C的成员编号
<DeviceC> system-view
[DeviceC] irf member 1 remember 3
Renumbering the member ID may result in configuration change or loss. Continue?[
Y/N]y
[DeviceC] irf member 2 remember 4
Renumbering the member ID may result in configuration change or loss. Continue?[
Y/N]y
(2) 保存当前配置并重启,使新的成员编号生效
[DeviceC] quit
<DeviceC> reboot
Start to check configuration with next startup configuration file, please wait..
.......DONE!
Current configuration may be lost after the reboot, save current configuration?
[Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
This command will reboot the device. Continue? [Y/N]:y
(3) 配置IRF端口3/1与物理端口Ten-GigabitEthernet 3/3/0/15绑定
<DeviceC> system-view
[DeviceC] interface ten-gigabitethernet 3/3/0/15
[DeviceC-Ten-GigabitEthernet3/3/0/15] shutdown
[DeviceC-Ten-GigabitEthernet3/3/0/15] quit
[DeviceC] irf-port 3/1
[DeviceC-irf-port3/1] port group interface ten-gigabitethernet 3/3/0/15
[DeviceC-irf-port3/1] quit
[DeviceC] interface ten-gigabitethernet 3/3/0/15
[DeviceC-Ten-GigabitEthernet3/3/0/15] undo shutdown
[DeviceC-Ten-GigabitEthernet3/3/0/15] quit
(4) 配置IRF端口4/2与物理端口Ten-GigabitEthernet 4/6/0/2绑定
[DeviceC] interface ten-gigabitethernet 4/6/0/2
[DeviceC-Ten-GigabitEthernet4/6/0/2] shutdown
[DeviceC-Ten-GigabitEthernet4/6/0/2] quit
[DeviceC] irf-port 4/2
[DeviceC-irf-port4/2] port group interface ten-gigabitethernet4/6/0/2
[DeviceC-irf-port4/2] quit
[DeviceC] interface ten-gigabitethernet 4/6/0/2
[DeviceC-Ten-GigabitEthernet4/6/0/2] undo shutdown
[DeviceC-Ten-GigabitEthernet4/6/0/2] quit
(5) 将当前配置保存
[DeviceC] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[cfa0:/irf.cfg]
(To leave the existing filename unchanged, press the enter key):
cfa0:/irf.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait.....................................
Saved the current configuration to mainboard device successfully.
[DeviceC] irf-port-configuration active
参照图5和端口连接表连接Device B和Device C以及Device A和Device D之间的IRF端口。
在前面配置完成并重新启动后,IRF已经形成,此时可以进行各个业务模块的配置。IRF形成之后,可以从任何一台成员设备登录进行配置,设备名称缺省为Master的名称(此例中为DeviceA)。
使能BFD MAD检测时,要求MAD VLAN上不能配置其他业务。
# 在IRF上创建Vlan-interface 13用于BFD MAD 检测。
<DeviceA> system-view
[DeviceA] vlan 13
[DeviceA-vlan13] quit
[DeviceA] interface vlan-interface 13
[DeviceA-Vlan-interface13] mad bfd enable
[DeviceA-Vlan-interface13] mad ip address 172.1.1.1 24 member 1
[DeviceA-Vlan-interface13] mad ip address 172.1.1.2 24 member 2
[DeviceA-Vlan-interface13] mad ip address 172.1.1.3 24 member 3
[DeviceA-Vlan-interface13] mad ip address 172.1.1.4 24 member 4
[DeviceA-Vlan-interface13] undo shutdown
[DeviceA-Vlan-interface13] quit
# 配置IRF连接L2 Switch的二层以太网接口加入VLAN 13,并取消接口上的STP功能。
[DeviceA] interface range ten-gigabitEthernet 1/3/0/1 ten-gigabitEthernet 2/3/0/1 ten-gigabitEthernet 3/3/0/1 ten-gigabitEthernet 4/3/0/1
[DeviceA-if-range] undo stp enable
[DeviceA-if-range] port access vlan 13
[DeviceA-if-range] quit
在本例中,为方便理解,我们取消了升级之前IRF设备上的所有业务配置。但是在实际使用中,部分在升级之前已经部署的业务可以无需再重新配置了(例如端口IP地址等)。
# 创建连接接入层交换机SW 1的聚合组,编号为1。
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] quit
# 使用接口批量配置功能配置连接SW 1的端口加入聚合组1。
[DeviceA] interface range ten-gigabitEthernet 1/3/0/3 ten-gigabitEthernet 2/3/0/3 ten-gigabitEthernet 3/3/0/3 ten-gigabitEthernet 4/3/0/3
[DeviceA-if-range] port link-aggregation group 1
[DeviceA-if-range] quit
# 创建连接接入层交换机SW 2的聚合组,编号为2。
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] quit
# 使用接口批量配置功能配置连接SW 2的端口加入聚合组2。
[DeviceA] interface range ten-gigabitEthernet 1/3/0/4 ten-gigabitEthernet 2/3/0/4 ten-gigabitEthernet 3/3/0/4 ten-gigabitEthernet 4/3/0/4
[DeviceA-if-range] port link-aggregation group 2
[DeviceA-if-range] quit
# 配置与SW 1之间通过Vlan-interface 10连接。
[DeviceA] vlan 10
[DeviceA-vlan10] quit
[DeviceA] interface vlan-interface 10
[DeviceA-Vlan-interface10] ip address 172.24.10.254 24
[DeviceA-Vlan-interface10] quit
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] undo port trunk permit vlan 1
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10
[DeviceA-Bridge-Aggregation1] quit
# 配置与SW 2之间通过Vlan-interface 20连接。
[DeviceA] vlan 20
[DeviceA-vlan20] quit
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] ip address 172.24.20.254 24
[DeviceA-Vlan-interface20] quit
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] port link-type trunk
[DeviceA-Bridge-Aggregation2] undo port trunk permit vlan 1
[DeviceA-Bridge-Aggregation2] port trunk permit vlan 20
[DeviceA-Bridge-Aggregation2] quit
# 创建连接IRF的聚合组,编号为1。
<SW1> system-view
[SW1] interface bridge-aggregation 1
[SW1-Bridge-Aggregation1] quit
# 使用接口批量配置功能配置连接IRF的端口加入聚合组1。
[SW1] interface range ten-gigabitethernet 2/0/21 to ten-gigabitethernet 2/0/24
[SW1-if-range] port link-aggregation group 1
[SW1-if-range] quit
# 接入设备SW1上创建所有VLAN。
[SW1] vlan all
# 配置与IRF连接的端口。
[SW1] interface bridge-aggregation 1
[SW1-Bridge-Aggregation1] port link-type trunk
[SW1-Bridge-Aggregation1] undo port trunk permit vlan 1
[SW1-Bridge-Aggregation1] port trunk permit vlan 10
[SW1-Bridge-Aggregation1] quit
# 配置连接服务器的端口GigabitEthernet3/0/1。
[SW1] interface gigabitethernet 3/0/1
[SW1-GigabitEthernet3/0/1] port link-type trunk
[SW1-GigabitEthernet3/0/1] port trunk permit vlan all
[SW1-GigabitEthernet3/0/1] undo port trunk permit vlan 1
[SW1-GigabitEthernet3/0/1] quit
# 创建连接IRF的聚合组,编号为1。
<SW2> system-view
[SW2] interface bridge-aggregation 1
[SW2-Bridge-Aggregation1] quit
# 使用接口批量配置功能配置连接IRF的端口加入聚合组1。
[SW2] interface range ten-gigabitethernet 2/0/21 to ten-gigabitethernet 2/0/24
[SW2-if-range] port link-aggregation group 1
[SW2-if-range] quit
# 接入设备SW 2上创建所有VLAN。
[SW2] vlan all
# 配置与IRF连接的端口。
[SW2] interface bridge-aggregation 1
[SW2-Bridge-Aggregation1] port link-type trunk
[SW2-Bridge-Aggregation1] undo port trunk permit vlan 1
[SW2-Bridge-Aggregation1] port trunk permit vlan 20
[SW2-Bridge-Aggregation1] quit
# 配置连接服务器的端口。
[SW2] interface gigabitethernet 3/0/1
[SW2-GigabitEthernet3/0/1] port link-type trunk
[SW2-GigabitEthernet3/0/1] port trunk permit vlan all
[SW2-GigabitEthernet3/0/1] undo port trunk permit vlan 1
[SW2-GigabitEthernet3/0/1] quit
# 创建连接出口路由器Router A的聚合组,编号为1024。
[DeviceA] interface bridge-aggregation 1024
[DeviceA-Bridge-Aggregation1024] quit
# 使用接口批量配置功能配置连接Router A的端口加入聚合组1024。
[DeviceA] interface range ten-gigabitethernet 1/3/0/8 ten-gigabitethernet 2/3/0/8 ten-gigabitethernet 3/3/0/8 ten-gigabitethernet 4/3/0/8
[DeviceA-if-range] port link-aggregation group 1024
[DeviceA-if-range] quit
# 配置与Router A之间通过Vlan-interface41连接。
[DeviceA] vlan 41
[DeviceA-vlan41] quit
[DeviceA] interface vlan-interface 41
[DeviceA-Vlan-interface41] ip address 172.24.41.254 24
[DeviceA-Vlan-interface41] quit
[DeviceA] interface bridge-aggregation 1024
[DeviceA-Bridge-Aggregation1024] port access vlan 41
[DeviceA-Bridge-Aggregation1024] quit
# 配置IRF与出口路由器之间运行OSPF路由协议。
[DeviceA] interface loopback 0
[DeviceA-LoopBack0] ip address 172.24.254.1 255.255.255.255
[DeviceA-LoopBack0] quit
[DeviceA] ospf 1 router-id 172.24.254.1
[DeviceA-ospf-1] import-route direct
[DeviceA-ospf-1] area 0
[DeviceA-ospf-1-area-0.0.0.0] network 172.24.41.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] quit
[DeviceA-ospf-1] quit
出口路由器配置本用例只描述与IRF连接的部分,外网使用何种路由协议不予描述。
# 创建连接IRF的聚合组,编号为1。
<RouterA> system-view
[RouterA] interface bridge-aggregation 1
[RouterA-Bridge-Aggregation1] quit
# 配置连接IRF的端口加入聚合组1。
[RouterA] interface range ten-gigabitethernet 2/0/1 to interface ten-gigabitethernet 2/0/4
[RouterA-if-range] port link-aggregation group 1
[RouterA-if-range] quit
# 配置与IRF之间通过Vlan-interface 41连接。
[RouterA] vlan 41
[RouterA-vlan41] quit
[RouterA] interface vlan-interface 41
[RouterA-Vlan-interface41] ip address 172.24.41.2 24
[RouterA-Vlan-interface41] quit
[RouterA] interface bridge-aggregation 1
[RouterA-Bridge-Aggregation1] port access vlan 41
[RouterA-Bridge-Aggregation1] quit
# 配置Router A通过Vlan-interface 50连接外网。
[RouterA] vlan 50
[RouterA-vlan50] quit
[RouterA] interface vlan-interface 50
[RouterA-Vlan-interface50] ip address 172.24.1.2 24
[RouterA-Vlan-interface50] quit
[RouterA] interface ten-gigabitethernet 4/0/3
[RouterA-Ten-GigabitEthernet4/0/3] port link-mode bridge
[RouterA-Ten-GigabitEthernet4/0/3] port access vlan 50
[RouterA-Ten-GigabitEthernet4/0/3] quit
# 配置Router A与IRF之间运行OSPF路由协议。
[RouterA] interface loopback 0
[RouterA-LoopBack0] ip addresss 172.24.254.2 255.255.255.255
[RouterA-LoopBack0] quit
[RouterA] ospf 1 router-id 172.24.254.2
[RouterA-ospf-1] import-route direct
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] network 172.24.41.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
(1) 验证IRF是否建立成功
# 使用display irf topology命令查看八个IRF口都是UP状态,说明四台设备建立IRF成功。
<DeviceA> display irf topology
Topology Info
-------------------------------------------------------------------------
IRF-Port1 IRF-Port2
Switch Link neighbor Link neighbor Belong To
1 UP 4 UP 2 0210-fc01-0000
4 UP 3 UP 1 0210-fc01-0000
3 UP 2 UP 4 0210-fc01-0000
2 UP 1 UP 3 0210-fc01-0000
(2) 验证跨框聚合链路备份功能
# 从serverGroup 1任意挑选一台PC ping外网IP,同时将IRF连接出口路由器的Ten-GigabitEthernet 1/3/0/8端口shutdown。
[DeviceA] interface ten-gigabitethernet 1/3/0/8
[DeviceA-Ten-GigabitEthernet1/3/0/8] shutdown
仍然可以ping通外网。
# 重新使Ten-GigabitEthernet 1/3/0/8端口状态UP,持续ping外网IP。
[DeviceA-Ten-GigabitEthernet1/3/0/8] undo shutdown
[DeviceA-Ten-GigabitEthernet1/3/0/8] quit
# 关闭IRF的另外一个上行端口Ten-GigabitEthernet 2/3/0/8。
[DeviceA] interface ten-gigabitethernet 2/3/0/8
[DeviceA-Ten-GigabitEthernet2/3/0/8] shutdown
仍然可以ping通外网。
· IRF:
#
irf mac-address persistent always
irf auto-update enable
undo irf auto-merge enable
undo irf link-delay
irf member 1 priority 1
irf member 2 priority 1
irf member 3 priority 1
irf member 4 priority 1
#
ospf 1 router-id 172.24.254.1
import-route direct
area 0.0.0.0
network 172.24.41.0 0.0.0.255
#
vlan 10
#
vlan 20
#
vlan 13
#
vlan 41
#
irf-port 1/1
port group interface Ten-GigabitEthernet1/2/0/4 mode enhanced
#
irf-port 1/2
port group interface Ten-GigabitEthernet1/2/0/1 mode enhanced
#
irf-port 2/1
port group interface Ten-GigabitEthernet2/4/0/2 mode enhanced
#
irf-port 2/2
port group interface Ten-GigabitEthernet2/3/0/30 mode enhanced
#
irf-port 3/1
port group interface Ten-GigabitEthernet3/3/0/15 mode enhanced
#
irf-port 3/2
port group interface Ten-GigabitEthernet3/12/0/1 mode enhanced
#
irf-port 4/1
port group interface Ten-GigabitEthernet4/6/0/4 mode enhanced
#
irf-port 4/2
port group interface Ten-GigabitEthernet4/6/0/2 mode enhanced
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
mad enable
link-aggregation mode dynamic
#
interface bridge-aggregation 2
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
#
interface bridge-aggregation 1024
port access vlan 41
#
interface loopback 0
ip address 172.24.254.1 255.255.255.255
#
interface vlan-interface 10
ip address 172.24.10.254 24
#
interface vlan-interface13
mad bfd enable
mad ip address 1.1.1.4 255.255.255.0 member 1
mad ip address 1.1.1.1 255.255.255.0 member 2
mad ip address 1.1.1.2 255.255.255.0 member 3
mad ip address 1.1.1.3 255.255.255.0 member 4
#
interface vlan-interface 20
ip address 172.24.20.254 24
#
interface vlan-interface 41
ip address 172.24.41.254 24
#
interface Ten-GigabitEthernet 1/3/0/1
port link-mode bridge
port access vlan 13
undo stp enable
#
interface Ten-GigabitEthernet 1/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 1/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 1/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
interface Ten-GigabitEthernet 2/3/0/1
port link-mode bridge
port access vlan 13
undo stp enable
#
interface Ten-GigabitEthernet 2/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 2/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
interface Ten-GigabitEthernet 3/3/0/1
port link-mode bridge
port access vlan 13
undo stp enable
#
interface Ten-GigabitEthernet 3/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 3/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 3/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
interface Ten-GigabitEthernet 4/3/0/1
port link-mode bridge
port access vlan 13
undo stp enable
#
interface Ten-GigabitEthernet 4/3/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 4/3/0/4
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 2
#
interface Ten-GigabitEthernet 4/3/0/8
port link-mode bridge
port access vlan 41
port link-aggregation group 1024
#
· SW1:
#
vlan 10
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
link-aggregation mode dynamic
#
interface gigabitethernet 3/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 2 to 4094
#
interface Ten-GigabitEthernet 2/0/21
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/22
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/23
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/24
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10
port link-aggregation group 1
#
· SW2:
#
vlan 20
#
interface bridge-aggregation 1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
#
interface gigabitethernet 3/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 2 to 4094
#
interface Ten-GigabitEthernet 2/0/21
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/22
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/23
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/24
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 20
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/41
port link-mode bridge
port access vlan 13
#
interface Ten-GigabitEthernet 2/0/42
port link-mode bridge
port access vlan 13
#
interface Ten-GigabitEthernet 2/0/43
port link-mode bridge
port access vlan 13
#
interface Ten-GigabitEthernet 2/0/44
port link-mode bridge
port access vlan 13
#
· RouterA:
#
ospf 1 router-id 172.24.254.2
import-route direct
area 0.0.0.0
network 172.24.41.0 0.0.0.255
#
vlan 41
#
vlan 50
#
interface bridge-aggregation 1
port access vlan 41
#
interface loopback 0
ip address 172.24.254.2 255.255.255.255
#
interface vlan-interface 41
ip address 172.24.41.2 24
#
interface vlan-interface 50
ip address 172.24.1.2 24
#
interface Ten-GigabitEthernet 2/0/1
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/2
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/3
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/4
port link-mode bridge
port access vlan 41
port link-aggregation group 1
#
interface Ten-GigabitEthernet 2/0/12
port link-mode bridge
port access vlan 50
#
· H3C S7600-X系列交换机 虚拟化技术配置指导-R757X
· H3C S7600-X系列交换机 虚拟化技术命令参考-R757X
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!