No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - IP Unicast Routing

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R009

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring BFD for IPv4 Static Routes

Example for Configuring BFD for IPv4 Static Routes

Networking Requirements

As shown in Figure 2-9, RouterA is connected to RouterB through SwitchC. You need to configure static routes on RouterA so that RouterA can communicate with the external network. Link fault detection between RouterA and RouterB must be at the millisecond level to improve convergence speed.

Figure 2-9 Networking diagram of configuring static BFD for IPv4 static routes

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure IP addresses for interfaces so that devices can communicate with each other.
  2. Configure a BFD session between RouterA and RouterB.
  3. Configure a default static route from RouterA to the external network and bind the default static route to the BFD session. This configuration can implement link fault detection at the millisecond level and improve convergence speed of static routes.

Procedure

  1. Configure IP addresses for interfaces on each Router.

    # Configure IP addresses for interfaces on RouterA.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 1.1.1.1 24
    [RouterA-GigabitEthernet1/0/0] quit
    

    The configuration of Router B is similar to the configuration of Router A, and is not mentioned here.

  2. Configure a BFD session between RouterA and RouterB.

    # Configure a BFD session on RouterA.

    [RouterA] bfd
    [RouterA-bfd] quit
    [RouterA] bfd aa bind peer-ip 1.1.1.2
    [RouterA-bfd-session-aa] discriminator local 10
    [RouterA-bfd-session-aa] discriminator remote 20
    [RouterA-bfd-session-aa] commit
    [RouterA-bfd-session-aa] quit

    # Configure a BFD session on RouterB.

    [RouterB] bfd
    [RouterB-bfd] quit
    [RouterB] bfd bb bind peer-ip 1.1.1.1
    [RouterB-bfd-session-bb] discriminator local 20
    [RouterB-bfd-session-bb] discriminator remote 10
    [RouterB-bfd-session-bb] commit
    [RouterB-bfd-session-bb] quit

  3. Configure a default static route and bind it to a BFD session.

    # Configure a default static route to the external network on RouterA and bind it to a BFD session named aa.

    [RouterA] ip route-static 0.0.0.0 0 1.1.1.2 track bfd-session aa

  4. Verify the configuration.

    # After the configuration is complete, run the display bfd session all command on RouterA and RouterB. The command output shows that a BFD session has been established and is in Up state. Then, run the display current-configuration | include bfd command in the system view. The command output shows that the default static route has been bound to the BFD session.

    Take the display on RouterA as an example.

    [RouterA] display bfd session all
    --------------------------------------------------------------------------------
    Local  Remote PeerIpAddr      State     Type      InterfaceName
    --------------------------------------------------------------------------------
    10    20     1.1.1.2         Up        S_IP_PEER   -
    --------------------------------------------------------------------------------
         Total UP/DOWN Session Number : 1/0
    [RouterA] display current-configuration | include bfd
     bfd
    bfd aa bind peer-ip 1.1.1.2
     ip route-static 0.0.0.0 0.0.0.0 1.1.1.2 track bfd-session aa 

    # Check the IP routing table of RouterA. The command output shows that the static route exists in the routing table.

    [RouterA] display ip routing-table
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 3        Routes : 3
    Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface
            0.0.0.0/0   Static 60   0          RD  1.1.1.2         GigabitEthernet1/0/0
            1.1.1.0/24  Direct 0    0           D  1.1.1.1         GigabitEthernet1/0/0
            1.1.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet1/0/0
          1.1.1.255/32  Direct 0    0           D  127.0.0.1       GigabitEthernet1/0/0
          127.0.0.0/8   Direct 0    0           D  127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct 0    0           D  127.0.0.1       InLoopBack0
    127.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0
    255.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0

    # Run the shutdown command on GE1/0/0 of RouterB to simulate a link fault.

    [RouterB] interface gigabitethernet 1/0/0
    [RouterB-GigabitEthernet1/0/0] shutdown

    # Check the IP routing table of RouterA. The command output shows that default route 0.0.0.0/0 does not exist. This is because the default static route is bound to a BFD session. When BFD detects a link fault, BFD rapidly notifies that the bound static route becomes unavailable. If the static route is not bound to a BFD session, the default route 0.0.0.0/0 will always exist in IP routing table; however, this may cause traffic loss.

    [RouterA] display ip routing-table
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 2        Routes : 2
    Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface
            1.1.1.0/24  Direct 0    0           D  1.1.1.1         GigabitEthernet1/0/0
            1.1.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet1/0/0
          1.1.1.255/32  Direct 0    0           D  127.0.0.1       GigabitEthernet1/0/0
          127.0.0.0/8   Direct 0    0           D  127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct 0    0           D  127.0.0.1       InLoopBack0
    127.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0
    255.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0

Configuration Files

  • Configuration file of RouterA

    #
     sysname RouterA
    #
    bfd
    #
    interface GigabitEthernet1/0/0
     ip address 1.1.1.1 255.255.255.0
    #
    bfd aa bind peer-ip 1.1.1.2
     discriminator local 10
     discriminator remote 20
     commit
    #
     ip route-static 0.0.0.0 0.0.0.0 1.1.1.2 track bfd-session aa
    #
    return
  • Configuration file of RouterB

    
    
     sysname RouterB
    #
    bfd
    #
    interface GigabitEthernet1/0/0
     ip address 1.1.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 2.2.2.2 255.255.255.0
    #
    bfd bb bind peer-ip 1.1.1.1
     discriminator local 20
     discriminator remote 10
     commit
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 142737

Downloads: 280

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next