
-
配置LSW1和LSW2的直连接口IP地址
[LSW1]vlan 10
[LSW1-GigabitEthernet0/0/3]port link-type hybrid
[LSW1-GigabitEthernet0/0/3]port hybrid pvid vlan 10
[LSW1-GigabitEthernet0/0/3]port hybrid untagged vlan 10
[LSW1]int Vlanif 10
[LSW1-Vlanif10]ip add 10.1.1.1 24
[LSW2]vlan batch 10
[LSW2-GigabitEthernet0/0/4]port link-type hybrid
[LSW2-GigabitEthernet0/0/4]port hybrid pvid vlan 10
[LSW2-GigabitEthernet0/0/4]port hybrid untagged vlan 10
[LSW2-Vlanif10]ip add 10.1.1.2 24 -
配置BFD单跳检测
[LSW1]bfd
[LSW1]bfd 1to2 bind peer-ip default-ip interface GigabitEthernet 0/0/3
[LSW1-bfd-session-1to2]discriminator local 10
[LSW1-bfd-session-1to2]discriminator remote 20
[LSW1-bfd-session-1to2]commit
[LSW2]bfd
[LSW2]bfd 2to1 bind peer-ip default-ip interface GigabitEthernet 0/0/4
[LSW2-bfd-session-2to1]discriminator local 20
[LSW2-bfd-session-2to1]discriminator remote 10
[LSW2-bfd-session-2to1]commit

-
配置BFD状态与接口状态联动
[LSW1]bfd 1to2
[LSW1-bfd-session-1to2]process-interface-status
[LSW2]bfd 2to1
[LSW2-bfd-session-2to1]process-interface-status -
验证配置

对LSW3的GE0/0/4接口执行shutdown操作,让BFD状态Down
[LSW3-GigabitEthernet0/0/4]shutdown

该配置流程详细展示了如何在LSW1和LSW2之间配置VLAN接口的IP地址,并实现BFD单跳检测。通过在两个设备的GigabitEthernet0/0/3和GigabitEthernet0/0/4接口上设置混合模式,分配PVID和未标记VLAN,建立BFD会话并关联接口。配置完成后,实现了BFD状态与接口状态的联动,确保网络连通性监测。当对LSW3的GE0/0/4接口执行shutdown操作时,BFD状态会相应变为Down。
1781

被折叠的 条评论
为什么被折叠?



