如下图为一个小型网络拓扑图,在核心交换机与路由器间设置BFD单跳检测三层链路。
华为路由器BFD单跳检测三层链路配置示例
6 P& U. q4 j# g6 h6 e0 g1 Q
7 z2 N$ B. ~0 X. s) q具体配置如下: [S1]bfd [S1-bfd]q [S1]bfd r1 bind peer-ip 10.255.255.254 interface Vlanif 100 [S1-bfd-session-r1]discriminator local 1 [S1-bfd-session-r1]discriminator remote 2 [S1-bfd-session-r1]commit --------------- [R1]bfd [R1-bfd]q [R1]bfd s1 bind peer-ip 10.255.255.1 interface GigabitEthernet 0/0/0 [R1-bfd-session-s1]discriminator local 2 [R1-bfd-session-s1]discriminator remote 1 [R1-bfd-session-s1]commit ============= 查看正常状态 [S1-bfd-session-r1]dis bf se all -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 1 2 10.255.255.254 Up S_IP_IF Vlanif100 -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0 $ {2 b! G) r# y) u
--------------------- [R1]display bfd session all -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 2 1 10.255.255.1 Up S_IP_IF GigabitEthernet0/0/0 -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0 $ _# Y. K# `0 O! e
模拟连通失败状态(关闭交换机GE0/0/1接口) [R1]display bfd session all verbose -------------------------------------------------------------------------------- Session MIndex : 256 (One Hop) State : Down Name : s1 -------------------------------------------------------------------------------- Local Discriminator : 2 Remote Discriminator : 1 Session Detect Mode : Asynchronous Mode Without Echo Function BFD Bind Type : Interface(GigabitEthernet0/0/0) Bind Session Type : Static Bind Peer IP Address : 10.255.255.1 NextHop Ip Address : 10.255.255.1 Bind Interface : GigabitEthernet0/0/0 FSM Board Id : 0 TOS-EXP : 7 Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000 Actual Tx Interval (ms): 14499 Actual Rx Interval (ms): 14499 Local Detect Multi : 3 Detect Interval (ms) : - Echo Passive : Disable Acl Number : - Destination Port : 3784 TTL : 255 Proc Interface Status : Disable Process PST : Disable WTR Interval (ms) : - Active Multi : 3 Last Local Diagnostic : Control Detection Time Expired Bind Application : No Application Bind Session TX TmrID : 1036 Session Detect TmrID : - Session Init TmrID : - Session WTR TmrID : - Session Echo Tx TmrID : - ' }$ |! u6 Q5 P! Q/ f8 e8 B
[R1] =============== 配置文件 dis cu [V200R003C00] # sysname R1 # bfd # interface GigabitEthernet0/0/0 ip address 10.255.255.254 255.255.255.0 # bfd s1 bind peer-ip 10.255.255.1 interface GigabitEthernet0/0/0 discriminator local 2 discriminator remote 1 commit # return -------------------- dis cu # sysname S1 # vlan batch 100 # bfd # interface Vlanif100 ip address 10.255.255.1 255.255.255.0 # interface GigabitEthernet0/0/1 shutdown port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 2 to 4094 # interface GigabitEthernet0/0/2 # interface NULL0 # bfd r1 bind peer-ip 10.255.255.254 interface Vlanif100 discriminator local 1 discriminator remote 2 commit # return
3 K) o8 k- U3 V! {# @. I5 |6 V |