Example for Configuring HQoS Based on Flow Queues in Enhanced 8-CoS Mode

This section provides an example for configuring and applying a QoS profile in enhanced 8-CoS mode to an interface.

Networking Requirements

As shown in the following figure, user 1 and user 2 access PE1's interface 1 and interface 2 respectively, and parameters are configured for a flow queue profile in enhanced 8-CoS mode. You can enable the re-marking function for a queue (for example, CoS 5 queue) to differentiate and mark the CIR and PIR traffic of the queue, and map the traffic to the corresponding drop eligible indicators (DEIs). As shown in the following figure, the DEIs for the CIR and PIR traffic on PE1 are 0 and 1, respectively. The DEIs generated on PE1 is sent to the downstream P along with packets. The P can identify the drop priority of the packets through the DEIs. Parameters are also configured for a flow queue profile in enhanced 8-CoS mode on the P, which marks colors for the packets based on the DEIs contained in them. If the DEI is 1, the internal drop priority (color) of the packets is marked as yellow; if the DEI is 0, the packets are marked green and can be transmitted preferentially. The P then re-queues the packets based on the priority and scheduling weight of each queue as well as the priority of the packets.

Interfaces 1 through 5 in this example represent GE 0/1/0, GE 0/1/8, GE 0/1/16, GE 0/1/3, and GE 0/1/4, respectively.

Figure 1 Network diagram of configuring HQoS based on flow queues in enhanced 8-CoS mode

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure the number of SQ resources in enhanced 8-CoS mode.

  2. Configure parameters for a flow queue profile in enhanced 8-CoS mode, and enable the re-marking function.

  3. Configure a user queue profile in enhanced 8-CoS mode and user bandwidth.

  4. Configure a QoS profile in enhanced 8-CoS mode.

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

  6. Apply the QoS profile to an interface.

Data Preparation

To complete the configuration, you need the following data:

  • Number of SQ resources in enhanced 8-CoS mode

  • CIR and PIR values of the flow queue in the QoS profile

  • CIR and PIR values of the user queue in the QoS profile

  • Parameters for the flow queue WRED drop profile

