ps:这里的实验环境用华三模拟器来操作。
堆叠用我自己的话说就是:将多个交换机作为一个交换机来使用(逻辑上和物理上),这点特别要和级联区分开来。
irf区域设置为10,IRFSW1为member 1,优先级设置为10;IRFSW2为member 2,优先级保持默认 1.
irf 区域设置,并设置member 1的优先级。(默认编号也是1)
[IRFSW1]irf domain 10
[IRFSW1]irf member 1 priority 10
先关闭端口,然后创建irf-port 1/1(member号/逻辑口编号),然后将物理口加入,再开启刚关闭的端口。
[IRFSW1]interface range Ten-GigabitEthernet 1/0/50 to Ten-GigabitEthernet 1/0/51
[IRFSW1-if-range]shutdown
[IRFSW1]irf-port 1/1
[IRFSW1-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/50
[IRFSW1-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/51
[IRFSW1]interface range Ten-GigabitEthernet 1/0/50 to Ten-GigabitEthernet 1/0/51
[IRFSW1-if-range]undo shutdown
更改成员编号后需要保存配置后,重启使其生效。次时端口号变为2/0/50,2/0/51…
[IRFSW2]irf domain 10
[IRFSW2]irf member 1 renumber 2
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.
reboot
这步和IRFSW1差不多,但是有一点很重要,特别是对多层堆叠:
irf-port 后面跟的1/1,2/2不是随便弄的,前者(数字)是交换机的成员编号,后者是成员编号对应的逻辑口号,每台只有1,2两个,你可以是n/1,n/2,但是如果你是n/1的话,那你下一个就只能是n+1/2,如果是n/2就和n/1配对,不可以两个都是1或者都是2。
[IRFSW2]interface range Ten-GigabitEthernet 2/0/50 to Ten-GigabitEthernet 2/0/51
[IRFSW2-if-range]shutdown
[IRFSW2]irf-port 2/2
[IRFSW2-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/50
[IRFSW2-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/51
[IRFSW2]interface range Ten-GigabitEthernet 2/0/50 to Ten-GigabitEthernet 2/0/51
[IRFSW2-if-range]undo shut
[IRFSW2-if-range]undo shutdown
这一步应该是比较坑的,[IRFSW2]irf-port-configuration active
会自动重启,如果你在这步之前没保存,无疑相当于自杀,哈哈哈!两个机器都需要。
如果你发现命令行没反应不是卡了,是正在重启。
这样就算二层的堆叠好了。
成功以后每台设备的名称会自动变成主设备的名称。
以上面二层堆叠为基础。
IRFSW1为主,IRFSW3和IRFSW2一样优先级保持默认,member 3.
IRFSW1:
[IRFSW1]interface Ten-GigabitEthernet 1/0/49
[IRFSW1-Ten-GigabitEthernet1/0/49]shutdown
[IRFSW1]interface Ten-GigabitEthernet 1/0/52
[IRFSW1-Ten-GigabitEthernet1/0/52]shutdown
[IRFSW1]irf-port 1/2
[IRFSW1-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/49
[IRFSW1-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/52
[IRFSW1-irf-port1/2]interface Ten-GigabitEthernet 1/0/52
[IRFSW1-Ten-GigabitEthernet1/0/52]undo shutdown
[IRFSW1-Ten-GigabitEthernet1/0/52]interface Ten-GigabitEthernet 1/0/49
[IRFSW1-Ten-GigabitEthernet1/0/49]undo shutdown
IRFSW3:
更改成员号,重启。
[IRFSW3]irf domain 10
[IRFSW3]irf member 1 renumber 3
save
reboot
[IRFSW3]interface range Ten-GigabitEthernet 3/0/50 to Ten-GigabitEthernet 3/0/51
[IRFSW3-if-range]shutdown
[IRFSW3-if-range]irf-port 3/1
[IRFSW3-irf-port3/1]port group interface Ten-GigabitEthernet 3/0/50
[IRFSW3-irf-port3/1]port group interface Ten-GigabitEthernet 3/0/51
[IRFSW3-irf-port3/1]interface range Ten-GigabitEthernet 3/0/50 to Ten-GigabitEthernet 3/0/51
[IRFSW3-if-range]undo shutdown
保存所有设备配置后,执行此命令。irf-port-configuration active
,每台都执行,有一个协商的过程。