1. 配置各接口所属的VLAN
[LSW1]vlan batch 10
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[LSW2]vlan batch 10 20
[LSW2-GigabitEthernet0/0/1]port link-type trunk
[LSW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[LSW2-GigabitEthernet0/0/2]port link-type access
[LSW2-GigabitEthernet0/0/2]port default vlan 20
2. 配置各VLANIF接口的IP地址
[LSW1-Vlanif10]ip add 10.1.1.1 24
[LSW2-Vlanif10]ip add 10.1.1.2 24
[LSW2-Vlanif20]ip add 10.1.2.2 24
3. 配置LSW1和LSW2间的BFD会话
[LSW1]bfd
[LSW1]bfd a1 bind peer-ip 10.1.1.2
[LSW1-bfd-session-a1]discriminator local 10
[LSW1-bfd-session-a1]discriminator remote 20
[LSW1-bfd-session-a1]commit
[LSW2]bfd
[LSW2]bfd b1 bind peer-ip 10.1.1.1
[LSW2-bfd-session-b1]discriminator local 20
[LSW2-bfd-session-b1]discriminator remote 10
[LSW2-bfd-session-b1]commit
4. 配置静态路由并绑定BFD会话
[LSW1]ip route-static 10.1.2.0 24 10.1.1.2 track bfd-session a1
5. 配置Server
6. 验证配置
Shutdown LSW2的G0/0/1口
Undo Shutdown LSW2的G0/0/1口