BFD(Bidrectional Forwarding Detection)双向转发检测,用于快速检测系统设备之间的发送和接受两个方向的通信故障,并在出现故障时通知生成应用。BFD广泛用于链路故障检测,并能实现与接口、静态路由、动态路由等联动检测。本文将介绍如何在华为设备上配置BFD与OSPF联动,以提高链路的可靠性。具体拓扑如下:
1.IP地址的配置
R1:
inter g0/0/1
ip address 10.0.13.1 24
inter g0/0/0
ip address 10.0.12.1 24
R2:
inter g0/0/0
ip address 10.0.13.13 24
R3:
inter g0/0/0
ip address 10.0.12.12 24
配置ospf协议实现路由通信
R1:
ospf 1
area 0.0.0.0
network 10.0.12.0 0.0.0.255
network 10.0.13.0 0.0.0.255
R2:
ospf 1
area 0.0.0.0
network 10.0.13.0 0.0.0.255
R3:
ospf 1
area 0.0.0.0
network 10.0.12.0 0.0.0.255
area 0.0.0.1
2.配置bfd与ospf联动
配置BFD session需要在系统全局下开启BFD,并且在OSPF视图下启用联动BFD。
R1:
bfd // 启用bfd
quit
ospf 1
bfd all-interfaces enable //在osp视图下启用联动bfd
R2:
bfd
quit
ospf 1
bfd all-interfaces enable
3.display bfd session all查看bfd会话