实验拓扑
图 1-1
注:如无特别说明,描述中的 R1 或 SW1 对应拓扑中设备名称末尾数字为 1 的设备,R2 或 SW2 对应拓扑中设备名称末尾数字为 2 的设备,以此类推;此拓扑请严格按照图示接口连接线缆
实验需求
-
SW1,SW2,SW3,SW4 组成一台 IRF 堆叠设备
-
交换机 IRF 设备 ID 与设备编号一致
实验解法
分析:根据需求,交换机 IRF 设备 ID 与设备编号一致,所以需要修改 SW2,SW3,SW4 的 IRF 设备 ID,并保存配置后,重启生效后才可进行后续配置
步骤 1:修改 SW2 的 IRF 设备 ID 为 2,保存配置,并重启生效
[H3C]sysn sw2
[sw2]irf me 1 re 2
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
[sw2]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
[sw2]qu
<sw2>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
This command will reboot the device. Continue? [Y/N]:y
步骤 2:SW3 和 SW4 修改 IRF 设备 ID 方法与 SW2 一致,重启后,通过命令
[sw3]irf me 1 re 3
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
[sw3]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.
[sw3]qu
<sw3>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
This command will reboot the device. Continue? [Y/N]:y
[sw4]irf me 1 re 4
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
[sw4]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.
[sw4]qu
<sw4>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
This command will reboot the device. Continue? [Y/N]:y
确认设备 ID 已修改
步骤 3:在 SW1 上手动关闭堆叠物理口 F1/0/53 和 F1/0/54 口
<sw1>SYS
System View: return to User View with Ctrl+Z.
[sw1]int ran f1/0/53 to f1/0/54
[sw1-if-range]shut
步骤 4:在 SW1 上创建堆叠口 IRF-PORT1/1,并加入物理口 F1/0/53,创建堆叠口 IRF-PORT1/2,并加入物理口 F1/0/54
[sw1-if-range]irf-port 1/1
[sw1-irf-port1/1]port gr int f1/0/53
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.
[sw1-irf-port1/1]irf-port 1/2
[sw1-irf-port1/2]port gr int f1/0/54
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.
步骤 5:在 SW1 上手动开启之前关闭的堆叠物理口 F1/0/53 和 F1/0/54
[sw1-irf-port1/2]int ran f1/0/53 to f1/0/54
[sw1-if-range]undo shut
步骤 6:在 SW1 上保存配置
[sw1-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.
步骤 7:在 SW1 上激活 IRF 配置
[sw1-if-range]irf-port-con ac
步骤 8:SW2,SW3 和 SW4 配置方法与 SW1 一致,配置时注意设备 ID 已变更,切记一定要保存,选举失败的设备会自动重启堆叠,如果没有保存,重启会丢失所有的配置。
SW2
[sw2]int ran f2/0/53 to f2/0/54
[sw2-if-range]shut
[sw2-if-range]irf-port 2/2
[sw2-irf-port2/2]port gr int f2/0/54
[sw2-irf-port2/2]irf-port 2/1
[sw2-irf-port2/1]port gr int f2/0/53
[sw2-irf-port2/1]int ran f2/0/53 to f2/0/54
[sw2-if-range]undo shut
[sw2-if-range]save
[sw2-if-range]irf-port-con ac
SW3
[sw3]int ran f3/0/53 to f3/0/54
[sw3-if-range]shut
[sw3-if-range]irf-port 3/2
[sw3-irf-port3/2]port gr int f3/0/54
[sw3-irf-port3/2]irf-port 3/1
[sw3-irf-port3/1]port gr int f3/0/53
[sw3]int ran f3/0/53 to f3/0/54
[sw3-if-range]undo shut
[sw4-if-range]save
[sw3-irf-port3/1]irf-port-con ac
SW4
[sw4]int ran f4/0/53 to f4/0/54
[sw4-if-range]shut
[sw4-if-range]irf-port 4/2
[sw4-irf-port4/2]port gr int f4/0/54
[sw4-irf-port4/2]irf-port 4/1
[sw4-irf-port4/1]port gr int f4/0/53
[sw4-irf-port4/1]int ran f4/0/53 to f4/0/54
[sw4-if-range]undo shut
[sw4-if-range]save
[sw4-if-range]irf-port-con ac
步骤 9:SW2,SW3 和 SW4 配置完成后,所有交换机会自动选举 Master 设备,选举失败的设备会自动重启,重启完成后堆叠建立完成,所有 Slave 设备的配置会与 Master 设备同步,4台设备会被堆叠成为逻辑上的一台设备。
[sw1]dis cur