IRF(Intelligent Resilient Framework,智能弹性架构)是 H3C 自主研发的软件虚拟化技术,通过
将多台设备虚拟为一台设备,可以简化网络拓扑,提高管理效率,并能提供 1:N 的设备级备份,帮
助您实现业界领先的企业网、数据中心汇聚/核心层解决方案。
硬件限制
S5820V2 和 S5830V2 系列交换机不但可以与本系列内的交换机建立 IRF,而且这两个系列的设备
之间也能够建立 IRF,但都不能与其它系列的产品建立 IRF。
软件限制
参与组建 IRF 的 S5820V2&S5830V2 系列交换机必须使用相同的软件版本
连接及端口限制
S5820V2-52Q/S5820V2-52QF/S5820V2-54QS-GE 交换机上的所有 10GE 以太网口、SFP+口或
QSFP+口以及 S5830V2-24S 交换机上的所有 SFP+口都可以用于 IRF 连接。如果选择 10GE 以太
网口或 SFP+口作为 IRF 物理端口,需要注意的是:
• S5820V2-52QF/S5830V2-24S 设备上的 SFP+口根据端口编号进行分组,从编号 1 开始,按
端口编号由小到大的顺序,每4个SFP+口分为一组。同一组中的所有端口用途必须相同,即
必须同时作为普通业务端口或 IRF 物理端口。
• S5820V2-52Q 设备上的 10GE 以太网口根据端口编号进行分组,从编号 1 开始,按端口编号
由小到大的顺序,每 4 个 10GE 以太网口分为一组。同一组中的所有端口用途必须相同,即
必须同时作为普通业务端口或 IRF 物理端口。
• S5820V2-54QS-GE设备上的 4个 SFP+口用途必须相同,即必须同时作为 IRF物理端口或普
通业务端口。
• 在将某个 10GE 以太网口或 SFP+口与 IRF 端口进行绑定或取消绑定之前,必须先对该接口所
在组内的所有接口执行 shutdown 操作;在完成绑定或取消绑定操作后,再对同组内所有接
口执行 undo shutdown 操作。使用接口批量配置功能可以更快捷的完成以上操作。
看完介绍,我再举个例子具体讲解下irf是如何配置的
首先我们先确认一些信息
使用的堆叠口为XG1/0/49 到 XG1/0/52
左边的设备设置member 号为1使用irf端口1-1
右边的设备设置member 号为2使用irf端口2-2
左边的设备irf优先级为32作为主设备,右边的设备irf优先级为1作为备用设备
好的,我们先看下没有做irf前设备时啥样的:
在左边的设备上敲dis irf 查看 irf信息
[H3C-Ten-GigabitEthernet1/0/51]dis irf
MemberID Role Priority CPU-Mac Description
*+1 Master 1 58ab-818c-0104 ---
--------------------------------------------------
* indicates the device is the master.
+ indicates the device through which the user logs in.
The bridge MAC of the IRF is: 58ab-818c-0100
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
memberid就是设备的member号,member号决定了端口号
交换机的端口命名格式: 接口类型/ 框号/插槽号/端口号
当member号发生改变时,对应端口的框号就会发送改变
Role下面写的时Master代表时主设备的意思,与之对应的是Standby备用设备
当设备没有做irf时每台设备都会宣称自己时master主设备,当irf配置生效后,同一irf组中只用优先级最大的设备才会宣传自己时master ,其余设备会宣传自己时Standby备用设备
我们可以先看下左边设备上的端口是否包含右边设备的端口
dis interface brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
InLoop0 UP UP(s) --
MGE0/0/0 DOWN DOWN --
NULL0 UP UP(s) --
REG0 UP -- --
Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
FGE1/0/53 DOWN 40G A A 1
FGE1/0/54 DOWN 40G A A 1
GE1/0/1 DOWN auto A A 1
GE1/0/2 DOWN auto A A 1
GE1/0/3 DOWN auto A A 1
GE1/0/4 DOWN auto A A 1
GE1/0/5 DOWN auto A A 1
GE1/0/6 DOWN auto A A 1
GE1/0/7 DOWN auto A A 1
GE1/0/8 DOWN auto A A 1
GE1/0/9 DOWN auto A A 1
GE1/0/10 DOWN auto A A 1
GE1/0/11 DOWN auto A A 1
GE1/0/12 DOWN auto A A 1
GE1/0/13 DOWN auto A A 1
GE1/0/14 DOWN auto A A 1
GE1/0/15 DOWN auto A A 1
GE1/0/16 DOWN auto A A 1
GE1/0/17 DOWN auto A A 1
GE1/0/18 DOWN auto A A 1
GE1/0/19 DOWN auto A A 1
GE1/0/20 DOWN auto A A 1
GE1/0/21 DOWN auto A A 1
GE1/0/22 DOWN auto A A 1
GE1/0/23 DOWN auto A A 1
GE1/0/24 DOWN auto A A 1
GE1/0/25 DOWN auto A A 1
GE1/0/26 DOWN auto A A 1
GE1/0/27 DOWN auto A A 1
GE1/0/28 DOWN auto A A 1
GE1/0/29 DOWN auto A A 1
GE1/0/30 DOWN auto A A 1
GE1/0/31 DOWN auto A A 1
GE1/0/32 DOWN auto A A 1
GE1/0/33 DOWN auto A A 1
GE1/0/34 DOWN auto A A 1
GE1/0/35 DOWN auto A A 1
GE1/0/36 DOWN auto A A 1
GE1/0/37 DOWN auto A A 1
GE1/0/38 DOWN auto A A 1
GE1/0/39 DOWN auto A A 1
GE1/0/40 DOWN auto A A 1
GE1/0/41 DOWN auto A A 1
GE1/0/42 DOWN auto A A 1
GE1/0/43 DOWN auto A A 1
GE1/0/44 DOWN auto A A 1
GE1/0/45 DOWN auto A A 1
GE1/0/46 DOWN auto A A 1
GE1/0/47 DOWN auto A A 1
GE1/0/48 DOWN auto A A 1
XGE1/0/49 DOWN 10G F A 1
XGE1/0/50 DOWN 10G F A 1
XGE1/0/51 DOWN 10G F A 1
XGE1/0/52 DOWN 10G F A 1
只能看到自己的端口信息
现在配置irf (注意配置前需要将堆叠线拆除)
就像这样
左边的交换机的配置
[H3C]interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/52
# 进入端口Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/52 批量配置组中
[H3C-if-range]shutdown
#关闭批量配置组中的所有端口
[H3C-if-range]quit
#退出批量配置组
[H3C]irf member 1 priority 32
#配置当前的irf成员id1的优先级为32(最高等级32,默认为1)
[H3C]irf-port 1/1
#进入irf端口1/1
[H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/49
#将端口Ten-GigabitEthernet 1/0/49 加入到当前irf端口中
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.
#提示说:必须使用命令"irf-port-configuration active" 激活irf端口配置
[H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/50
#将端口Ten-GigabitEthernet 1/0/50 加入到当前irf端口中
[H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/51
#将端口Ten-GigabitEthernet 1/0/51 加入到当前irf端口中
[H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/52
#将端口Ten-GigabitEthernet 1/0/52 加入到当前irf端口中
[H3C-irf-port1/1]quit
#退出irf端口1/1
[H3C]irf-port-configuration active
#激活irf端口配置
[H3C]interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/52
# 进入端口Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/52 批量配置组中
[H3C-if-range]undo shutdown
#开启批量配置组中的所有端口
[H3C-if-range]save
#保存当前配置信息
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
[H3C-if-range]
#此时左边交换机上的irf配置已经做完了
具体的配置命令脚本我会在结尾出分享出来,请各位读者耐心阅读,谢谢!!!
我们再来配置右边的交换机
首先我们在右边交换机上配置如下命令将其irf成员id变成2
[H3C]irf member 1 renumber 2
#首先我们将当前的irf成员id1重命名为2
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
#提示:重新编号成员ID可能会导致配置更改或丢失。继续?,我们输入y即可
[H3C]quit
#退出系统视图
reboot
#重启设备
此时重启完设备后irf 成员id就会变成2
我们查看下重启后的irf信息,发现irf成员id变成2
[H3C]dis irf
MemberID Role Priority CPU-Mac Description
*+2 Master 1 58ab-8bfb-0204 ---
--------------------------------------------------
* indicates the device is the master.
+ indicates the device through which the user logs in.
The bridge MAC of the IRF is: 58ab-8bfb-0200
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
端口号也会发生变化
[H3C]dis interface brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
InLoop0 UP UP(s) --
MGE0/0/0 DOWN DOWN --
NULL0 UP UP(s) --
REG0 UP -- --
Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
FGE2/0/53 DOWN 40G A A 1
FGE2/0/54 DOWN 40G A A 1
GE2/0/1 DOWN auto A A 1
GE2/0/2 DOWN auto A A 1
GE2/0/3 DOWN auto A A 1
GE2/0/4 DOWN auto A A 1
GE2/0/5 DOWN auto A A 1
GE2/0/6 DOWN auto A A 1
GE2/0/7 DOWN auto A A 1
GE2/0/8 DOWN auto A A 1
GE2/0/9 DOWN auto A A 1
GE2/0/10 DOWN auto A A 1
GE2/0/11 DOWN auto A A 1
GE2/0/12 DOWN auto A A 1
GE2/0/13 DOWN auto A A 1
GE2/0/14 DOWN auto A A 1
GE2/0/15 DOWN auto A A 1
GE2/0/16 DOWN auto A A 1
GE2/0/17 DOWN auto A A 1
GE2/0/18 DOWN auto A A 1
GE2/0/19 DOWN auto A A 1
GE2/0/20 DOWN auto A A 1
GE2/0/21 DOWN auto A A 1
GE2/0/22 DOWN auto A A 1
GE2/0/23 DOWN auto A A 1
GE2/0/24 DOWN auto A A 1
GE2/0/25 DOWN auto A A 1
GE2/0/26 DOWN auto A A 1
GE2/0/27 DOWN auto A A 1
GE2/0/28 DOWN auto A A 1
GE2/0/29 DOWN auto A A 1
GE2/0/30 DOWN auto A A 1
GE2/0/31 DOWN auto A A 1
GE2/0/32 DOWN auto A A 1
GE2/0/33 DOWN auto A A 1
GE2/0/34 DOWN auto A A 1
GE2/0/35 DOWN auto A A 1
GE2/0/36 DOWN auto A A 1
GE2/0/37 DOWN auto A A 1
GE2/0/38 DOWN auto A A 1
GE2/0/39 DOWN auto A A 1
GE2/0/40 DOWN auto A A 1
GE2/0/41 DOWN auto A A 1
GE2/0/42 DOWN auto A A 1
GE2/0/43 DOWN auto A A 1
GE2/0/44 DOWN auto A A 1
GE2/0/45 DOWN auto A A 1
GE2/0/46 DOWN auto A A 1
GE2/0/47 DOWN auto A A 1
GE2/0/48 DOWN auto A A 1
XGE2/0/49 DOWN 10G F A 1
XGE2/0/50 DOWN 10G F A 1
XGE2/0/51 DOWN 10G F A 1
XGE2/0/52 DOWN 10G F A 1
[H3C]
好的,我们继续配置右边的交换机
[H3C]interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/52
# 进入端口Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/52 批量配置组中
[H3C-if-range]shutdown
#关闭批量配置组中的所有端口
[H3C]irf member 2 priority 1
#配置当前的irf成员id2的优先级为1(最高等级32,默认为1)
[H3C]irf-port 2/2
#进入irf端口2/2
[H3C-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/49
#将端口Ten-GigabitEthernet 1/0/49 加入到当前irf端口中
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.
#提示说:必须使用命令"irf-port-configuration active" 激活irf端口配置
[H3C-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/50
#将端口Ten-GigabitEthernet 2/0/50 加入到当前irf端口中
[H3C-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/51
#将端口Ten-GigabitEthernet 2/0/51 加入到当前irf端口中
[H3C-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/52
#将端口Ten-GigabitEthernet 2/0/52 加入到当前irf端口中
[H3C-irf-port2/2]quit
#退出irf端口2/2
[H3C]irf-port-configuration active
#激活irf端口配置
[H3C]interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/52
# 进入端口Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/52 批量配置组中
[H3C-if-range]undo shutdown
#开启批量配置组中的所有端口
[H3C-if-range]quit
#退出批量配置组
[H3C]save
#保存当前配置信息
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
flash:/startup.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
[H3C]
好的,此时irf配置我们已经全部做完了,将堆叠口的万兆尾纤插上后,右边的交换机(也就时我们计划作为备用设备的那台交换机)就会重启,重启完成后堆叠就成功了。
好的,我们再左边交换机上查看配置信息
dis irf
MemberID Role Priority CPU-Mac Description
*+1 Master 1 58ab-818c-0104 ---
2 Standby 1 58ab-8bfb-0204 ---
--------------------------------------------------
* indicates the device is the master.
+ indicates the device through which the user logs in.
The bridge MAC of the IRF is: 58ab-818c-0100
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
此时我们可以看到有两个设备了,
一个的member id 为1 优先级为32 是(master)主设备
另一个的member id 为2 优先级为1 是(standby)备用设备
星号标识的是master(主设备)
加号标识的是当前登陆的设备
也就是说我们当前登陆的左边的这台交换机是主设备
我们再来看 下是否能在左边设备上看到右边设备上的端口
dis interface brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
InLoop0 UP UP(s) --
MGE0/0/0 DOWN DOWN --
NULL0 UP UP(s) --
REG0 UP -- --
Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
FGE1/0/53 DOWN 40G A A 1
FGE1/0/54 DOWN 40G A A 1
FGE2/0/53 DOWN 40G A A 1
FGE2/0/54 DOWN 40G A A 1
GE1/0/1 DOWN auto A A 1
GE1/0/2 DOWN auto A A 1
GE1/0/3 DOWN auto A A 1
GE1/0/4 DOWN auto A A 1
GE1/0/5 DOWN auto A A 1
GE1/0/6 DOWN auto A A 1
GE1/0/7 DOWN auto A A 1
GE1/0/8 DOWN auto A A 1
GE1/0/9 DOWN auto A A 1
GE1/0/10 DOWN auto A A 1
GE1/0/11 DOWN auto A A 1
GE1/0/12 DOWN auto A A 1
GE1/0/13 DOWN auto A A 1
GE1/0/14 DOWN auto A A 1
GE1/0/15 DOWN auto A A 1
GE1/0/16 DOWN auto A A 1
GE1/0/17 DOWN auto A A 1
GE1/0/18 DOWN auto A A 1
GE1/0/19 DOWN auto A A 1
GE1/0/20 DOWN auto A A 1
GE1/0/21 DOWN auto A A 1
GE1/0/22 DOWN auto A A 1
GE1/0/23 DOWN auto A A 1
GE1/0/24 DOWN auto A A 1
GE1/0/25 DOWN auto A A 1
GE1/0/26 DOWN auto A A 1
GE1/0/27 DOWN auto A A 1
GE1/0/28 DOWN auto A A 1
GE1/0/29 DOWN auto A A 1
GE1/0/30 DOWN auto A A 1
GE1/0/31 DOWN auto A A 1
GE1/0/32 DOWN auto A A 1
GE1/0/33 DOWN auto A A 1
GE1/0/34 DOWN auto A A 1
GE1/0/35 DOWN auto A A 1
GE1/0/36 DOWN auto A A 1
GE1/0/37 DOWN auto A A 1
GE1/0/38 DOWN auto A A 1
GE1/0/39 DOWN auto A A 1
GE1/0/40 DOWN auto A A 1
GE1/0/41 DOWN auto A A 1
GE1/0/42 DOWN auto A A 1
GE1/0/43 DOWN auto A A 1
GE1/0/44 DOWN auto A A 1
GE1/0/45 DOWN auto A A 1
GE1/0/46 DOWN auto A A 1
GE1/0/47 DOWN auto A A 1
GE1/0/48 DOWN auto A A 1
GE2/0/1 DOWN auto A A 1
GE2/0/2 DOWN auto A A 1
GE2/0/3 DOWN auto A A 1
GE2/0/4 DOWN auto A A 1
GE2/0/5 DOWN auto A A 1
GE2/0/6 DOWN auto A A 1
GE2/0/7 DOWN auto A A 1
GE2/0/8 DOWN auto A A 1
GE2/0/9 DOWN auto A A 1
GE2/0/10 DOWN auto A A 1
GE2/0/11 DOWN auto A A 1
GE2/0/12 DOWN auto A A 1
GE2/0/13 DOWN auto A A 1
GE2/0/14 DOWN auto A A 1
GE2/0/15 DOWN auto A A 1
GE2/0/16 DOWN auto A A 1
GE2/0/17 DOWN auto A A 1
GE2/0/18 DOWN auto A A 1
GE2/0/19 DOWN auto A A 1
GE2/0/20 DOWN auto A A 1
GE2/0/21 DOWN auto A A 1
GE2/0/22 DOWN auto A A 1
GE2/0/23 DOWN auto A A 1
GE2/0/24 DOWN auto A A 1
GE2/0/25 DOWN auto A A 1
GE2/0/26 DOWN auto A A 1
GE2/0/27 DOWN auto A A 1
GE2/0/28 DOWN auto A A 1
GE2/0/29 DOWN auto A A 1
GE2/0/30 DOWN auto A A 1
GE2/0/31 DOWN auto A A 1
GE2/0/32 DOWN auto A A 1
GE2/0/33 DOWN auto A A 1
GE2/0/34 DOWN auto A A 1
GE2/0/35 DOWN auto A A 1
GE2/0/36 DOWN auto A A 1
GE2/0/37 DOWN auto A A 1
GE2/0/38 DOWN auto A A 1
GE2/0/39 DOWN auto A A 1
GE2/0/40 DOWN auto A A 1
GE2/0/41 DOWN auto A A 1
GE2/0/42 DOWN auto A A 1
GE2/0/43 DOWN auto A A 1
GE2/0/44 DOWN auto A A 1
GE2/0/45 DOWN auto A A 1
GE2/0/46 DOWN auto A A 1
GE2/0/47 DOWN auto A A 1
GE2/0/48 DOWN auto A A 1
XGE1/0/49 UP 10G F -- --
XGE1/0/50 UP 10G F -- --
XGE1/0/51 UP 10G F -- --
XGE1/0/52 UP 10G F -- --
XGE2/0/49 UP 10G F -- --
XGE2/0/50 UP 10G F -- --
XGE2/0/51 UP 10G F -- --
XGE2/0/52 UP 10G F -- --
可以看到右边交换机上的端口
左边的交换机
#
sys
#
interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/52
#
shutdown
#
quit
#
irf member 1 priority 32
#
irf-port 1/1
#
port group interface Ten-GigabitEthernet 1/0/49
#
port group interface Ten-GigabitEthernet 1/0/50
#
port group interface Ten-GigabitEthernet 1/0/51
#
port group interface Ten-GigabitEthernet 1/0/52
#
quit
#
irf-port-configuration active
#
interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/52
#
undo shutdown
#
save
右边交换机的命令
sys
#
irf member 1 renumber 2
#
quit
#
reboot
#
sys
#
interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/52
#
shutdown
#
irf member 2 priority 1
#
irf-port 2/2
#
port group interface Ten-GigabitEthernet 2/0/49
#
port group interface Ten-GigabitEthernet 2/0/50
#
port group interface Ten-GigabitEthernet 2/0/51
#
port group interface Ten-GigabitEthernet 2/0/52
#
quit
#
irf-port-configuration active
#
interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/52
#
undo shutdown
#
quit
#
save