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

NE40E V800R010C10SPC500 Configuration Guide - IP Routing 01

This is NE40E V800R010C10SPC500 Configuration Guide - IP Routing
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

NQA for IPv4 static routes can fast detect network faults and control the advertisement of static routes.

Networking Requirements

On a simple network or when the router cannot use a dynamic routing protocol to generate routes, you can configure static routes. Unlike dynamic routing protocols, static routes do not have a detection mechanism. If a link fails, a network administrator must manually delete the corresponding static route from the IP routing table, which delays link switchovers and causes a lengthy service interruption.

Bidirectional Forwarding Detection (BFD) for static routes is adaptable to link changes but requires that both ends of a link support BFD. If either end of a link does not support BFD, configure NQA for IPv4 static routes. If an NQA test instance detects a link fault, it instructs the routing management module to delete the associated static route from the IPv4 routing table. Then traffic is switched to a backup route to prevent lengthy service interruptions.

In Figure 3-7, backup links are deployed on the IP metropolitan area network (MAN).
  • Static routes are configured on Device B and Device C. Device B is the master device, while Device C is the backup device.
  • In most cases, traffic is transmitted over the primary link (Device B -> Switch A).
  • If the primary link fails, traffic switches to the backup link (Device C -> Switch A).
Figure 3-7 NQA for IPv4 static routes
NOTE:

Interfaces 1 through 5 in this example are GE 1/0/0, GE 1/0/1, GE 1/0/2, GE 1/0/3, GE 2/0/3, respectively.



NOTE:

In this networking, Switch A and Switch B provide access services for users. In actual networking, optical line terminals (OLTs), digital subscriber line access multiplexers (DSLAMs), multiservice access nodes (MSANs), or x digital subscriber lines (xDSLs) can be used for user access.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create an Internet Control Message Protocol (ICMP) NQA test instance to monitor the status of the primary link.

    Create an ICMP NQA test instance on the NQA client Device B to test whether the primary link is running properly.

  2. Configure static routes and associate the static route along the primary link with the ICMP NQA test instance.

    Configure static routes on Device B and Device C, and associate the static route configured on Device B with the ICMP NQA test instance. If the ICMP NQA test instance detects a link fault, it instructs the routing management module to delete the associated static route from the IPv4 routing table.

  3. Configure a dynamic routing protocol.

    Configure a dynamic routing protocol on Device A, Device B, and Device C so that they can learn routes from one another.

  4. Configure the dynamic routing protocol to import static routes and set a higher cost for the static route along the backup link than for the one along the primary link.

    Configure the dynamic routing protocol on Device B and Device C to import static routes, and set a higher cost for the static route imported by Device C than for the one imported by Device B. This configuration allows Device A to preferentially select the link (Device B -> Switch A).

Data Preparation

To complete the configuration, you need the following data:

  • Interface IPv4 addresses (for details, see Table 3-1)
    Table 3-1 Interface IPv4 addresses

    Device

    Interface Number

    IP Address

    Device A

    GE 1/0/0

    172.10.3.2/24

    GE 2/0/3

    172.10.4.1/24

    Device B

    GE 1/0/0

    172.10.3.2/24

    GE 1/0/1

    172.10.1.1/24

    GE 1/0/3

    172.10.5.1/24

    Device C

    GE 1/0/0

    172.10.6.1/24

    GE 1/0/2

    172.10.2.1/24

    GE 2/0/3

    172.10.2.1/24

    Switch A

    VLANIF 10

    172.10.1.2/24

    VLANIF 20

    172.10.6.2/24

    VLANIF 30

    172.10.7.1/24

    Switch B

    VLANIF 10

    172.10.2.2/24

    VLANIF 20

    172.10.5.2/24

    VLANIF 30

    172.10.8.1/24

  • NQA item values (for details, see Table 3-2)
    Table 3-2 NQA item values

    Item

    Value

    Administrator name

    user

    Name of the test instance

    test

    Test type

    ICMP

    Destination address

    172.10.1.2

    Interval at which the NQA test automatically runs

    10 seconds

    Number of probes

    2

    Interval at which probe packets are sent

    5 seconds

    Timeout period

    4 seconds

  • OSPF backbone area (Area 0) of Device A, Device B, and Device C, and their router IDs (1.1.1.1, 2.2.2.2, and 3.3.3.3)

Procedure

  1. Configure interface IPv4 addresses. For configuration details, see Configuration Files in this section.
  2. Create an NQA test instance on Device B to test the link between Device B and Switch A.

    <DeviceB> system-view
    [~DeviceB] nqa test-instance user test
    [*DeviceB-nqa-user-test] test-type icmp
    [*DeviceB-nqa-user-test] destination-address ipv4 172.10.1.2
    [*DeviceB-nqa-user-test] frequency 10
    [*DeviceB-nqa-user-test] probe-count 2
    [*DeviceB-nqa-user-test] interval seconds 5
    [*DeviceB-nqa-user-test] timeout 4
    [*DeviceB-nqa-user-test] start now
    [*DeviceB-nqa-user-test] commit
    [~DeviceB-nqa-user-test] quit

  3. Configure IPv4 static routes.

    # Configure an IPv4 static route on Device B and associate it with the NQA test instance.

    [~DeviceB] ip route-static 172.10.7.0 255.255.255.0 GigabitEthernet 1/0/1 172.10.1.2 track nqa user test
    [*DeviceB] commit

    # Configure an IPv4 static route on Device C.

    [~DeviceC] ip route-static 172.10.7.0 255.255.255.0 GigabitEthernet 1/0/0 172.10.6.2
    [*DeviceC] commit

  4. Configure a dynamic routing protocol on Device A, Device B, and Device C. OSPF is used in this example.

    # Configure OSPF on Device A.

    [~DeviceA] ospf 1
    [*DeviceA-ospf-1] area 0.0.0.0
    [*DeviceA-ospf-1-area-0.0.0.0] network 172.10.3.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] network 172.10.4.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] quit
    [*DeviceA-ospf-1] quit
    [*DeviceA] commit

    # Configure OSPF on Device B.

    [~DeviceB] ospf 1
    [*DeviceB-ospf-1] area 0.0.0.0
    [*DeviceB-ospf-1-area-0.0.0.0] network 172.10.3.0 0.0.0.255
    [*DeviceB-ospf-1-area-0.0.0.0] quit
    [*DeviceB-ospf-1] quit
    [*DeviceB] commit

    # Configure OSPF on Device C.

    [~DeviceC] ospf 1
    [*DeviceC-ospf-1] area 0.0.0.0
    [*DeviceC-ospf-1-area-0.0.0.0] network 172.10.4.0 0.0.0.255
    [*DeviceC-ospf-1-area-0.0.0.0] quit
    [*DeviceC-ospf-1] quit
    [*DeviceC] commit

  5. Configure OSPF on Device B and Device C to import static routes.

    # Configure OSPF on Device B to import a static route, and set the cost to 10 for the static route.

    [~DeviceB] ospf 1
    [*DeviceB-ospf-1] import-route static cost 10
    [*DeviceB-ospf-1] commit
    [~DeviceB-ospf-1] quit

    # Configure OSPF on Device C to import a static route, and set the cost to 20 for the static route.

    [~DeviceC] ospf 1
    [*DeviceC-ospf-1] import-route static cost 20
    [*DeviceC-ospf-1] commit
    [~DeviceC-ospf-1] quit

  6. Verify the configuration.

    After the configuration is complete, run the display current-configuration | include nqa command on Device B in the system view. The command output shows that the IPv4 static route has been associated with the NQA test instance. Run the display nqa results command. The command output shows that an NQA test instance has been created.

    # Display configurations of NQA for IPv4 static routes.

    [~DeviceB] display current-configuration | include nqa
     ip route-static 172.10.7.0 255.255.255.0 GigabitEthernet 1/0/1 172.10.1.2 track nqa user test
     nqa test-instance user test
    

    # Display NQA test results.

    [~DeviceB] display nqa results test-instance user test
     NQA entry(user, test) : testflag is active ,testtype is icmp
      1 . Test 6645 result   The test is finished
       Send operation times: 2                Receive response times: 2
       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 Stats errors number:0
       Destination ip address:172.10.1.2
       Min/Max/Average Completion Time: 1/1/1
       Sum/Square-Sum  Completion Time: 2/2
       Last Good Probe Time: 2012-11-14 04:20:36.9
       Lost packet ratio: 0 %
    

    The command output shows "Lost packet ratio 0 %," indicating that the link is running properly.

    # Display the routing table on Device B.

    [~DeviceB] display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ------------------------------------------------------------------------------
    Routing Table : _public_
             Destinations : 15       Routes : 15
    
    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.10.1.0/24  Direct  0    0             D  172.10.1.1      GigabitEthernet1/0/1
         172.10.1.1/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/1
       172.10.1.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/1
         172.10.3.0/24  Direct  0    0             D  172.10.3.2      GigabitEthernet1/0/0
         172.10.3.2/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/0
       172.10.3.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/0
         172.10.4.0/24  OSPF    10   2             D  172.10.3.1      GigabitEthernet1/0/0
         172.10.5.0/24  Direct  0    0             D  172.10.5.1      GigabitEthernet1/0/3
         172.10.5.1/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/3
       172.10.5.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/3
       172.10.7.0/24  Static  60   0             D  172.10.1.2      GigabitEthernet1/0/1
    255.255.255.255/32  Direct  0    0             D  127.0.0.1       InLoopBack0
    

    The command output shows that the static route exists in the routing table.

    # Display the routing table on Device A.

    [~DeviceA] display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ------------------------------------------------------------------------------
    Routing Table : _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.10.3.0/24  Direct  0    0             D  172.10.3.1      GigabitEthernet1/0/0
         172.10.3.1/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/0
       172.10.3.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/0
         172.10.4.0/24  Direct  0    0             D  172.10.4.1      GigabitEthernet2/0/3
         172.10.4.1/32  Direct  0    0             D  127.0.0.1       GigabitEthernet2/0/3
       172.10.4.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet2/0/3
         172.10.7.0/24  O_ASE   150  10            D  172.10.3.2     GigabitEthernet1/0/0
    255.255.255.255/32  Direct  0    0             D  127.0.0.1       InLoopBack0
    

    The command output shows that a route to 172.10.7.0/24 exists in the routing table. The route's next hop address is 172.10.3.2 and the cost is 10. Traffic is preferentially transmitted along the link Device B -> Switch A.

    # Shut down GE 1/0/1 on Device B to simulate a link fault.

    [~DeviceB] interface GigabitEthernet 1/0/1
    [~DeviceB-GigabitEthernet1/0/1] shutdown
    [~DeviceB-GigabitEthernet1/0/1] commit
    [~DeviceB] quit

    # Display NQA test results.

    [~DeviceB] display nqa results test-instance user test
     NQA entry(user, test) : testflag is active ,testtype is icmp
      1 . Test 7160 result   The test is finished
       Send operation times: 2                Receive response times: 0
       Completion:failed                    RTD OverThresholds number:0
       Attempts number:1                      Drop operation number:0
       Disconnect operation number:0          Operation timeout number:2
       System busy operation number:0         Connection fail number:0
       Operation sequence errors number:0     RTT Stats errors number:0
       Destination ip address:172.10.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 %
    

    The command output shows "Completion:failed" and "Lost packet ratio is 100 %," indicating that the link is faulty.

    # Display the routing table on Device B.

    [~DeviceB] display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ------------------------------------------------------------------------------
    Routing Table : _public_
             Destinations : 12       Routes : 12
    
    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.10.3.0/24  Direct  0    0             D  172.10.3.2      GigabitEthernet1/0/0
         172.10.3.2/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/0
       172.10.3.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/0
         172.10.4.0/24  OSPF    10   2             D  172.10.3.1      GigabitEthernet1/0/0
         172.10.5.0/24  Direct  0    0             D  172.10.5.1      GigabitEthernet1/0/3
         172.10.5.1/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/3
       172.10.5.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/3
         172.10.7.0/24  O_ASE   150  20            D  172.10.3.1      GigabitEthernet1/0/0
    255.255.255.255/32  Direct  0    0             D  127.0.0.1       InLoopBack0
    

    The command output shows that the static route has been deleted.

    # Display the routing table on Device A.

    [~DeviceA] display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ------------------------------------------------------------------------------
    Routing Table : _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.10.3.0/24  Direct  0    0             D  172.10.3.1      GigabitEthernet1/0/0
         172.10.3.1/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/0
       172.10.3.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet1/0/0
         172.10.4.0/24  Direct  0    0             D  172.10.4.1      GigabitEthernet2/0/3
         172.10.4.1/32  Direct  0    0             D  127.0.0.1       GigabitEthernet2/0/3
       172.10.4.255/32  Direct  0    0             D  127.0.0.1       GigabitEthernet2/0/3
         172.10.7.0/24  O_ASE   150  20            D  172.10.4.2     GigabitEthernet2/0/3
    255.255.255.255/32  Direct  0    0             D  127.0.0.1       InLoopBack0
    
    

    The static route has been associated with the NQA test instance on Device B. If NQA detects a link fault, it rapidly notifies Device B that the associated static route is unavailable. Device A cannot learn the route to 172.10.7.0/24 from Device B. However, Device A can learn the route to 172.10.7.0/24 from Device C. The route's next hop address is 172.10.4.2, and the cost is 20. Traffic switches to the link Device C -> Switch A.

Configuration Files

  • Device A configuration file

    #
    sysname DeviceA
    #
    router id 1.1.1.1
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 172.10.3.1 255.255.255.0
    #
    interface GigabitEthernet2/0/3
     undo shutdown
     ip address 172.10.4.1 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 172.10.3.0 0.0.0.255
      network 172.10.4.0 0.0.0.255
    #
    return
  • Device B configuration file

    #
    sysname DeviceB
    #
    router id 2.2.2.2
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 172.10.3.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     undo shutdown
     ip address 172.10.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/3
     undo shutdown
     ip address 172.10.5.1 255.255.255.0
    #
    ospf 1
     import-route static cost 10
     area 0.0.0.0
      network 172.10.3.0 0.0.0.255
    #
    ip route-static 172.10.7.0 255.255.255.0 GigabitEthernet1/0/1 172.10.1.2 track nqa user test
    #
    nqa test-instance user test
     test-type icmp
     destination-address ipv4 172.10.1.2
     interval seconds 5
     timeout 4
     probe-count 2
     frequency 10
     start now
    #
    return
  • Device C configuration file

    #
    sysname DeviceC
    #
    router id 3.3.3.3
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 172.10.6.1 255.255.255.0
    #
    interface GigabitEthernet1/0/2
     undo shutdown
     ip address 172.10.2.1 255.255.255.0
    #
    interface GigabitEthernet2/0/3
     undo shutdown
     ip address 172.10.4.2 255.255.255.0
    #
    ospf 1
     import-route static cost 20
     area 0.0.0.0
      network 172.10.4.0 0.0.0.255
    #
    ip route-static 172.10.7.0 255.255.255.0 GigabitEthernet1/0/0 172.10.6.2
    #
    return
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 56381

Downloads: 211

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