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 NQA for IPv4 Static Routes

Example for Configuring NQA for IPv4 Static Routes

Networking Requirements

As shown in Figure 2-10, multiple static routes are configured on RouterA so that packets can be forwarded from RouterA to users. To improve link reliability when access switches do not support BFD, customers require that packets sent from RouterA be transmitted along the primary link RouterA->RouterB->Switch->User when the primary link is working properly. When the primary link fails, the packets can be switched to the backup link RouterA->RouterC->Switch->User for forwarding.

Figure 2-10 Networking diagram of configuring NQA for IPv4 static routes

Configuration Roadmap

To improve link reliability, a link detection mechanism needs to be deployed on the device to detect the link status in real time and then the detected link status is associated with the route status. Access switches do not support BFD. You can associate IPv4 static routes with NQA to meet this link reliability requirement. The configuration roadmap is as follows:

  1. On RouterA, RouterB, and RouterC, configure IP addresses for interfaces and configure static routes to Client1 (Client1 is used to represent users). Two static routes must be configured on RouterA, and the static route with next hop RouterB must have a higher priority than the static route with next hop RouterC so that packets sent from RouterA to Client1 can be transmitted according to the two primary and backup static routes.

  2. Configure an ICMP NQA test instance on the primary link from RouterA to SwitchA and associate the static route of which the next hop is RouterB with the ICMP NQA test instance to fast detect link faults for service switching.
NOTE:

When a static route is associated with an NQA test instance, only ICMP test instances are used to test whether there are reachable routes between the source and destination.

Procedure

  1. Configure IP addresses on Routers.

    # 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 172.16.3.1 24
    [RouterA-GigabitEthernet1/0/0] quit
    [RouterA] interface gigabitEthernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] ip address 172.16.4.1 24
    [RouterA-GigabitEthernet2/0/0] quit

    The configurations of RouterB and RouterC are similar to the configuration of RouterA, and are not mentioned here.

  2. Configure static routes from RouterA, RouterB, and RouterC to Client1.

    # On RouterA, configure two static routes to Client1 and set the priority of the static route with next hop RouterC to 100.

    [RouterA] ip route-static 172.16.7.0 255.255.255.0 172.16.3.2
    [RouterA] ip route-static 172.16.7.0 255.255.255.0 172.16.4.2 preference 100

    # On RouterB, configure a static route to Client1.

    [RouterB] ip route-static 172.16.7.0 255.255.255.0 172.16.1.2

    # On RouterC, configure a static route to Client1.

    [RouterC] ip route-static 172.16.7.0 255.255.255.0 172.16.6.2

  3. Configure an NQA test instance on RouterA to test the link between RouterA and SwitchA.

    [RouterA] nqa test-instance aa bb
    [RouterA-nqa-aa-bb] test-type icmp
    [RouterA-nqa-aa-bb] destination-address ipv4 172.16.1.2
    [RouterA-nqa-aa-bb] frequency 5
    [RouterA-nqa-aa-bb] probe-count 1
    [RouterA-nqa-aa-bb] start now
    [RouterA-nqa-aa-bb] quit
    NOTE:

    If a link becomes faulty, the NQA test instance detects this fault and then the static routes associated with the NQA test instance become Down. After the link recovers, the NQA test instance attempts to send ICMP test packets over the static routes. Because these static routes are still Down, the NQA test instance still fails to detect link connectivity. Traffic fails to be forwarded. The nexthop ipv4 ip-address command configures a next hop address for the NQA test packets, which ensures that the packets are forwarded when the link recovers from the fault, and the static routes associated with the NQA test instance are Up.

  4. On RouterA, associate the static route of which the next hop is RouterB with the NQA test instance.

    [RouterA] ip route-static 172.16.7.0 255.255.255.0 172.16.3.2 track nqa aa bb

  5. Verify the configuration.

    # After the configuration is complete, run the display current-configuration | include nqa command in the system view on RouterA to check whether the static route has been associated with the NQA test instance.

    [RouterA] display current-configuration | include nqa
     ip route-static 172.16.7.0 255.255.255.0 172.16.3.2 track nqa aa bb
    nqa test-instance aa bb
    

    # Run the display nqa results command on RouterA to check the NQA test results. In this example, information "Lost packet ratio: 0 %" is displayed, indicating that the link works properly.

    [RouterA] display nqa results test-instance aa bb
     NQA entry(aa, bb) :testflag is active ,testtype is icmp
      1 . Test 1987 result   The test is finished
       Send operation times: 1              Receive response times: 1
       Completion:success                   RTD OverThresholds number: 0
       Attempts number:1                    Drop operation number:0
       Disconnect operation number:0        Operation timeout number:0
       System busy operation number:0       Connection fail number:0
       Operation sequence errors number:0   RTT Status errors number:0
       Destination ip address:172.16.1.2
       Min/Max/Average Completion Time: 120/120/120
       Sum/Square-Sum  Completion Time: 120/14400
       Last Good Probe Time: 2012-01-06 19:14:57.5
       Lost packet ratio: 0 %
    

    # Check the routing table on RouterA. The routing table contains a static route with the next hop 172.16.3.2.

    [RouterA] display ip routing-table
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 11        Routes : 11
    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
    
          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
         172.16.3.0/24  Direct  0    0           D   172.16.3.1      GigabitEthernet1/0/0
         172.16.3.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
       172.16.3.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
         172.16.4.0/24  Direct  0    0           D   172.16.4.1      GigabitEthernet2/0/0
         172.16.4.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
       172.16.4.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
         172.16.7.0/24  Static  60   0           D   172.16.3.2      GigabitEthernet1/0/0
    255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    

    The routing table contains a route destined for 172.16.7.0/24 with next hop 172.16.3.2. Therefore, traffic travels along the primary link.

    # Shut down GE1/0/0 on RouterB to simulate a link fault.

    [RouterB] interface GigabitEthernet 1/0/0
    [RouterB-GigabitEthernet1/0/0] shutdown
    [RouterB-GigabitEthernet1/0/0] quit

    # Check the NQA test results. Information "Lost packet ratio: 100 %" is displayed, indicating that the link fails.

    [RouterA] display nqa results test-instance aa bb
     NQA entry(aa, bb) :testflag is active ,testtype is icmp
      1 . Test 2086 result   The test is finished
       Send operation times: 1              Receive response times: 0
       Completion:failed                    RTD OverThresholds number: 0
       Attempts number:1                    Drop operation number:1
       Disconnect operation number:0        Operation timeout number:0
       System busy operation number:0       Connection fail number:0
       Operation sequence errors number:0   RTT Status errors number:0
       Destination ip address:172.16.1.2
       Min/Max/Average Completion Time: 0/0/0
       Sum/Square-Sum  Completion Time: 0/0
       Last Good Probe Time: 0000-00-00 00:00:00.0
       Lost packet ratio: 100 %
    

    # Check the routing table on RouterA.

    [RouterA] display ip routing-table
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 11        Routes : 11
    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
    
          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
         172.16.3.0/24  Direct  0    0           D   172.16.3.1      GigabitEthernet1/0/0
         172.16.3.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
       172.16.3.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
         172.16.4.0/24  Direct  0    0           D   172.16.4.1      GigabitEthernet2/0/0
         172.16.4.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
       172.16.4.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
         172.16.7.0/24  Static  100  0           D   172.16.4.2      GigabitEthernet2/0/0
    255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    

    The command output shows that the next hop of the route to destination network segment 172.16.7.0/24 is 172.16.4.2. After NQA detects that primary link fails, NQA notifies RouterA that the static route to 172.16.7.0/24 becomes unavailable. Packets are then switched to the backup link for forwarding.

Configuration Files

  • Configuration file of RouterA

    #
     sysname RouterA
    #
    interface GigabitEthernet1/0/0
     ip address 172.16.3.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 172.16.4.1 255.255.255.0
    #
    ip route-static 172.16.7.0 255.255.255.0 172.16.3.2 track nqa aa bb
    ip route-static 172.16.7.0 255.255.255.0 172.16.4.2 preference 100
    #
    nqa test-instance aa bb
     test-type icmp
     destination-address ipv4 172.16.1.2
     frequency 5
     probe-count 1
     start now
    #
    return
  • Configuration file of RouterB

    #
     sysname RouterB
    #
    interface GigabitEthernet1/0/0
     ip address 172.16.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 172.16.3.2 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     ip address 172.16.5.1 255.255.255.0
    #
    ip route-static 172.16.7.0 255.255.255.0 172.16.1.2
    #
    return
  • Configuration file of RouterC

    #
     sysname RouterC
    #
    interface GigabitEthernet1/0/0
     ip address 172.16.2.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 172.16.4.2 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     ip address 172.16.6.1 255.255.255.0
    #
    ip route-static 172.16.7.0 255.255.255.0 172.16.6.2
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 128315

Downloads: 274

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