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

S12700 V200R013C00 Configuration Guide - QoS

This document describes the configurations of QoS functions, including MQC, priority mapping, traffic policing, traffic shaping, interface-based rate limiting, congestion avoidance, congestion management, packet filtering, redirection, traffic statistics, ACL-based simplified traffic policy, and HQoS.
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 HQoS

Example for Configuring HQoS

Networking Requirements

Voice, video, and data services from multiple users are transmitted on a network, and 802.1p priorities of voice, video, and data services are 6, 5, and 2 respectively. Bandwidth needs to be guaranteed for the voice, video, and data services in descending order of priority. Table 10-7 and Table 10-8 describe the configuration requirements.

Because the bandwidth is limited, the device needs to differentiate service priorities and shape traffic from different users to provide different bandwidth. Table 10-9 describes the configuration requirement.

Table 10-7  Congestion avoidance parameters of flow queues

Service Type

Font Color

Lower Drop Threshold (%)

Upper Drop Threshold (%)

Maximum Drop Probability

Voice

Green

80

100

10

Video

Yellow

60

80

20

Data

Red

40

60

40

Table 10-8  Congestion management parameters of flow queues

Service Type

CoS Value

Voice

EF

Video

AF3

Data

AF1

Table 10-9  Traffic shaping parameters of subscriber queues

User

PIR

Users in VLAN 10

8000 kbit/s

Users in VLAN 20

5000 kbit/s

Figure 10-4  HQoS networking

Configuration Roadmap

The configuration roadmap is as follows:
  1. Create VLANs and configure interfaces so that the users can access the Internet through the Switch.
  2. Create a DiffServ domain on the Switch, map the 802.1p priorities of different service packets to PHBs and color, and bind the DiffServ domain to the inbound interface of the Switch.
  3. Configure a flow queue WRED drop profile, flow queue profile, and profile parameters on the Switch so that the Switch provides different scheduling priorities, drop profile parameters, and traffic shaping parameters for different services.
  4. Configure ACLs on the Switch to differentiate service traffic of different users based on VLAN IDs.
  5. Configure subscriber queues and traffic shaping parameters on the Switch, and reference the flow queue WRED drop profile and flow queue profile to implement HQoS.

Procedure

  1. Create VLANs and configure interfaces.

    # Create VLAN 10 on SwitchA, configure GE1/0/1 and GE1/0/2 on SwitchA as access interfaces and add them to VLAN 10, and configure GE2/0/1 as a trunk interface and add it to VLAN 10.

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

    # Create VLAN 20 on SwitchB, configure GE1/0/1 and GE1/0/2 on SwitchB as access interfaces and add them to VLAN 20, and configure GE2/0/1 as a trunk interface and add it to VLAN 20.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] vlan batch 20
    [SwitchB] interface gigabitethernet 1/0/1
    [SwitchB-GigabitEthernet1/0/1] port link-type access
    [SwitchB-GigabitEthernet1/0/1] port default vlan 20
    [SwitchB-GigabitEthernet1/0/1] quit
    [SwitchB] interface gigabitethernet 1/0/2
    [SwitchB-GigabitEthernet1/0/2] port link-type access
    [SwitchB-GigabitEthernet1/0/2] port default vlan 20
    [SwitchB-GigabitEthernet1/0/2] quit
    [SwitchB] interface gigabitethernet 2/0/1
    [SwitchB-GigabitEthernet2/0/1] port link-type trunk
    [SwitchB-GigabitEthernet2/0/1] port trunk allow-pass vlan 20
    [SwitchB-GigabitEthernet2/0/1] quit
    

    # Create VLAN 10 and VLAN 20 on SwitchC, configure GE1/0/1 on SwitchC as a trunk interface and add it to VLAN 10 and VLAN 20, and configure GE2/0/1 as a trunk interface and add it to VLAN 10 and VLAN 20.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchC
    [SwitchC] vlan batch 10 20
    [SwitchC] interface gigabitethernet 1/0/1
    [SwitchC-GigabitEthernet1/0/1] port link-type trunk
    [SwitchC-GigabitEthernet1/0/1] port trunk allow-pass vlan 10 20
    [SwitchC-GigabitEthernet1/0/1] quit
    [SwitchC] interface gigabitethernet 2/0/1
    [SwitchC-GigabitEthernet2/0/1] port link-type trunk
    [SwitchC-GigabitEthernet2/0/1] port trunk allow-pass vlan 10 20
    [SwitchC-GigabitEthernet2/0/1] quit
    

    # Create VLAN 10 and VLAN 20 on the Switch, configure GE1/0/1, GE1/0/2, and GE2/0/1 as trunk interfaces, and add GE1/0/1 to VLAN 10, GE1/0/2 to VLAN 20, and GE2/0/1 to VLAN 10 and VLAN 20.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan batch 10 20
    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] port link-type trunk
    [Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [Switch-GigabitEthernet1/0/1] quit
    [Switch] interface gigabitethernet 1/0/2
    [Switch-GigabitEthernet1/0/2] port link-type trunk
    [Switch-GigabitEthernet1/0/2] port trunk allow-pass vlan 20
    [Switch-GigabitEthernet1/0/2] quit
    [Switch] interface gigabitethernet 2/0/1
    [Switch-GigabitEthernet2/0/1] port link-type trunk
    [Switch-GigabitEthernet2/0/1] port trunk allow-pass vlan 10 20
    [Switch-GigabitEthernet2/0/1] quit

  2. Configure priority mapping.

    # Create DiffServ domain ds1, map 802.1p priorities 6, 5, 2 to EF, AF3, and AF1, and color packets green, yellow, and red.

    [Switch] diffserv domain ds1
    [Switch-dsdomain-ds1] 8021p-inbound 6 phb ef green
    [Switch-dsdomain-ds1] 8021p-inbound 5 phb af3 yellow
    [Switch-dsdomain-ds1] 8021p-inbound 2 phb af1 red
    [Switch-dsdomain-ds1] quit
    

    # Bind the DiffServ domain to GE1/0/1 and GE1/0/2 on the Switch.

    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] trust upstream ds1
    [Switch-GigabitEthernet1/0/1] trust 8021p inner
    [Switch-GigabitEthernet1/0/1] quit
    [Switch] interface gigabitethernet 1/0/2
    [Switch-GigabitEthernet1/0/2] trust upstream ds1
    [Switch-GigabitEthernet1/0/2] trust 8021p inner
    [Switch-GigabitEthernet1/0/2] quit

  3. Configure a flow queue WRED drop profile and define parameters in the profile.

    # Create flow queue WRED drop profile wred1 on the Switch and set parameters of green, yellow, and red packets in the flow queue WRED drop profile.

    [Switch] flow-wred-profile wred1
    [Switch-flow-wred-wred1] color green low-limit 80 high-limit 100 discard-percentage 10
    [Switch-flow-wred-wred1] color yellow low-limit 60 high-limit 80 discard-percentage 20
    [Switch-flow-wred-wred1] color red low-limit 40 high-limit 60 discard-percentage 40
    [Switch-flow-wred-wred1] quit

  4. Configure a flow queue profile and define parameters in the profile.

    # Configure flow queue profile flow1 on the Switch, bind flow queue profile flow1 to flow queue WRED drop profile wred1, and configure different scheduling parameters.

    [Switch] flow-queue-profile flow1
    [Switch-flow-queue-flow1] qos queue 5 pq flow-wred-profile wred1
    [Switch-flow-queue-flow1] qos queue 3 wfq weight 20 flow-wred-profile wred1
    [Switch-flow-queue-flow1] qos queue 1 wfq weight 10 flow-wred-profile wred1
    [Switch-flow-queue-flow1] quit
    

  5. Configure ACLs.

    # Configure ACL 4001 and ACL 4002 on the Switch, and configure ACL rules based on VLAN 10 and VLAN 20.

    [Switch] acl number 4001
    [Switch-acl-L2-4001] rule 1 permit vlan-id 10 
    [Switch-acl-L2-4001] quit
    [Switch] acl number 4002
    [Switch-acl-L2-4002] rule 1 permit vlan-id 20 
    [Switch-acl-L2-4002] quit

  6. Configure subscriber queues and parameters.

    # Configure subscriber queues based on ACL 4001 and ACL 4002 on the Switch and reference flow queue profile flow1.

    [Switch] interface gigabitethernet 2/0/1
    [Switch-GigabitEthernet2/0/1] traffic-user-queue outbound acl 4001 pir 8000 flow-queue-profile flow1
    [Switch-GigabitEthernet2/0/1] traffic-user-queue outbound acl 4002 pir 5000 flow-queue-profile flow1
    [Switch-GigabitEthernet2/0/1] quit
    [Switch] quit
    

  7. Verify the configuration.

    # Check the configuration of the flow queue WRED drop profile, including the profile name, upper and lower drop thresholds of green, yellow, and red packets, and maximum drop probability.

    <Switch> display flow-wred-profile name wred1
    Flow-wred-profile[1]: wred1                                                     
    Queue depth         : 1048576                                                   
    Color     Low-limit   High-limit  Discard-percentage                            
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -               
    Green     80          100         10                                            
    Yellow    60          80          20                                            
    Red       40          60          40                                            
    ----------------------------------------------------------------- 

    # Check the flow queue profile configuration, including the profile name and WFQ weights.

    <Switch> display flow-queue-profile name flow1
    Flow-queue-profile[1]: flow1                                                    
    Queue Schedule(Weight) Shaping         flow-wred-profile                        
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -         
    0     PQ               None            default                                  
    1     WFQ(10)          None            wred1                                    
    2     PQ               None            default                                  
    3     WFQ(20)          None            wred1                                    
    4     PQ               None            default                                  
    5     PQ               None            wred1                                    
    6     PQ               None            default                                  
    7     PQ               None            default                                  
    ----------------------------------------------------------------------- 

    # Check traffic statistics on subscriber queues.

    <Switch> display traffic-user-queue statistics interface gigabitethernet 2/0/1 outbound acl 4001 
    --------------------------------------------------------------------------------
     Interface: GigabitEthernet2/0/1                                                
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             0         |          packets: pass:                       4,127                                                            
                       |                   drop:               2,798,787,076                                                            
                       |          bytes:   pass:                     610,796                                                            
                       |                   drop:             414,220,487,248                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             1         |          packets: pass:                       4,127                                                            
                       |                   drop:               5,597,436,717                                                            
                       |          bytes:   pass:                     610,796                                                            
                       |                   drop:             828,420,634,116                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             2         |          packets: pass:                           0                                                            
                       |                   drop:                           0                                                            
                       |          bytes:   pass:                           0                                                            
                       |                   drop:                           0                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             3         |          packets: pass:                       4,127                                                            
                       |                   drop:               5,597,436,713                                                            
                       |          bytes:   pass:                     610,796                                                            
                       |                   drop:             828,420,633,524                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             4         |          packets: pass:                       4,127                                                            
                       |                   drop:               2,798,716,293                                                            
                       |          bytes:   pass:                     610,796                                                            
                       |                   drop:             414,210,011,364                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             5         |          packets: pass:                       4,127                                                            
                       |                   drop:               2,798,716,294                                                            
                       |          bytes:   pass:                     610,796                                                            
                       |                   drop:             414,210,011,512                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             6         |          packets: pass:                           0                                                            
                       |                   drop:                           0                                                            
                       |          bytes:   pass:                           0                                                            
                       |                   drop:                           0                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             7         |          packets: pass:               1,119,509,460                                                            
                       |                   drop:               1,679,210,961                                                            
                       |          bytes:   pass:             165,687,400,080                                                            
                       |                   drop:             248,523,222,228                                                            
    --------------------------------------------------------------------------------                                                    
    
    <Switch> display traffic-user-queue statistics interface gigabitethernet 2/0/1 outbound acl 4002 
    --------------------------------------------------------------------------------
     Interface: GigabitEthernet2/0/1                                                
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             0         |          packets: pass:                       4,125                                                            
                       |                   drop:                   5,218,026                                                            
                       |          bytes:   pass:                     610,500                                                            
                       |                   drop:                 772,267,848                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             1         |          packets: pass:                       4,125                                                            
                       |                   drop:                  10,440,178                                                            
                       |          bytes:   pass:                     610,500                                                            
                       |                   drop:               1,545,146,344                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             2         |          packets: pass:                           0                                                            
                       |                   drop:                           0                                                            
                       |          bytes:   pass:                           0                                                            
                       |                   drop:                           0                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             3         |          packets: pass:                       4,125                                                            
                       |                   drop:                  10,440,178                                                            
                       |          bytes:   pass:                     610,500                                                            
                       |                   drop:               1,545,146,344                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             4         |          packets: pass:                       4,125                                                            
                       |                   drop:                   5,218,027                                                            
                       |          bytes:   pass:                     610,500                                                            
                       |                   drop:                 772,267,996                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             5         |          packets: pass:                       4,125                                                            
                       |                   drop:                   5,218,027                                                            
                       |          bytes:   pass:                     610,500                                                            
                       |                   drop:                 772,267,996                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             6         |          packets: pass:                           0                                                            
                       |                   drop:                           0                                                            
                       |          bytes:   pass:                           0                                                            
                       |                   drop:                           0                                                            
    --------------------------------------------------------------------------------                                                    
         Queue ID      |                   Statistics information                                                                       
    --------------------------------------------------------------------------------                                                    
             7         |          packets: pass:                   2,092,988                                                            
                       |                   drop:                   3,129,165                                                            
                       |          bytes:   pass:                 309,762,224                                                            
                       |                   drop:                 463,116,420                                                            
    --------------------------------------------------------------------------------

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #                                                                               
    vlan batch 10                                                                   
    #                                                                               
    interface GigabitEthernet1/0/1                                                  
     port link-type access                                                          
     port default vlan 10                                                           
    #                                                                               
    interface GigabitEthernet1/0/2                                                  
     port link-type access                                                          
     port default vlan 10                                                           
    #                                                                               
    interface GigabitEthernet2/0/1                                                  
     port link-type trunk                                                           
     port trunk allow-pass vlan 10                                                  
    #                                                                                
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #                                                                               
    vlan batch 20                                                                   
    #                                                                               
    interface GigabitEthernet1/0/1                                                  
     port link-type access                                                          
     port default vlan 20                                                           
    #                                                                               
    interface GigabitEthernet1/0/2                                                  
     port link-type access                                                          
     port default vlan 20                                                           
    #                                                                               
    interface GigabitEthernet2/0/1                                                  
     port link-type trunk                                                           
     port trunk allow-pass vlan 20                                                  
    #                                                                               
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #                                                                               
    vlan batch 10 20                                                                   
    #                                                                               
    interface GigabitEthernet1/0/1                                                  
     port link-type trunk                                                           
     port trunk allow-pass vlan 10 20                                               
    #                                                                               
    interface GigabitEthernet2/0/1                                                  
     port link-type trunk                                                           
     port trunk allow-pass vlan 10 20                                               
    # 
    return
  • Switch configuration file

    #
    sysname Switch
    #
    vlan batch 10 20
    #
    diffserv domain ds1
     8021p-inbound 2 phb af1 red
     8021p-inbound 5 phb af3 yellow
     8021p-inbound 6 phb ef green
    #
    acl number 4001  
     rule 1 permit vlan-id 10
    acl number 4002  
     rule 1 permit vlan-id 20
    #
    flow-wred-profile wred1
     color green low-limit 80 high-limit 100 discard-percentage 10
     color yellow low-limit 60 high-limit 80 discard-percentage 20
     color red low-limit 40 high-limit 60 discard-percentage 40
    #
    flow-queue-profile flow1
     qos queue 1 wfq weight 10 flow-wred-profile wred1
     qos queue 3 wfq weight 20 flow-wred-profile wred1
     qos queue 5 flow-wred-profile wred1              
    #
    interface GigabitEthernet1/0/1                                                  
     port link-type trunk                                                           
     port trunk allow-pass vlan 10                                                  
     trust upstream ds1                                                             
     trust 8021p inner                                                              
    #
    interface GigabitEthernet1/0/2                                                  
     port link-type trunk                                                           
     port trunk allow-pass vlan 20                                                  
     trust upstream ds1                                                             
     trust 8021p inner                                                              
    #                                                                               
    interface GigabitEthernet2/0/1                                                  
     port link-type trunk                                                           
     port trunk allow-pass vlan 10 20                                               
     traffic-user-queue outbound acl 4001 pir 8000 flow-queue-profile flow1
     traffic-user-queue outbound acl 4002 pir 5000 flow-queue-profile flow1
    #                                                                               
    return
Translation
Download
Updated: 2019-04-08

Document ID: EDOC1100065653

Views: 18169

Downloads: 45

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