Procedure

  • Configure PE1.
    1. Configure the numbers of upstream and downstream SQ resources in enhanced 8-CoS mode.

      <HUAWEI> system-view
      [~HUAWEI] slot 3
      [~HUAWEI-slot-3] qos user-queue resource 8cos-enhance 1000 inbound
      [*HUAWEI-slot-3] qos user-queue resource 8cos-enhance 1000 outbound
      [*HUAWEI-slot-3] commit
      [~HUAWEI-slot-3] quit

    2. Create a flow queue profile named qos1 in enhanced 8-CoS mode, and configure the PIR, CIR, and re-marking function for the CoS 5 queue.

      [~HUAWEI] flow-queue qos1 8cos-enhance-mode
      [*HUAWEI-flow-queue-template-qos1] cos 5
      [*HUAWEI-flow-queue-template-qos1-cos5] remark-color enable
      [*HUAWEI-flow-queue-template-qos1-cos5] pir 20000 cir 20000
      [*HUAWEI-flow-queue-template-qos1-cos5] commit
      [~HUAWEI-flow-queue-template-qos1-cos5] quit
      [~HUAWEI-flow-queue-template-qos1] quit

      Create a flow queue profile named qos2 in enhanced 8-CoS mode, and configure the PIR, CIR, and re-marking function for the CoS 5 queue.

      [~HUAWEI] flow-queue qos2 8cos-enhance-mode
      [*HUAWEI-flow-queue-template-qos2] cos 5
      [*HUAWEI-flow-queue-template-qos2-cos5] remark-color enable
      [*HUAWEI-flow-queue-template-qos2-cos5] pir 200000 cir 100000
      [*HUAWEI-flow-queue-template-qos2-cos5] commit
      [~HUAWEI-flow-queue-template-qos2-cos5] quit
      [~HUAWEI-flow-queue-template-qos2] quit

      After the configuration is complete, run the display flow-queue configuration command. The following command output shows the configuration of the flow queue profile named qos1 in enhanced 8-CoS mode.

      [~HUAWEI] display flow-queue configuration verbose qos1
      Codes: Cos(Priority of queue's)                                                 
             CIR-PCT(The percentage of committed information rate)                    
             CIR-P(The priority schedule of cir)                                      
             CIR-W(Schedule weight of cir)                                            
             PIR-PCT(The percentage of peak information rate)                         
             PIR-P(The priority schedule of pir)                                      
             PIR-W(Schedule weight of pir)                                            
             Drop-Arith(The name of the WRED object used by the flow queue)           
      
      
      Flow Queue Template : qos1                                         mode: 8cos-enhance-mode                                                                     
      -------------------------------------------------------------------------------------------                                                                     
      Cos CIR/CIR-PCT/CBS/CIR-P/CIR-W    PIR/PIR-PCT/PBS/PIR-P/PIR-W  CAR-MODE Remark Drop-Arith                                                                     
      -------------------------------------------------------------------------------------------                                                                     
      0   -/-/-/1/10                    -/-/-/3/10                    0        0       Tail Drop                                                                      
      1   -/-/-/1/10                    -/-/-/3/10                    0        0       Tail Drop                                                                      
      2   -/-/-/1/10                    -/-/-/3/10                    0        0       Tail Drop                                                                      
      3   -/-/-/1/15                    -/-/-/3/15                    0        0       Tail Drop                                                                      
      4   -/-/-/1/15                    -/-/-/3/15                    0        0       Tail Drop                                                                      
      5   20000/-/-/0/20                20000/-/-/2/20                0        1       Tail Drop                                                                      
      6   -/-/-/0/20                    -/-/-/2/20                    0        0       Tail Drop                                                                      
      7   -/-/-/0/20                    -/-/-/2/20                    0        0       Tail Drop                                                                      
      Reference relationships : NULL 

    3. Create a user queue profile named qos in enhanced 8-CoS mode, and configure the PIR and CIR for user queues as well as other scheduling parameters.

      [~HUAWEI] user-queue qos
      [*HUAWEI-user-queue-template-qos] pir 800000 cir 400000
      [*HUAWEI-user-queue-template-qos] priority 0 cir-parent-priority 0 pir-parent-priority 3
      [*HUAWEI-user-queue-template-qos] priority 0 pir 800000
      [*HUAWEI-user-queue-template-qos] commit
      [~HUAWEI-user-queue-template-qos] quit

    4. Create a QoS profile named qos1 in enhanced 8-CoS mode.

      [~HUAWEI] qos-profile qos1 8cos-enhance-mode
      [*HUAWEI-qos-profile-qos1-8cos-enhance] user-queue qos flow-queue qos1
      [*HUAWEI-qos-profile-qos1-8cos-enhance] commit
      [~HUAWEI-qos-profile-qos1-8cos-enhance] quit

      Create a QoS profile named qos2 in enhanced 8-CoS mode.

      [~HUAWEI] qos-profile qos2 8cos-enhance-mode
      [*HUAWEI-qos-profile-qos2-8cos-enhance] user-queue qos flow-queue qos2
      [*HUAWEI-qos-profile-qos2-8cos-enhance] commit
      [~HUAWEI-qos-profile-qos2-8cos-enhance] quit
      After the configuration is complete, run the display qos-profile configuration command. The following command output shows the configuration of the QoS profile named qos1 in enhanced 8-CoS mode.
      [~HUAWEI] display qos-profile configuration qos1 
      qos-profile: qos1    mode: 8cos-enhance-mode                                    
       inbound:                                                                       
       outbound:                                                                      
       both:                                                                          
       flow-queue: qos1                                                               
       user-queue: qos                                                                
       user-group-queue: -                                                            
       --------------------------------------------------------------                 
       service-template: -                                                            
       CIR(kbps)/CIR-PCT/CBS(bytes): 400000/-/-                                       
       PIR(kbps)/PIR-PCT/PBS(bytes): 800000/-/-                                       
       --------------------------------------------------------------                 
       PRI SCH-MODE  PIR         PBS         CIR-P/CIR-W  PIR-P/PIR-W                 
       --------------------------------------------------------------                 
       0   pq        800000      -           0/10         3/10                        
       1   wfq       -           -           1/10         3/10                        
       2   pq        -           -           2/10         3/10                        
       3   wfq       -           -           3/10         3/10    

    5. Apply the QoS profile to the inbound interfaces GE 0/1/0.1 and GE 0/1/8.1 on PE1.

      [~HUAWEI] interface gigabitethernet 0/1/0.1
      [*HUAWEI-GigabitEthernet0/1/0.1] vlan-type dot1q 1
      [*HUAWEI-GigabitEthernet0/1/0.1] ip address 10.192.168.1 24
      [*HUAWEI-GigabitEthernet0/1/0.1] trust upstream default
      [*HUAWEI-GigabitEthernet0/1/0.1] trust 8021p
      [*HUAWEI-GigabitEthernet0/1/0.1] qos-profile qos1 inbound identifier none
      [*HUAWEI-GigabitEthernet0/1/0.1] commit
      [~HUAWEI-GigabitEthernet0/1/0.1] quit
      [~HUAWEI] interface gigabitethernet 0/1/8.1
      [*HUAWEI-GigabitEthernet0/1/8.1] vlan-type dot1q 2
      [*HUAWEI-GigabitEthernet0/1/8.1] ip address 10.2.1.1 24
      [*HUAWEI-GigabitEthernet0/1/8.1] trust upstream default
      [*HUAWEI-GigabitEthernet0/1/8.1] trust 8021p
      [*HUAWEI-GigabitEthernet0/1/8.1] qos-profile qos2 inbound identifier none
      [*HUAWEI-GigabitEthernet0/1/8.1] commit
      [~HUAWEI-GigabitEthernet0/1/8.1] quit

      Enable the DEI capability for packets on the outbound interface GE 0/1/16.1 on PE1.

      [~HUAWEI] mpls
      [*HUAWEI-mpls] mpls ldp
      [*HUAWEI-mpls-ldp] commit
      [~HUAWEI-mpls-ldp] quit
      [~HUAWEI] interface gigabitethernet 0/1/16.1
      [*HUAWEI-GigabitEthernet0/1/16.1] vlan-type dot1q 11
      [*HUAWEI-GigabitEthernet0/1/16.1] ip address 10.192.167.2 24
      [*HUAWEI-GigabitEthernet0/1/16.1] trust upstream default
      [*HUAWEI-GigabitEthernet0/1/16.1] mpls
      [*HUAWEI-GigabitEthernet0/1/16.1] mpls ldp
      [*HUAWEI-GigabitEthernet0/1/16.1] trust 8021p
      [*HUAWEI-GigabitEthernet0/1/16.1] field dei enable
      [*HUAWEI-GigabitEthernet0/1/16.1] commit
      [~HUAWEI-GigabitEthernet0/1/16.1] quit

      After the configuration is complete, run the display qos-profile application profile-name command. The following command output shows the application information of the QoS profile named qos2.

      [~HUAWEI] display qos-profile application qos2
      qos-profile qos2:                                                               
        GigabitEthernet0/1/8.1                                                                  
      Reference number by access user:[inbound] 0, [outbound] 0                       
      Reference number by VNI:[inbound] 0, [outbound] 0 

  • Configure the P.
    1. Configure the numbers of upstream and downstream SQ resources in enhanced 8-CoS mode.

      <HUAWEI> system-view
      [~HUAWEI] slot 3
      [~HUAWEI-slot-3] qos user-queue resource 8cos-enhance 1000 inbound
      [*HUAWEI-slot-3] qos user-queue resource 8cos-enhance 1000 outbound
      [*HUAWEI-slot-3] commit
      [~HUAWEI-slot-3] quit

    2. Create a flow queue WRED drop profile named network and configure parameters for the profile.

      [~HUAWEI] flow-wred network
      [*HUAWEI-flow-wred-network] color yellow low-limit 50 high-limit 50 discard-percentage 100
      [*HUAWEI-flow-wred-network] commit
      [~HUAWEI-flow-wred-network] quit
      After the configuration is complete, run the display flow-wred configuration command. The command output shows the parameters configured for the flow queue WRED drop profile, including the upper and lower drop thresholds (in percentage) and drop probability of each packet with a different priority as well as reference relationships of the flow queue WRED drop profile.
      [~HUAWEI] display flow-wred configuration verbose network
      Flow wred name : network                                                        
      ---------------------------------------------------                             
      Color    Low-limit    High-limit    Discard-percent                             
      ---------------------------------------------------                             
      green    100          100           100                                         
      yellow   50           50            100                                         
      red      100          100           100                                         
      Queue Depth(kbytes) : 1000                                                      
      Reference relationships : NULL

    3. Create a flow queue profile named network in enhanced 8-CoS mode, and configure the PIR, CIR, and flow queue WRED drop profile for the CoS 5 queue.

      [~HUAWEI] flow-queue network 8cos-enhance-mode
      [*HUAWEI-flow-queue-template-network] cos 5
      [*HUAWEI-flow-queue-template-network-cos5] flow-wred network
      [*HUAWEI-flow-queue-template-network-cos5] pir 200000 cir 120000
      [*HUAWEI-flow-queue-template-network-cos5] commit
      [~HUAWEI-flow-queue-template-network-cos5] quit
      [~HUAWEI-flow-queue-template-network] quit

      After the configuration is complete, run the display flow-queue configuration verbose network command. The command output shows the configuration of the flow queue profile named network in enhanced 8-CoS mode.

      [~HUAWEI] display flow-queue configuration verbose network
      Codes: Cos(Priority of queue's)                                                 
             CIR-PCT(The percentage of committed information rate)                    
             CIR-P(The priority schedule of cir)                                      
             CIR-W(Schedule weight of cir)                                            
             PIR-PCT(The percentage of peak information rate)                         
             PIR-P(The priority schedule of pir)                                      
             PIR-W(Schedule weight of pir)                                            
             Drop-Arith(The name of the WRED object used by the flow queue)           
      
      
      Flow Queue Template : network                                     mode: 8cos-enhance-mode                                                                     
      -------------------------------------------------------------------------------------------                                                                     
      Cos CIR/CIR-PCT/CBS/CIR-P/CIR-W   PIR/PIR-PCT/PBS/PIR-P/PIR-W   CAR-MODE Remark Drop-Arith                                                                     
      -------------------------------------------------------------------------------------------                                                                     
      0   -/-/-/1/10                    -/-/-/3/10                    0        0       Tail Drop                                                                      
      1   -/-/-/1/10                    -/-/-/3/10                    0        0       Tail Drop                                                                      
      2   -/-/-/1/10                    -/-/-/3/10                    0        0       Tail Drop                                                                      
      3   -/-/-/1/15                    -/-/-/3/15                    0        0       Tail Drop                                                                      
      4   -/-/-/1/15                    -/-/-/3/15                    0        0       Tail Drop                                                                      
      5   120000/-/-/0/20               200000/-/-/2/20               0        0       network                                                                        
      6   -/-/-/0/20                    -/-/-/2/20                    0        0       Tail Drop                                                                      
      7   -/-/-/0/20                    -/-/-/2/20                    0        0       Tail Drop                                                                      
      Reference relationships : NULL

    4. Create a user queue profile named network in enhanced 8-CoS mode, and configure the PIR and CIR for user queues as well as other scheduling parameters.

      [~HUAWEI] user-queue network
      [*HUAWEI-user-queue-template-network] pir 8000000 cir 4000000
      [*HUAWEI-user-queue-template-network] priority 0 cir-parent-priority 0 pir-parent-priority 3
      [*HUAWEI-user-queue-template-network] priority 0 pir 800000
      [*HUAWEI-user-queue-template-network] commit
      [~HUAWEI-user-queue-template-network] quit

    5. Create a QoS profile named network in enhanced 8-CoS mode.

      [~HUAWEI] qos-profile network 8cos-enhance-mode
      [*HUAWEI-qos-profile-network-8cos-enhance] user-queue network flow-queue network
      [*HUAWEI-qos-profile-network-8cos-enhance] commit
      [~HUAWEI-qos-profile-network-8cos-enhance] quit

    6. Apply the QoS profile to the inbound interface GE 0/1/3.1 on the P.

      [~HUAWEI] mpls
      [~HUAWEI] mpls ldp
      [*HUAWEI] commit
      [~HUAWEI] interface gigabitethernet 0/1/3.1
      [*HUAWEI-GigabitEthernet0/1/3.1] vlan-type dot1q 11
      [*HUAWEI-GigabitEthernet0/1/3.1] ip address 10.192.167.3 24
      [*HUAWEI-GigabitEthernet0/1/3.1] trust upstream default
      [*HUAWEI-GigabitEthernet0/1/3.1] trust 8021p
      [*HUAWEI-GigabitEthernet0/1/3.1] mpls
      [*HUAWEI-GigabitEthernet0/1/3.1] mpls ldp
      [*HUAWEI-GigabitEthernet0/1/3.1] trust 8021p
      [*HUAWEI-GigabitEthernet0/1/3.1] field dei enable
      [*HUAWEI-GigabitEthernet0/1/3.1] commit
      [~HUAWEI-GigabitEthernet0/1/3.1] quit

      Apply the QoS profile to the outbound interface GE 0/1/4.1 on the P.

      [~HUAWEI] interface gigabitethernet 0/1/4.1
      [*HUAWEI-GigabitEthernet0/1/4.1] vlan-type dot1q 22
      [*HUAWEI-GigabitEthernet0/1/4.1] ip address 10.192.169.4 24
      [*HUAWEI-GigabitEthernet0/1/4.1] trust upstream default
      [*HUAWEI-GigabitEthernet0/1/4.1] mpls
      [*HUAWEI-GigabitEthernet0/1/4.1] mpls ldp
      [*HUAWEI-GigabitEthernet0/1/4.1] trust 8021p
      [*HUAWEI-GigabitEthernet0/1/4.1] qos-profile network outbound identifier none 
      [*HUAWEI-GigabitEthernet0/1/4.1] field dei enable
      [*HUAWEI-GigabitEthernet0/1/4.1] commit
      [~HUAWEI-GigabitEthernet0/1/4.1] quit

      After the configuration is complete, run the display qos-profile application profile-name command. The command output shows the configuration and application of the QoS profile.

      [~HUAWEI] display qos-profile application network
      qos-profile network:                                                               
        GigabitEthernet0/1/4.1
      Reference number by access user:[inbound] 0, [outbound] 0                       
      Reference number by VNI:[inbound] 0, [outbound] 0 

    7. Verify the configuration.

      Check QoS profile statistics on GE 0/1/4.1. The command output shows the rate limiting result of the CoS 5 queue.

      [~HUAWEI] display qos-profile statistics interface gigabitethernet 0/1/4.1 outbound
      GigabitEthernet0/1/4.1 outbound traffic statistics:                                       
      [COS0]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
        buffer size                     10496 kbytes
        used buffer size                0 kbytes
       [COS1]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
        buffer size                     10496 kbytes
        used buffer size                0 kbytes
       [COS2]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
        buffer size                     10496 kbytes
        used buffer size                0 kbytes
       [COS3]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
        buffer size                     10496 kbytes
        used buffer size                0 kbytes
       [COS4]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
        buffer size                     10496 kbytes
        used buffer size                0 kbytes
       [COS5]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
        buffer size                     2560 kbytes
        used buffer size                0 kbytes
       [COS6]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
        buffer size                     2560 kbytes
        used buffer size                0 kbytes
       [COS7]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
        buffer size                     2560 kbytes
        used buffer size                0 kbytes
       [total]
        Pass                            0 packets,                          0 bytes
        Discard                         0 packets,                          0 bytes
        Last 5 minutes pass rate
                                        0 pps,                              0 bps
        Last 5 minutes discard rate
                                        0 pps,                              0 bps
      Traffic towards this interface                                        0 bps
      Configured CIR and PIR
                                        400,000 kbps,                       800,000 kbps

Configuration Files

  • PE1 configuration

    slot 3
     qos user-queue resource 8cos-enhance 1000 inbound
     qos user-queue resource 8cos-enhance 1000 outbound
    #
    flow-queue qos1 8cos-enhance-mode
     cos 5
      remark-color enable
      pir 20000 cir 20000
    #
    flow-queue qos2 8cos-enhance-mode
     cos 5
      remark-color enable
      pir 200000 cir 100000
    #
    user-queue qos
     pir 800000 cir 400000
     priority 0 cir-parent-priority 0 pir-parent-priority 3
     priority 0 pir 800000
    #
    qos-profile qos1 8cos-enhance-mode
     user-queue qos flow-queue qos1
    #
    qos-profile qos2 8cos-enhance-mode
     user-queue qos flow-queue qos2
    #
     interface gigabitethernet 0/1/0.1
     vlan-type dot1q 1
     ip address 10.192.168.1 24
     trust upstream default
     trust 8021p
     qos-profile qos1 inbound identifier none 
    #
    interface gigabitethernet 0/1/8.1
     vlan-type dot1q 2
     ip address 10.2.1.1 24
     trust upstream default
     trust 8021p
     qos-profile qos2 inbound identifier none
    #
    mpls
     mpls ldp
    #
    interface gigabitethernet 0/1/16.1
     vlan-type dot1q 11
     ip address 10.192.167.2 24
     trust upstream default
     mpls
     mpls ldp
     trust 8021p
     field dei enable
    #
  • P configuration
    slot 3
     qos user-queue resource 8cos-enhance 1000 inbound
     qos user-queue resource 8cos-enhance 1000 outbound
    #
    flow-wred network
     color yellow low-limit 50 high-limit 50 discard-percentage 100
    #
    flow-queue network 8cos-enhance-mode
     cos 5
      flow-wred network
      pir 200000 cir 120000
    #
    user-queue network
     pir 8000000 cir 4000000
     priority 0 cir-parent-priority 0 pir-parent-priority 3
     priority 0 pir 800000
    #
    qos-profile network 8cos-enhance-mode
     user-queue network flow-queue network
    #
    mpls
     mpls ldp
    #
    interface gigabitethernet 0/1/3.1
     vlan-type dot1q 11
     ip address 10.192.167.3 24
     trust upstream default
     mpls
     mpls ldp
     trust 8021p
     field dei enable
    #
    interface gigabitethernet 0/1/4.1
     vlan-type dot1q 22
     ip address 10.192.169.4 24
     trust upstream default
     mpls
     mpls ldp
     trust 8021p
     qos-profile network outbound identifier none 
     field dei enable
    #
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >