HCL IRF BFD配置
一、IRF配置
Sw1配置
切换到sw1修改
修改irf 优先级。
irf member 1 priority 32
关闭接口。
必须先行关闭接口,否则该端口无法加入irf接口。
[sw1interface Ten-GigabitEthernet1/0/49
[sw1 shutdown
创建irf端口,接入物理端口
[sw1]irf-port1/2
[sw1-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.
开启端口
[sw1]int Ten-GigabitEthernet 1/0/49
[sw1-Ten-GigabitEthernet1/0/49]un sh
保存配置
[sw1]save f
Validating file. Please wait…
Saved the current configuration to mainboard device successfully.
激活IRF配置
[sw1]irf-port-configuration active
[sw1]%Feb 10 11:07:49:175 2022 sw1 STM/6/STM_LINK_UP: IRF port 2 came up.
sw2配置
修改sw2的成员编号
[sw2]irf member 1 renumber 2
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
使用display irf 查看sw2成员编号,修改成功,然后重启设备。
reboot
Start to check configuration with next startup configuration file, please wait…DONE!
Current configuration may be lost after the reboot, save current configuration? [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.
This command will reboot the device. Continue? [Y/N]:y
Now rebooting, please wait…
%Feb 10 11:02:44:109 2022 sw2 DEV/5/SYSTEM_REBOOT: System is rebooting now.
关闭接口
[sw2]int Ten-GigabitEthernet 2/0/49
[sw2-Ten-GigabitEthernet2/0/49]shutdown
创建irf端口,接入物理端口
[sw2]irf-port 2/1
[sw2-irf-port2/1]port group interface Ten-GigabitEthernet 2/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]int Ten-GigabitEthernet 2/0/49
[sw2-Ten-GigabitEthernet2/0/49]un sh
保存配置
[sw2]s f
Validating file. Please wait…
Saved the current configuration to mainboard device successfully.
激活IRF配置
[sw2]irf-port-configuration active
%Feb 10 11:10:04:084 2022 sw2 STM/6/STM_LINK_UP: IRF port 1 came up. //日志显示irf 接口开启。
%Feb 10 11:10:37:292 2022 sw1 HA/5/HA_BATCHBACKUP_FINISHED: Batch backup of standby board in slot 2 has finished.
//sw2以standby角色加入irf系统
查看irf状态
[sw1]display irf
MemberID Role Priority CPU-Mac Description
*+1 Master 1 3ad4-830f-0104 —
2 Standby 1 3ad4-8674-0204 —
- indicates the device is the master.
- indicates the device through which the user logs in.
The bridge MAC of the IRF is: 3ad4-830f-0100
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
二、bfd配置
1、路由聚合方式
新建聚合接口
[sw1]int Route-Aggregation 1
端口接入聚合组
[sw1]int range GigabitEthernet 1/0/1 GigabitEthernet 2/0/1
[sw1-if-range]port link-aggregation group 1
使用display link-aggregation verbose 查看聚合状态
[sw1]display link-aggregation verbose
Loadsharing Type: Shar – Loadsharing, NonS – Non-Loadsharing
Port: A – Auto
Port Status: S – Selected, U – Unselected, I – Individual
Flags: A – LACP_Activity, B – LACP_Timeout, C – Aggregation,
D – Synchronization, E – Collecting, F – Distributing,
G – Defaulted, H – Expired
Aggregate Interface: Route-Aggregation1
Aggregation Mode: Static
Loadsharing Type: Shar
Port Status Priority Oper-Key
GE1/0/1 S 32768 1
GE2/0/1 S 32768 1
bfd配置
interface Route-Aggregation1
mad bfd enable
mad ip address 192.168.2.1 255.255.255.0 member 1
mad ip address 192.168.2.2 255.255.255.0 member 2
%Feb 10 11:13:19:706 2022 sw1 BFD/5/BFD_MAD_INTERFACE_CHANGE_STATE: BFD MAD function enabled on Route-Aggregation1 changed to the normal state. // mad bfd 状态转变为 normal
[sw1]display bfd session
Total Session Num: 1 Up Session Num: 0 Init Mode: Active
IPv4 session working in control packet mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
129/0 192.168.2.1 192.168.2.2 Down 0ms RAGG1
down状态为正常。当irf系统正常时,bfd会话down,且只有master 上的mad ip地址生效。当irf分裂,bfd会话激活,down转变为up。
查看mad状态
[sw1]display mad verbose
Multi-active recovery state: No
Excluded ports (user-configured):
Excluded ports (system-configured):
Ten-GigabitEthernet1/0/49
Ten-GigabitEthernet2/0/49
MAD ARP disabled.
MAD ND disabled.
MAD LACP disabled.
MAD BFD enabled interface: Route-Aggregation1
MAD status : Normal
Member ID MAD IP address Neighbor MAD status
1 192.168.2.1/24 2 Normal
2 192.168.2.2/24 1 Normal
测试:手工关闭 1/0/49
[sw1]int Ten-GigabitEthernet 1/0/49
[sw1-Ten-GigabitEthernet1/0/49]shutdown
此时,irf分裂,查看bfd会话,会话状态为UP,检测生效。
[sw1-Ten-GigabitEthernet1/0/49]display bfd session
Total Session Num: 1 Up Session Num: 1 Init Mode: Active
IPv4 session working in control packet mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
129/129 192.168.2.1 192.168.2.2 Up 1260ms RAGG1
%Feb 10 11:15:21:887 2022 sw1 STM/3/STM_LINK_DOWN: IRF port 2 went down.
%Feb 10 11:15:21:889 2022 sw1 DEV/3/BOARD_REMOVED: Board was removed from slot 2, type is H3C S5820V2-54Q.
%Feb 10 11:15:21:933 2022 sw1 IFNET/3/IF_WARN: The jumboframe of the aggregate interface Route-Aggregation1 is not supported on the member port GigabitEthernet1/0/1
%Feb 10 11:15:21:937 2022 sw1 BFD/5/BFD_CHANGE_FSM: Sess[192.168.2.1/192.168.2.2, LD/RD:129/129, Interface:RAGG1, SessType:Ctrl, LinkType:INET], Ver:1, Sta: DOWN->INIT, Diag: 0 (No Diagnostic)
[sw1-Ten-GigabitEthernet1/0/49]%Feb 10 11:15:22:008 2022 sw1 BFD/5/BFD_CHANGE_FSM: Sess[192.168.2.1/192.168.2.2, LD/RD:129/129, Interface:RAGG1, SessType:Ctrl, LinkType:INET], Ver:1, Sta: INIT->UP, Diag: 0 (No Diagnostic)
%Feb 10 11:15:28:009 2022 sw1 BFD/5/BFD_CHANGE_FSM: Sess[192.168.2.1/192.168.2.2, LD/RD:129/129, Interface:RAGG1, SessType:Ctrl, LinkType:INET], Ver:1, Sta: UP->DOWN, Diag: 1 (Control Detection Time Expired)
%Feb 10 11:15:29:705 2022 sw1 BFD/4/BFD_MAD_INTERFACE_CHANGE_STATE: BFD MAD function enabled on Route-Aggregation1 changed to the faulty state. //bfd 状态由normal转变为faulty
[sw1]display irf
MemberID Role Priority CPU-Mac Description
*+1 Master 1 3ad4-830f-0104 —
- indicates the device is the master.
- indicates the device through which the user logs in.
The bridge MAC of the IRF is: 3ad4-830f-0100
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
开启接口,irf恢复,重新合并。
[sw1]int Ten-GigabitEthernet 1/0/49
[sw1-Ten-GigabitEthernet1/0/49]un sh
%Feb 10 11:19:19:436 2022 sw1 STM/6/STM_LINK_UP: IRF port 2 came up.
%Feb 10 11:19:19:678 2022 sw1 STM/4/STM_MERGE: IRF merge occurred. //irf开始合并
[sw1-Ten-GigabitEthernet1/0/49]%Feb 10 11:19:24:310 2022 sw1 STM/3/STM_LINK_DOWN: IRF port 2 went down.
%Feb 10 11:19:29:529 2022 sw1 STM/6/STM_LINK_UP: IRF port 2 came up.
%Feb 10 11:19:50:768 2022 sw1 DEV/2/BOARD_STATE_FAULT: Board state changed to Fault on slot 2, type is unknown.
%Feb 10 11:19:52:103 2022 sw1 HA/5/HA_BATCHBACKUP_STARTED: Batch backup of standby board in slot 2 started.
%Feb 10 11:19:52:905 2022 sw1 DEV/5/BOARD_STATE_NORMAL: Board state changed to Normal on slot 2, type is H3C S5820V2-54Q.
%Feb 10 11:19:53:828 2022 sw1 IFNET/3/IF_WARN: -Slot=2; The jumboframe of the aggregate interface Route-Aggregation1 is not supported on the member port GigabitEthernet2/0/1
%Feb 10 11:19:59:105 2022 sw1 HA/5/HA_BATCHBACKUP_FINISHED: Batch backup of standby board in slot 2 has finished.
%Feb 10 11:19:59:706 2022 sw1 BFD/5/BFD_MAD_INTERFACE_CHANGE_STATE: BFD MAD function enabled on Route-Aggregation1 changed to the normal state. //合并完成,irf正常,bfd 状态为normal
[sw1]display irf
MemberID Role Priority CPU-Mac Description
*+1 Master 1 3ad4-830f-0104 —
2 Standby 1 3ad4-8674-0204 —
- indicates the device is the master.
- indicates the device through which the user logs in.
The bridge MAC of the IRF is: 3ad4-830f-0100
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
2、Vlan虚接口方式 看不到效果,。做完后,mad的状态是Faulty,可能是模拟器bug。
[sw1]
[sw1]vlan 4000
[sw1-vlan4000]port GigabitEthernet 1/0/1
[sw1-vlan4000]port GigabitEthernet 2/0/1
[swint range GigabitEthernet 1/0/1 GigabitEthernet 2/0/1
[sw1-if-range]undo stp enable
return
[sw1-if-range]qu
[sw1]interface Vlan-interface4000
[sw1-Vlan-interface4000] mad bfd enable
[sw1-Vlan-interface4000] mad ip address 192.168.2.1 255.255.255.0 member 1
[sw1-Vlan-interface4000] mad ip address 192.168.2.2 255.255.255.0 member 2
[sw1]display mad verbose
Multi-active recovery state: No
Excluded ports (user-configured):
Excluded ports (system-configured):
Ten-GigabitEthernet1/0/49
Ten-GigabitEthernet2/0/49
MAD ARP disabled.
MAD ND disabled.
MAD LACP disabled.
MAD BFD enabled interface: Vlan-interface4000
MAD status : Faulty
Member ID MAD IP address Neighbor MAD status
1 192.168.2.1/24 2 Faulty
2 192.168.2.2/24 1 Faulty
[sw1]
[sw1]display bfd session
Total Session Num: 1 Up Session Num: 0 Init Mode: Active
IPv4 session working in control packet mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
129/0 192.168.2.1 192.168.2.2 Down 0ms Vlan4000