1. 配置LSW1的BFD单跳检测
[LSW1]bfd
[LSW1]bfd atob bind peer-ip default-ip interface GigabitEthernet 0/0/1
[LSW1-bfd-session-atob]discriminator local 1
[LSW1-bfd-session-atob]discriminator remote 2
[LSW1-bfd-session-atob]commit
2. 配置LSW2的BFD单跳检测
[LSW2]bfd
[LSW2]bfd btoa bind peer-ip default-ip interface GigabitEthernet 0/0/1
[LSW2-bfd-session-btoa]discriminator local 2
[LSW2-bfd-session-btoa]discriminator remote 1
[LSW2-bfd-session-btoa]commit
3. 验证配置
对LSW1的GE0/0/1接口执行shutdown操作,模拟链路故障
[LSW1-GigabitEthernet0/0/1]shutdown