As shown in Figure 1, SwitchA connects to SwitchB through a direct link. SwitchA supports BFD, whereas SwitchB does not support BFD. Faults on the link between SwitchA and SwitchB need to be fast detected.
The configuration roadmap is as follows:
Configure the BFD Echo function on SwitchA to detect faults on the link between SwitchA and SwitchB.
# Configure SwitchA.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] vlan 13 [SwitchA-vlan13] quit [SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] port link-type hybrid [SwitchA-GigabitEthernet0/0/1] port hybrid pvid vlan 13 [SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 13 [SwitchA-GigabitEthernet0/0/1] quit
# Configure SwitchB.
<HUAWEI> system-view [HUAWEI] sysname SwitchB [SwitchB] vlan 13 [SwitchB-vlan13] quit [SwitchB] interface gigabitethernet 0/0/1 [SwitchB-GigabitEthernet0/0/1] port link-type hybrid [SwitchB-GigabitEthernet0/0/1] port hybrid pvid vlan 13 [SwitchB-GigabitEthernet0/0/1] port hybrid untagged vlan 13 [SwitchB-GigabitEthernet0/0/1] quit
# Configure SwitchA.
[SwitchA] interface vlanif13 [SwitchA-Vlanif13] ip address 10.1.1.5 24 [SwitchA-Vlanif13] quit
# Configure SwitchB.
[SwitchB] interface vlanif13 [SwitchB-Vlanif13] ip address 10.1.1.6 24 [SwitchB-Vlanif13] quit
# Configure SwitchA.
[SwitchA] bfd [SwitchA-bfd] quit [SwitchA] bfd atob bind peer-ip 10.1.1.6 interface vlanif13 source-ip 10.1.1.5 one-arm-echo [SwitchA-bfd-session-atob] discriminator local 1 [SwitchA-bfd-session-atob] min-echo-rx-interval 100 [SwitchA-bfd-session-atob] commit [SwitchA-bfd-session-atob] quit
# When the network runs stably, run the display bfd session all verbose command on SwitchA. You can see that a single-hop BFD session is set up and its status is Up.
[SwitchA] display bfd session all verbose -------------------------------------------------------------------------------- Session MIndex : 256 (One Hop) State : Up Name : atob -------------------------------------------------------------------------------- Local Discriminator : 1 Remote Discriminator : - Session Detect Mode : Asynchronous One-arm-echo Mode BFD Bind Type : Interface(Vlanif13) Bind Session Type : Static Bind Peer IP Address : 10.1.1.6 NextHop Ip Address : 10.1.1.6 Bind Interface : Vlanif13 Bind Source IP Address : 10.1.1.5 FSM Board Id : 0 TOS-EXP : 7 Echo Rx Interval (ms) : 100 Actual Tx Interval (ms): 100 Actual Rx Interval (ms): 100 Local Detect Multi : 3 Detect Interval (ms) : 300 Echo Passive : Disable Acl Number : - Destination Port : 3784 TTL : 255 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
SwitchA configuration file
# sysname SwitchA # vlan batch 13 # bfd # interface Vlanif13 ip address 10.1.1.5 255.255.255.0 # interface GigabitEthernet0/0/1 port link-type hybrid port hybrid pvid vlan 13 port hybrid untagged vlan 13 # bfd atob bind peer-ip 10.1.1.6 interface Vlanif13 source-ip 10.1.1.5 one-arm-echo discriminator local 1 min-echo-rx-interval 100 commit # return
SwitchB configuration file
# sysname SwitchB # vlan batch 13 # interface Vlanif13 ip address 10.1.1.6 255.255.255.0 # interface GigabitEthernet0/0/1 port link-type hybrid port hybrid pvid vlan 13 port hybrid untagged vlan 13 # return