2

「BFD」- 常用配置示例

 2 years ago
source link: https://blog.k4nz.com/7219cee8876906fd9063c122ca6a6b8a/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

「BFD」- 常用配置示例

 2022-03-05   CREATED BY JENKINSBOT

配置示例(Huawei)

参考设备文档,以获取 BFD 与使用方法,以及常见问题的处理方法。

补充说明:
1)静态:当设备开启 BFD 并 commit 后,设备便已开始发送 BFD 报文;后续操作是将 BFD Session 与其他模块进行关联(联动)。
2)动态:无需执行 commit 指令,直接提交即可;

动态 BFD 配置

[AR4]bfd
[AR4]bfd 1 bind peer-ip 10.0.46.6 interface GigabitEthernet 0/0/1 source-ip 10.0.46.4 auto

与静态路由联动

[R1] bfd 12 bind peer 10.0.12.2 interface GigabitEthernet 0/0/1
[BFD] discriminator local 10
[BFD] discriminator remote 20
[BFD] commit

[R2] bfd 21 bind peer 10.0.12.1 interface GigabitEthernet 0/0/1
[BFD] discriminator local 20
[BFD] discriminator remote 10
[BFD] commit

[R1] ip route-static 4.4.4.4 10.0.12.2 track bfd-session 12     # 被 BFD 追踪,当链路故障时,立即时效 
[R1] ip route-static 4.4.4.4 10.0.13.2 preference 100           # 该优先级 100 的静态路由开始生效

<Huawei> display bfd session all verbose

与 OSPF 联动

pasted_image.png

[OSPF] bfd all-interface enable
[OSPF] bfd all-interface min-tx-interval 100 min-rx-interval 100 detect-multiplier 3

// 当我们 shutdown AR1.GE0/0/2 接口后,在 AR2 上,其 BFD 探测到链路故障,理解结束 OSPF 邻居关系

Feb 20 2022 22:35:08-08:00 AR2 %%01BFD/4/STACHG_TODWN(l)[13]:BFD session changed
 to Down. (SlotNumber=0, Discriminator=18874368, Diagnostic=DetectDown, Applicat
ions=OSPF, ProcessPST=False, BindInterfaceName=GigabitEthernet0/0/1, InterfacePh
ysicalState=Up, InterfaceProtocolState=Up) 
[AR2]
Feb 20 2022 22:35:08-08:00 AR2 %%01OSPF/3/NBR_CHG_DOWN(l)[14]:Neighbor event:nei
ghbor state changed to Down. (ProcessId=256, NeighborAddress=1.1.1.1, NeighborEv
ent=KillNbr, NeighborPreviousState=Full, NeighborCurrentState=Down) 
[AR2]
Feb 20 2022 22:35:08-08:00 AR2 %%01OSPF/3/NBR_DOWN_REASON(l)[15]:Neighbor state 
leaves full or changed to Down. (ProcessId=256, NeighborRouterId=1.1.1.1, Neighb
orAreaId=0, NeighborInterface=GigabitEthernet0/0/1,NeighborDownImmediate reason=
Neighbor Down Due to Kill Neighbor, NeighborDownPrimeReason=BFD Session Down, Ne
ighborChangeTime=2022-02-20 22:35:08-08:00) 

通过 BFD 探测,OSPF 能够完成快速收敛。

[Huawei] bfd 

[R2] bfd 21 bind peer 10.0.12.1 interface GigabitEthernet 0/0/1 one-arm-echo
[BFD] discriminator local 20
[BFD] commit

[R1] ip route-static 4.4.4.4 10.0.12.2 track bfd-session 12     # 被 BFD 追踪,当链路故障时,立即时效

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK