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

S2700, S3700, S5700, S6700, S7700, and S9700 Series Switches Typical Configuration Examples

This document provides examples for configuring features in typical usage scenarios.
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

Overview of NQA for IPv4 Static Routes

The network quality analysis (NQA) technology measures network performance and collects statistics on the delay, jitter, and packet loss ratio. NQA can measure real-time network QoS, and perform effective network fault diagnosis and location.

On a simple network or on a network where the route to the destination cannot be established using dynamic routing protocols, static routes can be configured. Unlike dynamic routing protocols, static routes do not have a dedicated detection mechanism. If a fault occurs, static routes cannot detect the fault, and the network administrator must delete the corresponding static route. This delays the link switchover and may cause lengthy service interruptions.

BFD for IPv4 static routes is adaptable to link changes but both ends of the link must support BFD. If either end of a link does not support BFD, NQA for IPv4 static routes can be configured. When an NQA test instance detects a link fault, it instructs the routing management module to delete the associated static route from the IP routing table. Then service traffic switches to a route without any link fault to prevent lengthy service interruptions.

Configuration Notes

  • The NQA function of the switch is license controlled. If the license is unavailable, NQA commands can be run, but the NQA function does not take effect.
  • Applicable products and versions: V200R003C00 and later versions

Networking Requirements

On a company network shown in Figure 9-4, access switches SwitchD and SwitchE connect to aggregation switches SwitchB and SwitchC in dual-homing mode through static routes to implement redundancy. The requirements are as follows:
  • A detection mechanism is deployed for static routes so that static routes can detect link faults and traffic can switch from a faulty link to prevent lengthy service interruptions.
  • In normal cases, traffic is transmitted along the primary link SwitchB->SwitchD.
  • If a fault occurs on the primary link, traffic switches 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 9-4  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

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 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.

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

  4. Configure the dynamic routing protocol to import static routes, and set a higher cost for the static route used for the backup link than for the static route used for the primary link to improve link reliability.

    Configure the dynamic routing protocol 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 to which each interface belongs.

    # Configure SwitchA. Ensure that the configurations of SwitchB, SwitchC, SwitchD, and SwitchE are the same as 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 an IP address for each VLANIF interface.

    # Configure SwitchA. Ensure that the configurations of SwitchB, SwitchC, SwitchD, and SwitchE are the same as 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   //Create an NQA test instance with the administrator name user and instance name test.
    [SwitchB-nqa-user-test] test-type icmp   //Set the test type of the NQA test instance to ICMP.
    [SwitchB-nqa-user-test] destination-address ipv4 192.168.1.2   //Configure the destination address of the NQA test instance to 192.168.1.2.
    [SwitchB-nqa-user-test] frequency 20   //Set the interval of periodic NQA test instances to 20s.
    [SwitchB-nqa-user-test] probe-count 2   //Set the number of probes to be sent each time in the NQA test instance to 2.
    [SwitchB-nqa-user-test] interval seconds 5   //Set the interval at which probe packets are sent in the NQA test instance to 5s.
    [SwitchB-nqa-user-test] timeout 4   //Set the timeout period of a probe in the NQA test instance to 4s.
    [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 on aggregation switch Switch 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.

    # Check configurations 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 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, T - to vpn-instance
    ------------------------------------------------------------------------------
    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, T - to vpn-instance
    ------------------------------------------------------------------------------
    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 the cost is 10. Traffic is 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 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: 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, T - to vpn-instance
    ------------------------------------------------------------------------------
    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, T - to vpn-instance
    ------------------------------------------------------------------------------
    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 is unavailable. SwitchA 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 the cost is 20. Traffic switches 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
Download
Updated: 2019-04-20

Document ID: EDOC1000069520

Views: 657416

Downloads: 29806

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