Configuring BFD for RIP (single-hop echo detection for a directly connected neighbor)

Network requirements

As shown in Figure 12, VLAN-interface 100 of Switch A and Switch C runs RIP process 1. VLAN-interface 200 of Switch A runs RIP process 2. VLAN-interface 300 of Switch C and VLAN-interface 200 and VLAN-interface 300 of Switch B run RIP process 1.

Figure 12: Network diagram

Configuration procedure

  1. Configure IP addresses for interfaces. (Details not shown.)

  2. Configure basic RIP:

    # Configure Switch A.

    <SwitchA> system-view
    [SwitchA] rip 1
    [SwitchA-rip-1] version 2
    [SwitchA-rip-1] undo summary
    [SwitchA-rip-1] network 192.168.1.0
    [SwitchA-rip-1] quit
    [SwitchA] interface vlan-interface 100
    [SwitchA-Vlan-interface100] rip bfd enable
    [SwitchA-Vlan-interface100] quit
    [SwitchA] rip 2
    [SwitchA-rip-2] version 2
    [SwitchA-rip-2] undo summary
    [SwitchA-rip-2] network 192.168.2.0
    [SwitchA-rip-2] quit
    

    # Configure Switch B.

    <SwitchB> system-view
    [SwitchB] rip 1
    [SwitchB-rip-1] version 2
    [SwitchB-rip-1] undo summary
    [SwitchB-rip-1] network 192.168.2.0
    [SwitchB-rip-1] network 192.168.3.0
    [SwitchB-rip-1] quit
    

    # Configure Switch C.

    <SwitchC> system-view
    [SwitchC] rip 1
    [SwitchC-rip-1] version 2
    [SwitchC-rip-1] undo summary
    [SwitchC-rip-1] network 192.168.1.0
    [SwitchC-rip-1] network 192.168.3.0
    [SwitchC-rip-1] import-route static
    [SwitchC-rip-1] quit
    
  3. Configure BFD parameters on VLAN-interface 100 of Switch A.

    [SwitchA] bfd echo-source-ip 11.11.11.11
    [SwitchA] interface vlan-interface 100
    [SwitchA-Vlan-interface100] bfd min-transmit-interval 500
    [SwitchA-Vlan-interface100] bfd min-receive-interval 500
    [SwitchA-Vlan-interface100] bfd detect-multiplier 7
    [SwitchA-Vlan-interface100] quit
    [SwitchA] quit
    
  4. Configure a static route on Switch C.

    [SwitchC] ip route-static 120.1.1.1 24 null 0
    

Verifying the configuration

# Display the BFD session information on Switch A.

<SwitchA> display bfd session

 Total Session Num: 1     Up Session Num: 1     Init Mode: Active

 IPv4 Session Working Under Echo Mode:

 LD          SourceAddr      DestAddr        State    Holdtime    Interface
 4            192.168.1.1     192.168.1.2     Up       2000ms      Vlan100

# Display RIP routes destined for 120.1.1.0/24 on Switch A.

<SwitchA> display ip routing-table 120.1.1.0 24

Summary count : 1

Destination/Mask   Proto   Pre Cost        NextHop         Interface
120.1.1.0/24       RIP     100 1           192.168.1.2     Vlan-interface100

The output shows that Switch A communicates with Switch C through VLAN-interface 100. Then the link over VLAN-interface 100 fails.

# Display RIP routes destined for 120.1.1.0/24 on Switch A.

<SwitchA> display ip routing-table 120.1.1.0 24

Summary count : 1

Destination/Mask   Proto   Pre Cost        NextHop         Interface
120.1.1.0/24       RIP     100 1           192.168.2.2     Vlan-interface200

The output shows that Switch A communicates with Switch C through VLAN-interface 200.