IRF堆叠案例1

韵味老鸟 2024-06-16 17:39:00

IRF堆叠案例1

Device A和Device B分别使用自带的两个万兆口做堆叠口。也可以只用一个接口堆叠,根据实际情况而定

*IRF-port端口编号说明,irf-port 1/2中,第一个数字代表的是设备成员编号,第二个数字是接口编号。堆叠要求使用逻辑端口1对接逻辑端口2。即,如若第一台配置irf-port1/2,则第二台需要是用irf-port2/1对接。如若第一台使用irf-port1/1,则第二台需要配置irf-port2/2

堆叠线:就是本案例中万兆口G1/0/49.G1/0/50和G2/0/49,G2/0/50端口物理上所连的线,称为堆叠线,实际中由于价格昂贵,也可以用普通LC光纤跳线代替

分别给每台交换机修改设备名(这个不是必须的配置,我是为了给大家演示一下,作完堆叠后,SW2设备名也会自动更改)

[H3C]sys SW1

[H3C]sys SW2

先将互联的接口shutdown一下:

[SW1]int Ten-GigabitEthernet 1/0/49

[SW1-Ten-GigabitEthernet1/0/49]shutdown

[SW1-Ten-GigabitEthernet1/0/49]quit

[SW2]interface Ten-GigabitEthernet 1/0/49

[SW2-Ten-GigabitEthernet1/0/49]shutdown

[SW2-Ten-GigabitEthernet1/0/49]quit

irf堆叠关键配置

[SW1]irf domain 100

[SW1]irf member 1 renumber 1

Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y

Please reboot the device for the new member ID to take effect.

[SW1]irf-port 1/1

[SW1-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/49

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]quit

[SW1]irf-port-configuration active

[SW2]irf domain 100

[SW2]irf member 1 renumber 2

Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y

Please reboot the device for the new member ID to take effect.

[SW2]irf-port 1/2

[SW2-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/49

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.

[SW2-irf-port1/2]quit

[SW2]irf-port-configuration active

解释:irf member 1 renumber 2

这个就是把原来接口卡编号重新规划命名,两台交换机不能一样。

irf member 1 renumber 2,即把上图红色圈起来的接口卡编号由1改为2.

由于SW1是1,那SW2需要区别开,所以改成2,当然你也可以改成其他的,一般建议数字连续吧。

现在我们把接口打开undo shutdown一下:

[SW1]int Ten-GigabitEthernet 1/0/49

[SW1-Ten-GigabitEthernet1/0/49]undo shut

[SW1-Ten-GigabitEthernet1/0/49]quit

[SW1]

[SW2]int Ten-GigabitEthernet 1/0/49

[SW2-Ten-GigabitEthernet1/0/49]undo shut

[SW2-Ten-GigabitEthernet1/0/49]quit

堆叠生效之前,我们来做个小测试,在SW1,创建vlan 100,然后在SW2查看:

[SW1]dis vlan

Total VLANs: 2

The VLANs include:

1(default), 10

SW2上未看到vlan 100,只有默认VLAN1:

[SW2]dis vlan

Total VLANs: 1

The VLANs include:

1(default)

接下来,记得保存一下再重启,观察堆叠是否生效了:

[SW1]save

[SW1]quit

reboot

save

reboot

重启后,你会发现SW2的设备名自动修改为SW1了:

也间接说明堆叠配置成功了,我们也可以查一下堆叠状态:

现在我们可以在SW1创建一个vlan 200,看看原先所谓的SW2是不是也自动看到这个配置:

在原先SW2 可以看到这个配置了:

到这里,堆叠就基本配置完成了。

修改irf优先级可改变master

在原先sw2上修改设备名:

[SW1]sys SW2

在原先sw2上修改irf优先级,比如这里修改到最高32:

[SW2]irf member 2 priority 32

save

reboot

SW1自动重启:

重启后,你会发现原先SW2那台变成Master了,所以优先级高的,就是Master:

0 阅读:0