摘要: system-view[HUAWEI] sysname DeviceB[DeviceB] bfd[DeviceB-bfd] quit[DeviceB] bfd ipsession bind peer-ip default-ip interfa
如图1所示,DeviceA和DeviceB通过二层接口连通。用户希望可以实现设备间链路故障的快速检测。
图1 配置BFD单跳检测二层链路示例组网图
本例中interface1代表Vlanif1/0/1。
采用如下思路配置BFD单跳检测二层链路:
在DeviceA和DeviceB上分别配置BFD会话,实现DeviceA和DeviceB间链路的检测。使能全局BFD功能并配置单跳BFD会话。
# 配置DeviceA。
system-view[HUAWEI] sysname DeviceA[DeviceA] bfd[DeviceA-bfd] quit[DeviceA] bfd ipsession bind peer-ip default-ip interface 10ge 1/0/1[DeviceA-bfd-session-ipsession] discriminator local 1[DeviceA-bfd-Session-ipsession] discriminator remote 2[DeviceA-bfd-session-ipsession] quit# 配置DeviceB。
system-view[HUAWEI] sysname DeviceB[DeviceB] bfd[DeviceB-bfd] quit[DeviceB] bfd ipsession bind peer-ip default-ip interface 10ge 1/0/1[DeviceB-bfd-session-ipsession] discriminator local 2[DeviceB-bfd-session-ipsession] discriminator remote 1[DeviceB-bfd-session-ipsession] quit检查配置结果# 配置完成后,可以在DeviceA和DeviceB上查看BFD会话详细信息。以DeviceA的显示结果为例。# 配置完成后,可以在DeviceA和DeviceB上查看BFD会话详细信息。以DeviceA的显示结果为例。
[DeviceA] display bfd session all verbose2020-01-01 11:21:06.8 (w): State in WTR (*): State is invalid Total UP/DOWN Session Number : 1/0Name : ipsession (Single Hops) State : Up Local Discriminator : 1 Remote Discriminator : 2Session Detect Mode : Asynchronous Mode Without Echo FunctionBFD Bind Type : Interface(10GE1/0/1)Bind Session Type : StaticBind Peer IP Address : 224.0.0.184Bind Interface : 10GE1/0/1FSM Board ID : 1 TOS-EXP : 7Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000WTR Interval (ms) : - Detect Interval (ms) : 3000Local Detect Multi : 3 Active Multi : -Echo Passive : Disable Acl Number : -Destination Port : 3784 TTL : 255Proc Interface Status : Disable Process PST : DisableConfig PST : DisableLast Local Diagnostic : No DiagnosticBind Application : No Application BindSession Description : -可以看到建立了一个单跳检测的BFD会话,且会话状态为Up。
来源:黑狗文