组网需求
如图1所示,RouterA和RouterC为非直连设备,通过配置静态路由互通。用户希望可以实现对设备间链路故障的快速检测。
图1配置BFD多跳检测组网图
配置思路
采用如下思路配置BFD多跳检测:
在RouterA和RouterC上分别配置BFD会话,实现RouterA到RouterC间多跳路径的检测。
操作步骤
-
配置静态路由,使RouterA、RouterC之间有可达路由
RouterC的配置与RouterA类似,具体配置过程略,详见配置文件。
<Huawei> system-view [Huawei] sysname RouterA [RouterA] ip route-static 10.2.1.0 24 10.1.1.2
-
配置多跳BFD检测
在RouterA上配置与RouterC之间的BFD会话。
[RouterA] bfd [RouterA-bfd] quit [RouterA] bfd atoc bind peer-ip 10.2.1.2 [RouterA-bfd-session-atoc] discriminator local 10 [RouterA-bfd-session-atoc] discriminator remote 20 [RouterA-bfd-session-atoc] commit [RouterA-bfd-session-atoc] quit
在RouterC上配置与RouterA之间的BFD会话。
[RouterC] bfd [RouterC-bfd] quit [RouterC] bfd ctoa bind peer-ip 10.1.1.1 [RouterC-bfd-session-ctoa] discriminator local 20 [RouterC-bfd-session-ctoa] discriminator remote 10 [RouterC-bfd-session-ctoa] commit [RouterC-bfd-session-ctoa] quit
-
验证配置结果
配置完成后,在RouterA和RouterC上执行display bfd session all verbose命令,可以看到建立了一个BFD会话,且状态为Up。以RouterA上的显示为例:
[RouterA] display bfd session all verbose -------------------------------------------------------------------------------- Session MIndex : 256 (Multi Hop) State : Up Name : atoc -------------------------------------------------------------------------------- Local Discriminator : 10 Remote Discriminator : 20 Session Detect Mode : Asynchronous Mode Without Echo Function BFD Bind Type : Peer Ip Address Bind Session Type : Static Bind Peer Ip Address : 10.2.1.2 Track Interface : - FSM Board Id : 0 TOS-EXP : 7 Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000 Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000 Local Detect Multi : 3 Detect Interval (ms) : 3000 Echo Passive : Disable Acl Number : - Destination Port : 3784 TTL : 254 Proc interface status : Disable Process PST : Disable WTR Interval (ms) : - Active Multi : 3 DSCP : - Last Local Diagnostic : No Diagnostic Bind Application : No Application Bind Session TX TmrID : - Session Detect TmrID : - Session Init TmrID : - Session WTR TmrID : - Session Echo Tx TmrID : - PDT Index : FSM-0|RCV-0|IF-0|TOKEN-0 Session Description : - -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0
对RouterA的GE1/0/0接口执行shutdown操作,模拟链路故障。
[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] shutdown [RouterA-GigabitEthernet1/0/0] quit
配置完成后,在RouterA和RouterC上执行display bfd session all verbose命令,可以看到建立了一个多跳检测的BFD会话,且会话状态为Down。以RouterA上的显示为例:
[RouterA] display bfd session all verbose -------------------------------------------------------------------------------- Session MIndex : 256 (Multi Hop) State : Down Name : atoc -------------------------------------------------------------------------------- Local Discriminator : 10 Remote Discriminator : 20 Session Detect Mode : Asynchronous Mode Without Echo Function BFD Bind Type : Peer Ip Address Bind Session Type : Static Bind Peer Ip Address : 10.2.1.2 Bind Interface : - Track Interface : - FSM Board Id : 0 TOS-EXP : 7 Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000 Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000 Local Detect Multi : 3 Detect Interval (ms) : 3000 Echo Passive : Disable Acl Number : - Destination Port : 3784 TTL : 254 Proc interface status : Disable Process PST : Disable WTR Interval (ms) : - Active Multi : 3 DSCP : - Last Local Diagnostic : Control Detection Time Expired Bind Application : No Application Bind Session TX TmrID : - Session Detect TmrID : - Session Init TmrID : - Session WTR TmrID : - Session Echo Tx TmrID : - PDT Index : FSM-0|RCV-0|IF-0|TOKEN-0 Session Description : - -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 0/1
想要更多网工专业学习资料,可直接找我领取。(文末领取)
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 网工学习资源包领取 视频课程(部分示意) 实验拓扑(部分示意) |