Configuring BFD for RIP (bidirectional detection in BFD control packet mode)

Network requirements

As shown in Figure 13, VLAN-interface 100 of Switch A and VLAN-interface 200 of Switch C run RIP process 1.

VLAN-interface 300 of Switch A runs RIP process 2. VLAN-interface 400 of Switch C, and VLAN-interface 300 and VLAN-interface 400 of Switch D run RIP process 1.

Configure a static route destined for 100.1.1.0/24 on Switch A, configure a static route destined for 101.1.1.0/24 on Switch C, and enable static route redistribution into RIP on Switch A and Switch C so Switch A can learn two routes destined for 100.1.1.0/24 through VLAN-interface 100 and VLAN-interface 300, and uses the one through VLAN-interface 100.

Enable BFD on VLAN-interface 100 of Switch A and VLAN-interface 200 of Switch C. When the link over VLAN-interface 100 fails, BFD can quickly detect the link failure and notify RIP so RIP deletes the neighbor relationship and the route information received learned on VLAN-interface 100, and uses the route destined for 100.1.1.0/24 through VLAN-interface 300.

Figure 13: Network diagram

Device

Interface

IP address

Device

Interface

IP address

Switch A

Vlan-int300

192.168.3.1/24

Switch B

Vlan-int100

192.168.1.2/24

Vlan-int100

192.168.1.1/24

Vlan-int200

192.168.2.1/24

Switch C

Vlan-int200

192.168.2.2/24

Switch D

Vlan-int300

192.168.3.2/24

Vlan-int400

192.168.4.2/24

Vlan-int400

192.168.4.1/24

Configuration procedure

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

  2. Configure basic RIP and enable static route redistribution into RIP so Switch A and Switch C have routes to send to each other:

    # 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] network 101.1.1.0
    [SwitchA-rip-1] peer 192.168.2.2
    [SwitchA-rip-1] undo validate-source-address
    [SwitchA-rip-1] import-route static
    [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.3.0
    [SwitchA-rip-2] 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.2.0
    [SwitchC-rip-1] network 192.168.4.0
    [SwitchC-rip-1] network 100.1.1.0
    [SwitchC-rip-1] peer 192.168.1.1
    [SwitchC-rip-1] undo validate-source-address
    [SwitchC-rip-1] import-route static
    [SwitchC-rip-1] quit
    [SwitchC] interface vlan-interface 200
    [SwitchC-Vlan-interface200] rip bfd enable
    [SwitchC-Vlan-interface200] quit
    

    # Configure Switch D.

    <SwitchD> system-view
    [SwitchD] rip 1
    [SwitchD-rip-1] version 2
    [SwitchD-rip-1] undo summary
    [SwitchD-rip-1] network 192.168.3.0
    [SwitchD-rip-1] network 192.168.4.0
    
  3. Configure BFD parameters:

    # Configure Switch A.

    [SwitchA] bfd session init-mode active
    [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
    

    # Configure Switch C.

    [SwitchC] bfd session init-mode active
    [SwitchC] interface vlan-interface 200
    [SwitchC-Vlan-interface200] bfd min-transmit-interval 500
    [SwitchC-Vlan-interface200] bfd min-receive-interval 500
    [SwitchC-Vlan-interface200] bfd detect-multiplier 7
    [SwitchC-Vlan-interface200] quit
    
  4. Configure static routes:

    # Configure a static route to Switch C on Switch A.

    [SwitchA] ip route-static 192.168.2.0 24 vlan-interface 100 192.168.1.2
    [SwitchA] quit
    

    # Configure a static route to Switch A on Switch C.

    [SwitchC] ip route-static 192.168.1.0 24 vlan-interface 200 192.168.2.1
    

    # 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 Ctrl mode:
    
     LD/RD             SourceAddr      DestAddr        State    Holdtime    Interface
     513/513           192.168.1.1     192.168.2.2     Up       1700ms      vlan100
    

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

    <SwitchB> display ip routing-table 100.1.1.0 24 verbose
    
    Summary Count : 1
    
    Destination: 100.1.1.0/24
       Protocol: RIP             Process ID: 1
      SubProtID: 0x1                    Age: 00h02m47s
           Cost: 1               Preference: 100
            Tag: 0                    State: Active Adv
      OrigTblID: 0x0                OrigVrf: default-vrf
        TableID: 0x2                 OrigAs: 0
          NBRID: 0x12000002          LastAs: 0
         AttrID: 0xffffffff        Neighbor: 192.168.2.2
          Flags: 0x1008c        OrigNextHop: 192.168.2.2
          Label: NULL           RealNextHop: 192.168.1.2
        BkLabel: NULL             BkNextHop: N/A
      Tunnel ID: Invalid          Interface: vlan-interface 100
    BkTunnel ID: Invalid        BkInterface: N/A
    

    # Display RIP routes destined for 100.1.1.0/24 on Switch A when the link between Switch B and Switch C fails.

    <SwitchA> display ip routing-table 100.1.1.0 24 verbose
    
    Summary Count : 1
    
    Destination: 100.1.1.0/24
       Protocol: RIP             Process ID: 2
      SubProtID: 0x1                    Age: 00h18m40s
           Cost: 2               Preference: 100
            Tag: 0                    State: Active Adv
      OrigTblID: 0x0                OrigVrf: default-vrf
        TableID: 0x2                 OrigAs: 0
          NBRID: 0x12000003          LastAs: 0
         AttrID: 0xffffffff        Neighbor: 192.168.3.2
          Flags: 0x1008c        OrigNextHop: 192.168.3.2
          Label: NULL           RealNextHop: 192.168.3.2
        BkLabel: NULL             BkNextHop: N/A
      Tunnel ID: Invalid          Interface: vlan-interface 300
    BkTunnel ID: Invalid        BkInterface: N/A
    

Verifying the configuration