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

Configuration Guide - IP Unicast Routing

S7700 and S9700 V200R010C00

This document describes IP Unicast Routing configurations supported by the switch, including the principle and configuration procedures of IP Routing Overview, Static Route, RIP, RIPng, OSPF, OSPFv3, IS-IS(IPv4), IS-IS(IPv6), BGP, Routing Policy ,and PBR, and provides configuration examples.
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

Figure 1 shows a company network. Access switches SwitchD and SwitchE are dual-homed to aggregation switches SwitchB and SwitchC using static routes for redundancy backup. The requirements for the network are as follows:
  • A fault detection mechanism must be deployed for static routes so that link faults can be detected rapidly for static routes and traffic can be switched from a faulty link to prevent lengthy service interruptions.
  • When the primary link SwitchB→SwitchD is working properly, traffic must be transmitted along the primary link.
  • When the primary link becomes faulty, traffic must be switched to the backup link SwitchC→SwitchD.
NOTE:

In this scenario, ensure that all connected interfaces have STP disabled. If STP is enabled and VLANIF interfaces of switches are used to construct a Layer 3 ring network, an interface on the network will be blocked. As a result, Layer 3 services on the network cannot run normally.

Figure 2-10  NQA for IPv4 static routes

Device Name

Interface

IP Address

SwitchA

VLANIF 30

192.168.3.1/24

VLANIF 40

192.168.4.1/24

SwitchB

VLANIF 30

192.168.3.2/24

VLANIF 50

192.168.5.1/24

VLANIF 10

192.168.1.1/24

SwitchC

VLANIF 40

192.168.4.2/24

VLANIF 60

192.168.6.1/24

VLANIF 20

192.168.2.1/24

SwitchD

VLANIF 10

192.168.1.2/24

VLANIF 60

192.168.6.2/24

VLANIF 70

192.168.7.1/24

SwitchE

VLANIF 20

192.168.2.2/24

VLANIF 50

192.168.5.2/24

VLANIF 80

192.168.8.1/24

Configuration Roadmap

  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 SwitchB to test whether the primary link SwitchB→SwitchD is running properly.

  2. Configure static routes and associate the static routes with the NQA test instance.

    Configure static routes on aggregation switches SwitchB and SwitchC, and associate the static route configured on SwitchB with the ICMP NQA test instance. When 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 (for example, OSPF).

    Configure a dynamic routing protocol on aggregation switches SwitchA, SwitchB, and SwitchC so that they can learn routes from each other.

  4. Configure OSPF to import static routes, and set a higher cost for the static route used for the backup link than that for the static route used for the primary link to implement link backup.

    Configure OSPF on aggregation switches SwitchB and SwitchC to import static routes, and set a higher cost for the static route imported by SwitchC than for the static route imported by SwitchB. This configuration allows SwitchA to preferentially select the link SwitchB→SwitchD with a lower cost.

Procedure

  1. Configure VLANs and add interfaces to the VLANs.

    # Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, and SwitchE are similar to the configuration of SwitchA.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 30 40
    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type trunk
    [SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 30
    [SwitchA-GigabitEthernet1/0/1] quit
    [SwitchA] interface gigabitethernet 1/0/2
    [SwitchA-GigabitEthernet1/0/2] port link-type trunk
    [SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 40
    [SwitchA-GigabitEthernet1/0/2] quit

  2. Configure IP addresses for VLANIF interfaces.

    # Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, and SwitchE are similar to the configuration of SwitchA.

    [SwitchA] interface vlanif 30
    [SwitchA-Vlanif30] ip address 192.168.3.1 24
    [SwitchA-Vlanif30] quit
    [SwitchA] interface vlanif 40
    [SwitchA-Vlanif40] ip address 192.168.4.1 24
    [SwitchA-Vlanif40] quit

  3. Create an NQA test instance on SwitchB to test the link between SwitchB and SwitchD.

    [SwitchB] nqa test-instance user test
    [SwitchB-nqa-user-test] test-type icmp
    [SwitchB-nqa-user-test] destination-address ipv4 192.168.1.2
    [SwitchB-nqa-user-test] frequency 20
    [SwitchB-nqa-user-test] probe-count 2
    [SwitchB-nqa-user-test] interval seconds 5
    [SwitchB-nqa-user-test] timeout 4
    [SwitchB-nqa-user-test] start now
    [SwitchB-nqa-user-test] quit
    

  4. Configure IPv4 static routes.

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

    [SwitchB] ip route-static 192.168.7.0 255.255.255.0 Vlanif 10 192.168.1.2 track nqa user test

    # Configure an IPv4 static route on SwitchC.

    [SwitchC] ip route-static 192.168.7.0 255.255.255.0 Vlanif 60 192.168.6.2

  5. Configure a dynamic routing protocol on SwitchA, SwitchB, and SwitchC. OSPF is used in this example.

    # Configure OSPF on SwitchA.

    [SwitchA] ospf 1 router-id 10.1.1.1
    [SwitchA-ospf-1] area 0.0.0.0
    [SwitchA-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] network 192.168.4.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] quit
    [SwitchA-ospf-1] quit
    

    # Configure OSPF on SwitchB.

    [SwitchB] ospf 1 router-id 10.2.2.2
    [SwitchB-ospf-1] area 0.0.0.0
    [SwitchB-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
    [SwitchB-ospf-1-area-0.0.0.0] quit
    [SwitchB-ospf-1] quit
    

    # Configure OSPF on SwitchC.

    [SwitchC] ospf 1 router-id 10.3.3.3
    [SwitchC-ospf-1] area 0.0.0.0
    [SwitchC-ospf-1-area-0.0.0.0] network 192.168.4.0 0.0.0.255
    [SwitchC-ospf-1-area-0.0.0.0] quit
    [SwitchC-ospf-1] quit
    

  6. Configure OSPF on SwitchB and SwitchC to import static routes.

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

    [SwitchB] ospf 1
    [SwitchB-ospf-1] import-route static cost 10
    [SwitchB-ospf-1] quit
    

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

    [SwitchC] ospf 1
    [SwitchC-ospf-1] import-route static cost 20
    [SwitchC-ospf-1] quit
    

  7. Verify the configuration.

    After the configuration is complete, run the display current-configuration | include nqa command in the system view on aggregation switch Switch B. 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.

    # Check the configuration of NQA for IPv4 static routes.

    [SwitchB] display current-configuration | include nqa
    ip route-static 192.168.7.0 255.255.255.0 Vlanif10 192.168.1.2 track nqa user test
    nqa test-instance user test
    

    # Check the NQA test results.

    [SwitchB] display nqa results test-instance user test
    
     NQA entry(user, test) :testflag is active ,testtype is icmp 
      1 . Test 288 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 Status errors number:0         
       Destination ip address:192.168.1.2                                    
       Min/Max/Average Completion Time: 3/4/3                                
       Sum/Square-Sum  Completion Time: 7/25                                 
       Last Good Probe Time: 2014-09-09 09:55:38.2                           
       Lost packet ratio: 0 %
    

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

    # Check the IP routing table on SwitchB.

    [SwitchB] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 10       Routes : 10       
    
    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
        192.168.1.0/24  Direct  0    0           D   192.168.1.1     Vlanif10
        192.168.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif10
        192.168.3.0/24  Direct  0    0           D   192.168.3.2     Vlanif30
        192.168.3.2/32  Direct  0    0           D   127.0.0.1       Vlanif30
        192.168.4.0/24  OSPF    10   2           D   192.168.3.1     Vlanif30
        192.168.5.0/24  Direct  0    0           D   192.168.5.1     Vlanif50
        192.168.5.1/32  Direct  0    0           D   127.0.0.1       Vlanif50
        192.168.7.0/24  Static  60   0           D   192.168.1.2     Vlanif10

    # Check the IP routing table on aggregation switch SwitchA.

    [SwitchA] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 7        Routes : 7        
    
    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
        192.168.3.0/24  Direct  0    0           D   192.168.3.1     Vlanif30
        192.168.3.1/32  Direct  0    0           D   127.0.0.1       Vlanif30
        192.168.4.0/24  Direct  0    0           D   192.168.4.1     Vlanif40
        192.168.4.1/32  Direct  0    0           D   127.0.0.1       Vlanif40
        192.168.7.0/24  O_ASE   150  10          D   192.168.3.2     Vlanif30
    

    The command output shows that a route to 192.168.7.0/24 exists in the routing table. The route's next-hop address is 192.168.3.2 and its cost is 10. Traffic is then preferentially transmitted along the link SwitchB -> SwitchD.

    # Shut down GigabitEthernet1/0/3 on SwitchB to simulate a link fault.

    [SwitchB] interface GigabitEthernet1/0/3
    [SwitchB-GigabitEthernet1/0/3] shutdown
    [SwitchB-GigabitEthernet1/0/3] quit
    

    # Check the NQA test results.

    [SwitchB] display nqa results test-instance user test
    
     NQA entry(user, test) :testflag is active ,testtype is icmp 
      1 . Test 309 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:2            
       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:192.168.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.

    # Check the IP routing table on SwitchB.

    [SwitchB] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 8        Routes : 8        
    
    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
        192.168.3.0/24  Direct  0    0           D   192.168.3.2     Vlanif30
        192.168.3.2/32  Direct  0    0           D   127.0.0.1       Vlanif30
        192.168.4.0/24  OSPF    10   2           D   192.168.3.1     Vlanif30
        192.168.5.0/24  Direct  0    0           D   192.168.5.1     Vlanif50
        192.168.5.1/32  Direct  0    0           D   127.0.0.1       Vlanif50
        192.168.7.0/24  O_ASE   150  20          D   192.168.3.1     Vlanif30
    

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

    # Check the IP routing table on SwitchA.

    [SwitchA] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 7        Routes : 7        
    
    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
        192.168.3.0/24  Direct  0    0           D   192.168.3.1     Vlanif30
        192.168.3.1/32  Direct  0    0           D   127.0.0.1       Vlanif30
        192.168.4.0/24  Direct  0    0           D   192.168.4.1     Vlanif40
        192.168.4.1/32  Direct  0    0           D   127.0.0.1       Vlanif40
        192.168.7.0/24  O_ASE   150  20          D   192.168.4.2     Vlanif40
    

    The static route has been associated with the NQA test instance on SwitchB. If NQA detects a link fault, it rapidly notifies SwitchB that the associated static route becomes unavailable. SwitchA then cannot learn the route to 192.168.7.0/24 from SwitchB. However, SwitchA can learn the route to 192.168.7.0/24 from SwitchC. The route's next-hop address is 192.168.4.2, and its cost is 20. Traffic has been switched to the link SwitchC -> SwitchD.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 30 40
    #
    interface Vlanif30
     ip address 192.168.3.1 255.255.255.0
    #
    interface Vlanif40
     ip address 192.168.4.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    ospf 1 router-id 10.1.1.1
     area 0.0.0.0
      network 192.168.3.0 0.0.0.255
      network 192.168.4.0 0.0.0.255
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 10 30 50
    #
    interface Vlanif10
     ip address 192.168.1.1 255.255.255.0
    #
    interface Vlanif30
     ip address 192.168.3.2 255.255.255.0
    #
    interface Vlanif50
     ip address 192.168.5.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    interface GigabitEthernet1/0/3
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    ospf 1 router-id 10.2.2.2
     import-route static cost 10
     area 0.0.0.0
      network 192.168.3.0 0.0.0.255
    #
    ip route-static 192.168.7.0 255.255.255.0 Vlanif10 192.168.1.2 track nqa user test
    #
    nqa test-instance user test
     test-type icmp
     destination-address ipv4 192.168.1.2
     frequency 20
     interval seconds 5
     timeout 4
     probe-count 2
     start now
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 20 40 60
    #
    interface Vlanif20
     ip address 192.168.2.1 255.255.255.0
    #
    interface Vlanif40
     ip address 192.168.4.2 255.255.255.0
    #
    interface Vlanif60
     ip address 192.168.6.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    interface GigabitEthernet1/0/3
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    ospf 1 router-id 10.3.3.3
     import-route static cost 20
     area 0.0.0.0
      network 192.168.4.0 0.0.0.255
    #
    ip route-static 192.168.7.0 255.255.255.0 Vlanif60 192.168.6.2
    #
    return
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    vlan batch 10 60 70
    #
    interface Vlanif10
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif60
     ip address 192.168.6.2 255.255.255.0
    #
    interface Vlanif70
     ip address 192.168.7.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    interface GigabitEthernet1/0/4
     port link-type trunk
     port trunk allow-pass vlan 70
    #
    return
  • SwitchE configuration file

    #
    sysname SwitchE
    #
    vlan batch 20 50 80
    #
    interface Vlanif20
     ip address 192.168.2.2 255.255.255.0
    #
    interface Vlanif50
     ip address 192.168.5.2 255.255.255.0
    #
    interface Vlanif80
     ip address 192.168.8.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    interface GigabitEthernet1/0/4
     port link-type trunk
     port trunk allow-pass vlan 80
    #
    return
Translation
Download
Updated: 2019-08-21

Document ID: EDOC1000141900

Views: 180428

Downloads: 192

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