< Home

Example for Configuring Single-Hop BFD on a VLANIF Interface

Networking Requirements

As shown in Figure 1, SwitchA connects to SwitchB through the VLANIF interface. Faults on the link between SwitchA and SwitchB need to be fast detected.

Figure 1 Networking diagram for configuring single-hop BFD on a VLANIF interface

Configuration Roadmap

The configuration roadmap is as follows:

Configure BFD sessions on SwitchA and SwitchB.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. SwitchA is used as an example. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 100
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] ip address 10.1.1.5 24
    [SwitchA-Vlanif100] quit

  2. Configure single-hop BFD.

    # Enable BFD and create a BFD session on SwitchA.

    [SwitchA] bfd
    [SwitchA-bfd] quit
    [SwitchA] bfd atob bind peer-ip 10.1.1.6 interface vlanif 100
    [SwitchA-bfd-session-atob] discriminator local 1
    [SwitchA-bfd-session-atob] discriminator remote 2
    [SwitchA-bfd-session-atob] commit
    [SwitchA-bfd-session-atob] quit
    

    # Enable BFD and create a BFD session on SwitchB.

    [SwitchB] bfd
    [SwitchB-bfd] quit
    [SwitchB] bfd btoa bind peer-ip 10.1.1.5 interface vlanif 100
    [SwitchB-bfd-session-btoa] discriminator local 2
    [SwitchB-bfd-session-btoa] discriminator remote 1
    [SwitchB-bfd-session-btoa] commit
    [SwitchB-bfd-session-btoa] quit
    

  3. Verify the configuration.

    # When the network runs stably, run the display bfd session all verbose command on SwitchA and SwitchB. You can see that a single-hop BFD session is set up and its status is Up. The command output on SwitchA is used as an example.

    [SwitchA] display bfd session all verbose
    --------------------------------------------------------------------------------
    Session MIndex : 4097      (One Hop) State : Up      Name : atob              
    --------------------------------------------------------------------------------
      Local Discriminator    : 1                Remote Discriminator   : 2          
      Session Detect Mode    : Asynchronous Mode Without Echo Function              
      BFD Bind Type          : Interface(Vlanif100)                                 
      Bind Session Type      : Static                                               
      Bind Peer IP Address   : 10.1.1.6                                             
      NextHop Ip Address     : 10.1.1.6                                             
      Bind Interface         : Vlanif100                                            
      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                    : 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

    # Run the shutdown command on the GE0/0/1 interface of SwitchA to simulate a link fault.

    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] shutdown
    [SwitchA-GigabitEthernet0/0/1] quit

    # After the configuration is completed, run the display bfd session all verbose command on SwitchA and SwitchB. You can see that a single-hop BFD session is set up and its status is Down. The command output on SwitchA is used as an example.

    [SwitchA] display bfd session all verbose
    --------------------------------------------------------------------------------
    Session MIndex : 4097      (One Hop) State : Down      Name : atob              
    --------------------------------------------------------------------------------
      Local Discriminator    : 1                Remote Discriminator   : 2          
      Session Detect Mode    : Asynchronous Mode Without Echo Function              
      BFD Bind Type          : Interface(Vlanif100)                                 
      Bind Session Type      : Static                                               
      Bind Peer IP Address   : 10.1.1.6                                             
      NextHop Ip Address     : 10.1.1.6                                             
      Bind Interface         : Vlanif100                                            
      FSM Board Id           : 0                TOS-EXP                : 7          
      Min Tx Interval (ms)   : 1000             Min Rx Interval (ms)   : 1000       
      Actual Tx Interval (ms): 13000            Actual Rx Interval (ms): 13000      
      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                DSCP                   : - 
      Last Local Diagnostic  : Control Detection Time Expired                       
      Bind Application       : No Application Bind                                  
      Session TX TmrID       : 16897            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

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 100
    #
    bfd
    #
    interface Vlanif100
     ip address 10.1.1.5 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 100 
     port hybrid untagged vlan 100
    #
    bfd atob bind peer-ip 10.1.1.6 interface Vlanif100
     discriminator local 1
     discriminator remote 2
     commit
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 100
    #
    bfd
    #
    interface Vlanif100
     ip address 10.1.1.6 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 100 
     port hybrid untagged vlan 100
    #
    bfd btoa bind peer-ip 10.1.1.5 interface Vlanif100
     discriminator local 2
     discriminator remote 1
     commit
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >