BFD for IPv6 static routes configuration example (direct next hop)

Network requirements

As shown in Figure 19:

When the link between Switch A and Switch B through the Layer 2 switch fails, BFD can detect the failure immediately, and Switch A and Switch B can communicate through Switch C.

Figure 19: Network diagram

Table 9: Interface and IP address assignment

Device

Interface

IPv6 address

Switch A

Vlan-int10

12::1/64

Switch A

Vlan-int11

10::102/64

Switch B

Vlan-int10

12::2/64

Switch B

Vlan-int13

13::1/64

Switch C

Vlan-int11

10::100/64

Switch C

Vlan-int13

13::2/64

Configuration procedure

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

  2. Configure IPv6 static routes and BFD:

    # Configure IPv6 static routes on Switch A and enable BFD control mode for the static route that traverses the Layer 2 switch.

    <SwitchA> system-view
    [SwitchA] interface vlan-interface 10
    [SwitchA-vlan-interface10] bfd min-transmit-interval 500
    [SwitchA-vlan-interface10] bfd min-receive-interval 500
    [SwitchA-vlan-interface10] bfd detect-multiplier 9
    [SwitchA-vlan-interface10] quit
    [SwitchA] ipv6 route-static 120:: 64 vlan-interface 10 12::2 bfd control-packet
    [SwitchA] ipv6 route-static 120:: 64 10::100 preference 65
    [SwitchA] quit
    

    # Configure IPv6 static routes on Switch B and enable BFD control mode for the static route that traverses the Layer 2 switch.

    <SwitchB> system-view
    [SwitchB] interface vlan-interface 10
    [SwitchB-vlan-interface10] bfd min-transmit-interval 500
    [SwitchB-vlan-interface10] bfd min-receive-interval 500
    [SwitchB-vlan-interface10] bfd detect-multiplier 9
    [SwitchB-vlan-interface10] quit
    [SwitchB] ipv6 route-static 121:: 64 vlan-interface 10 12::1 bfd control-packet
    [SwitchB] ipv6 route-static 121:: 64 vlan-interface 13 13::2 preference 65
    [SwitchB] quit
    

    # Configure IPv6 static routes on Switch C.

    <SwitchC> system-view
    [SwitchC] ipv6 route-static 120:: 64 13::1
    [SwitchC] ipv6 route-static 121:: 64 10::102
    

Verifying the configuration

# Display the BFD sessions on Switch A.

<SwitchA> display bfd session

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

 IPv6 Session Working Under Ctrl Mode:

       Local Discr: 513                 Remote Discr: 33
         Source IP: 12::1
    Destination IP: 12::2
     Session State: Up                      Interface: Vlan10
         Hold Time: 2012ms

The output shows that the BFD session has been created.

# Display IPv6 static routes on Switch A.

<SwitchA> display ipv6 routing-table protocol static

Summary Count : 1

Static Routing table Status : <Active>
Summary Count : 1

Destination: 120::/64                                    Protocol  : Static
NextHop    : 12::2                                       Preference: 60
Interface  : Vlan10                                      Cost      : 0

Direct Routing table Status : <Inactive>
Summary Count : 0

The output shows that Switch A communicates with Switch B through VLAN-interface 10. The link over VLAN-interface 10 fails.

# Display IPv6 static routes on Switch A again.

<SwitchA> display ipv6 routing-table protocol static

Summary Count : 1

Static Routing table Status : <Active>
Summary Count : 1

Destination: 120::/64                                    Protocol  : Static
NextHop    : 10::100                                     Preference: 65
Interface  : Vlan11                                      Cost      : 0

Static Routing table Status : < Inactive>
Summary Count : 0

The output shows that Switch A communicates with Switch B through VLAN-interface 11.