zl程序教程

您现在的位置是:首页 >  大数据

当前栏目

H3C-S7506X-IRF配置教程(BFD MAD检测)

配置教程 检测 H3C BFD
2023-06-13 09:13:49 时间

序言:

测试的2台H3C-S7506交换机被恢复出厂设置了,因业务需求2台S7506X交换机做堆叠设置,整个过程下来,发现这种框式的交换机做堆叠比盒式的更简单和方便,下面将整个配置思路、部署过程和验证结果与大家分享一下。

一、实验环境

两台H3C-S7506交换机,堆叠线2根、BFD检测线1根。

二、网络拓扑

ps:拓扑仅供参考,实验环境堆叠线是2组。

三、 配置思路

·Device A处于局域网的汇聚层,为了将汇聚层的转发能力提高一倍,需要另外增加一台设备Device B。

·鉴于IRF技术具有管理简便、网络扩展能力强、可靠性高等优点,所以本例使用IRF技术构建网络汇聚层(即在Device A和Device B上配置IRF功能),接入层设备通过聚合双链路上行。

·为了防止万一IRF链路故障导致IRF分裂、网络中存在两个配置冲突的IRF,需要启用MAD检测功能。因为成员设备比较少,我们采用BFD MAD检测方式来监测IRF的状态。

堆叠口:0/0/39和0/0/40

BFD检测口:5/0/1

四、配置步骤

1、配置Device A(master)

# 设置Device A的成员编号为1,创建IRF端口2,并将它与物理端口Ten-GigabitEthernet0/0/39-Ten-GigabitEthernet0/0/40绑定。

<H3C> system-view

[H3C] irf member 1

[H3C]irf priority 32

[H3C] irf-port 2

[H3C-irf-port2] port group interface ten-gigabitethernet 0/0/39

[H3C-irf-port2] port group interface ten-gigabitethernet 0/0/40

[H3C-irf-port2] quit

ps:要保证39和40两个接口是启用状态。

# 将当前配置保存到下次启动配置文件。

[H3C] quit

<H3C> save

# 将设备的运行模式切换到IRF模式。

<H3C> system-view

[H3C] 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 configuration file for the next startup. Continue? [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.

Do you want to convert the content of the next startup configuration file flash:

/startup.cfg to make it available in IRF mode? [Y/N]:y

Now rebooting, please wait...

设备重启后Device A组成了只有一台成员设备的IRF。

2、配置Device B(standby)

# 配置Device B的成员编号为2,创建IRF端口1,并将它与物理端口Ten-GigabitEthernet0/0/39-Ten-GigabitEthernet0/0/40绑定。

<H3C> system-view

[H3C] irf member 2

[H3C] irf-port 1

[H3C-irf-port2] port group interface ten-gigabitethernet 0/0/39

[H3C-irf-port2] port group interface ten-gigabitethernet 0/0/40

[H3C-irf-port1] quit

ps:要保证39和40两个接口是启用状态。

# 将当前配置保存到下次启动配置文件。

[H3C] quit

<H3C> save

# 堆叠线物理连线:

1/0/0/39对应2/0/0/39,1/0/0/40对应2/0/0/40

# 将设备的运行模式切换到IRF模式。

<H3C> system-view

[H3C] 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 configuration file for the next startup. Continue? [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.

Do you want to convert the content of the next startup configuration file flash:

/startup.cfg to make it available in IRF mode? [Y/N]:y

Now rebooting, please wait...

设备B重启后与设备A形成IRF。

3、配置BFD MAD检测

# 修改IRF链路down延迟上报时间为0。

<H3C> system-view

[H3C] irf link-delay 0

# 创建VLAN 999,并将Device A(成员编号为1)上的端口1/5/0/1和Device B(成员编号为2)上的端口2/5/0/1加入VLAN中。

[H3C] vlan 999

[H3C-vlan999] port gigabitethernet 1/5/0/1 gigabitethernet 2/5/0/1

[H3C-vlan999] quit

# 创建VLAN接口999,并配置MAD IP地址。

[H3C] interface vlan-interface 999

[H3C-Vlan-interface999] mad bfd enable

[H3C-Vlan-interface999] mad ip address 192.168.99.1 24 member 1

[H3C-Vlan-interface999] mad ip address 192.168.99.2 24 member 2

[H3C-Vlan-interface999] quit

# 因为BFD MAD和生成树功能互斥,所以在GigabitEthernet1/5/0/1和GigabitEthernet2/5/0/1上关闭生成树协议。

[H3C] interface gigabitethernet 1/5/0/1

[H3C-gigabitethernet-1/5/0/1] undo stp enable

[H3C-gigabitethernet-1/5/0/1] quit

[H3C] interface gigabitethernet 2/5/0/1

[H3C-gigabitethernet-2/5/0/1] undo stp enable

五、验证结果

dis irf 查看irf信息,包含当前连接的是master还是standby,主的优先级是32,备用默认是1。

dis irf configuration 查看irf配置信息,包含主member号为1,port号为2,内有1/0/0/39和1/0/0、40端口;备用member号为2,port号为1,内有2/0/0/39和2/0/0/40端口。

dis irf link 查看irf信息,包含member号、port号和包含的接口及状态。

一般查看如上述显示,表示IRF是正常工作的。

BFD工作原理:

1、当IRF正常运行时,只有主设备上配置的MAD IP地址生效,从设备上配置的MAD IP地址不生效,BFD会话处于down状态;

2、分裂时变为两台设备,bfd会瞬时up;mad检测就会生效会让其中一台设备失效,备机设备irf变为recovery状态,禁用端口后,bfd状态就又会变为down

dis bfd session 查看bfd情况,包含源地址192.168.99.1(主上面的接口地址)和192.168.99.2(备机上的接口地址)和当前状态是DOWN。

bfd检测机制:一直在ping对端MAD地址

第一种情况:IRF正常工作时,交换机上ping192.168.99.2是无法ping通的,bfd状态是down;

第二种情况:IRF异常时,分裂成2个IRF,这样ping192.168.99.2就能通了,bfd状态就是up,然后mad将备机设备变成recovery状态,表示不工作;这样只有主设备正常工作。

dis mad verbose 查看mad状态,包含IRF堆叠线接口、BFD接口和vlan,MAD BFD是启用状态,两台设备的MAD IP地址等信息。

六、总结

H3C交换机框式的相比较盒式的更容易配置IRF,这是因为框式设备有IRF模式,想配置irf直接启用变成IRF模式就好了;另外,BFD MAD检测机制要理解,判断IRF是否工作正常,多敲命令。