4.1 问题
1)如图配置设备的IP地址
2)在R1和R3之间建立BFD会话,快速检测链路故障
3)查看R1和R3之间的BFD会话状态的信息
4.2 方案
搭建实验环境,如图-4所示。
步骤
实现此案例需要按照如下步骤进行。
1)配置R1
- Huawei>system-view
- [Huawei]sysname R1
- [R1]interface GigabitEthernet 0/0/0
- [R1-GigabitEthernet0/0/0]ip address 192.168.12.1 24
- [R1-GigabitEthernet0/0/0]quit
- [R1]ip route-static 192.168.23.0 24 192.168.12.2
2)配置R2
- <Huawei>system-view
- [Huawei]sysname R2
- [R2]interface GigabitEthernet 0/0/1
- [R2-GigabitEthernet0/0/1]ip address 192.168.12.2 24
- [R2-GigabitEthernet0/0/1]quit
- [R2]interface GigabitEthernet 0/0/0
- [R2-GigabitEthernet0/0/0]ip address 192.168.23.2 24
- [R2-GigabitEthernet0/0/0]quit
3)配置R3
- <Huawei>system-view
- [Huawei]sysname R3
- [R3]interface GigabitEthernet 0/0/1
- [R3-GigabitEthernet0/0/1]ip address 192.168.23.3 24
- [R3-GigabitEthernet0/0/1]quit
- [R3]ip route-static 192.168.12.0 24 192.168.23.2
4)配置BFD-R1
- [R1]bfd
- [R1-bfd]quit
- [R1]bfd 13 bind peer 192.168.23.3
- [R1-bfd-session-13]discriminator local 1
- [R1-bfd-session-13]discriminator remote 3
- [R1-bfd-session-13]commit
- [R1-bfd-session-13]quit
5)配置BFD-R3
- [R3]bfd
- [R3-bfd]quit
- [R3]bfd 13 bind peer 192.168.12.1
- [R3-bfd-session-13]discriminator local 3
- [R3-bfd-session-13]discriminator remote 1
- [R3-bfd-session-13]commit
- [R3-bfd-session-13]quit
6)验证 BFD 会话
- [R1]display bfd session all
- --------------------------------------------------------------------------------
- Local Remote PeerIpAddr State Type InterfaceName
- --------------------------------------------------------------------------------
- 1 3 192.168.23.3 Up S_IP_PEER -
- --------------------------------------------------------------------------------
- Total UP/DOWN Session Number : 1/0
- [R3]display bfd session all
- --------------------------------------------------------------------------------
- Local Remote PeerIpAddr State Type InterfaceName
- --------------------------------------------------------------------------------
- 3 1 192.168.12.1 Up S_IP_PEER -
- --------------------------------------------------------------------------------
- Total UP/DOWN Session Number : 1/0