< Home

Example for Configuring Priority Re-marking and Queue Scheduling

Overview

The device allocates or modifies priorities of received buckets based on rules, and schedules services based on allocated or modified priorities.

Priority re-marking enables the device to re-mark packet priorities. You can manually set or modify packet priorities to control packet scheduling and improve packet forwarding capability of the device.

Configuration Notes

For applicable product models and versions, see Applicable Product Models and Versions.

For details about software mappings, visit Hardware Query Tool and search for the desired product model.

Networking Requirements

In Figure 1, a company has three services: data query, email processing, and file transfer. The three services have different priorities. When HostA and HostB access servers of the three services, the services must be processed in descending order of priority. Priority re-marking and queue scheduling can achieve this.

Figure 1 Networking of priority re-marking and queue scheduling

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure traffic classifiers to classify packets based on servers' IP addresses.
  2. Configure traffic behaviors and define priority re-marking.
  3. Configure a traffic policy and bind the traffic policy to the traffic classifiers and traffic behaviors, and apply the traffic policy to GE1/0/1 in the inbound direction to re-mark priorities of incoming packets.
  4. Configure PQ on GE1/0/2 to schedule packets in descending order of priority.

Procedure

  1. Configure ACLs to classify packets based on servers' IP addresses.

    # Configure advanced ACL 3001 to classify packets with the destination IP address of 192.168.1.10.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] acl 3001
    [SwitchA-acl-adv-3001] rule permit ip destination 192.168.1.10 0.0.0.0
    [SwitchA-acl-adv-3001] quit

    # Configure advanced ACL 3002 to classify packets with the destination IP address of 192.168.1.11.

    [SwitchA] acl 3002
    [SwitchA-acl-adv-3002] rule permit ip destination 192.168.1.11 0.0.0.0
    [SwitchA-acl-adv-3002] quit

    # Configure advanced ACL 3003 to classify packets with the destination IP address of 192.168.1.12.

    [SwitchA] acl 3003
    [SwitchA-acl-adv-3003] rule permit ip destination 192.168.1.12 0.0.0.0
    [SwitchA-acl-adv-3003] quit

  2. Configure traffic classifiers to classify packets based on destination IP addresses.

    # Configure a traffic classifier named dbserver to match packets with the destination IP address of 192.168.1.10.

    [SwitchA] traffic classifier dbserver operator and
    [SwitchA-classifier-dbserver] if-match acl 3001  //Configure the device to match packets with the destination IP address of 192.168.1.10.
    [SwitchA-classifier-dbserver] quit

    # Configure a traffic classifier named mailserver to match packets with the destination IP address of 192.168.1.11.

    [SwitchA] traffic classifier mailserver operator and
    [SwitchA-classifier-mailserver] if-match acl 3002  //Configure the device to match packets with the destination IP address of 192.168.1.11.
    [SwitchA-classifier-mailserver] quit

    # Configure a traffic classifier named ftpserver to match packets with the destination IP address of 192.168.1.12.

    [SwitchA] traffic classifier ftpserver operator and
    [SwitchA-classifier-ftpserver] if-match acl 3003  //Configure the device to match packets with the destination IP address of 192.168.1.12.
    [SwitchA-classifier-ftpserver] quit

  3. Configure traffic behaviors and define priority re-marking.

    # Configure a traffic behavior named dbserver to re-mark packets destined for 192.168.1.10 with 4.

    [SwitchA] traffic behavior dbserver
    [SwitchA-behavior-dbserver] remark local-precedence 4  //Configure the device to re-mark the local priority of packets destined for 192.168.1.10 with 4.
    [SwitchA-behavior-dbserver] quit

    # Configure a traffic behavior named mailserver to re-mark packets destined for 192.168.1.11 with 3.

    [SwitchA] traffic behavior mailserver
    [SwitchA-behavior-mailserver] remark local-precedence 3  //Configure the device to re-mark the local priority of packets destined for 192.168.1.11 with 3.
    [SwitchA-behavior-mailserver] quit

    # Configure a traffic behavior named ftpserver to re-mark packets destined for 192.168.1.12 with 2.

    [SwitchA] traffic behavior ftpserver
    [SwitchA-behavior-ftpserver] remark local-precedence 2  //Configure the device to re-mark the local priority of packets destined for 192.168.1.12 with 2.
    [SwitchA-behavior-ftpserver] quit

  4. Configure a traffic policy and bind the traffic classifiers and traffic behaviors to the traffic policy.

    [SwitchA] traffic policy policy1
    [SwitchA-trafficpolicy-policy1] classifier dbserver behavior dbserver
    [SwitchA-trafficpolicy-policy1] classifier mailserver behavior mailserver
    [SwitchA-trafficpolicy-policy1] classifier ftpserver behavior ftpserver
    [SwitchA-trafficpolicy-policy1] quit

  5. Apply the traffic policy to GE1/0/1 to re-mark priorities of incoming packets.

    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] traffic-policy policy1 inbound  //Apply the traffic policy in the inbound direction.
    [SwitchA-GigabitEthernet1/0/1] quit

  6. Configure PQ on GE1/0/2 to schedule packets in descending order of priority.

    • On the S2700-52P-EI, S2700-52P-PWR-EI, S2710-SI, S3700-EI, S3700-HI, S3700-SI, S5700-EI, S5700-HI, S5710-EI, S5710-HI, S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735S-S, S5735-S-I, S6700-EI, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, S6730S-S, S7700, and S9700, perform the following configurations.

      [SwitchA] interface gigabitethernet 1/0/2
      [SwitchA-GigabitEthernet1/0/2] qos pq  //Configure PQ scheduling on the interface. In PQ mode, the device first schedules high-priority packets.
      [SwitchA-GigabitEthernet1/0/2] quit

      This example uses a configuration file containing the qos pq command on a fixed switch as an example. On a modular switch, an interface queue uses PQ by default, and the qos pq command is not contained in the configuration file.

    • On the S2720-EI, S2750-EI, S5700-LI, S5700S-LI, S5700-SI, S5710-C-LI, S5710-X-LI, S5720I-SI, S5720-LI, S5720S-LI, S5720S-SI, S5720-SI, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI, perform the following configurations.
      [SwitchA] qos schedule-profile pqtemplate  //Create a scheduling profile.
      [SwitchA-qos-schedule-profile-pqtemplate] qos pq  //Configure PQ scheduling.
      [SwitchA-qos-schedule-profile-pqtemplate] quit
      [SwitchA] interface gigabitethernet 1/0/2
      [SwitchA-GigabitEthernet1/0/2] qos schedule-profile pqtemplate  //Apply the scheduling profile to the interface.
      [SwitchA-GigabitEthernet1/0/2] quit

  7. Verify the configuration.

    # Check the traffic policy configuration.

    [SwitchA] display traffic policy user-defined
      User Defined Traffic Policy Information:
      Policy: policy1
       Classifier: dbserver
        Operator: AND
         Behavior: dbserver
          Remark:                                    
            Remark local-precedence af4
       Classifier: mailserver
        Operator: AND
         Behavior: mailserver
          Remark:                                    
            Remark local-precedence af3
       Classifier: ftpserver
        Operator: AND
         Behavior: ftpserver
          Remark:                                    
            Remark local-precedence af2
    
    Total policy number is 1                                         
    

    # Check the traffic policy record. The traffic policy has been successfully applied to GE1/0/1.

    [SwitchA] display traffic-policy applied-record policy1
    -------------------------------------------------
      Policy Name:   policy1 
      Policy Index:  0
         Classifier:dbserver     Behavior:dbserver 
         Classifier:mailserver     Behavior:mailserver 
         Classifier:ftpserver     Behavior:ftpserver 
    -------------------------------------------------
     *interface GigabitEthernet1/0/1
        traffic-policy policy1 inbound  
          slot 1    :  success
    -------------------------------------------------
      Policy total applied times: 1.
    

Configuration Files

  • SwitchA configuration file (applicable to the S2700-52P-EI, S2700-52P-PWR-EI, S2710-SI, S3700-EI, S3700-HI, S3700-SI, S5700-EI, S5700-HI, S5710-EI, S5710-HI, S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735S-S, S5735-S-I, S6700-EI, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, S6730S-S, S7700, and S9700)
    #
    sysname SwitchA
    #
    acl number 3001
     rule 5 permit ip destination 192.168.1.10 0
    acl number 3002
     rule 5 permit ip destination 192.168.1.11 0
    acl number 3003
     rule 5 permit ip destination 192.168.1.12 0
    #
    traffic classifier dbserver operator and
     if-match acl 3001
    traffic classifier ftpserver operator and
     if-match acl 3003
    traffic classifier mailserver operator and
     if-match acl 3002
    #
    traffic behavior dbserver
     remark local-precedence af4
    traffic behavior ftpserver
     remark local-precedence af2
    traffic behavior mailserver
     remark local-precedence af3
    #
    traffic policy policy1 match-order config
     classifier dbserver behavior dbserver
     classifier mailserver behavior mailserver
     classifier ftpserver behavior ftpserver
    #
    interface GigabitEthernet1/0/1
     traffic-policy policy1 inbound
    #
    interface GigabitEthernet1/0/2
     qos pq
    #
    return
    
  • SwitchA configuration file (applicable to the S2720-EI, S2750-EI, S5700-LI, S5700S-LI, S5700-SI, S5710-C-LI, S5710-X-LI, S5720I-SI, S5720-LI, S5720S-LI, S5720S-SI, S5720-SI, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI)

    #
    sysname SwitchA
    #
    acl number 3001
     rule 5 permit ip destination 192.168.1.10 0
    acl number 3002
     rule 5 permit ip destination 192.168.1.11 0
    acl number 3003
     rule 5 permit ip destination 192.168.1.12 0
    #
    traffic classifier dbserver operator and
     if-match acl 3001
    traffic classifier ftpserver operator and
     if-match acl 3003
    traffic classifier mailserver operator and
     if-match acl 3002
    #
    traffic behavior dbserver
     remark local-precedence af4
    traffic behavior ftpserver
     remark local-precedence af2
    traffic behavior mailserver
     remark local-precedence af3
    #
    traffic policy policy1
     classifier dbserver behavior dbserver
     classifier mailserver behavior mailserver
     classifier ftpserver behavior ftpserver
    #
    interface GigabitEthernet1/0/1
     traffic-policy policy1 inbound
    #
    interface GigabitEthernet1/0/2
     qos schedule-profile pqtemplate
    #
    qos schedule-profile pqtemplate
     qos pq
    #
    return
    

Applicable Product Models and Versions

Table 1 Applicable product models and versions

Product

Product Model

Software Version

S2700

S2752EI

V100R006C05

S2710-SI

V100R006C05

S2720-EI

V200R006C10, V200R009C00, V200R010C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S2750-EI

V200R003C00, V200R005C00SPC300, V200R006C00, V200R007C00, V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00

S3700

S3700-SI, S3700-EI

V100R006C05

S3700-HI

V200R001C00

S5700

S5700-LI

V200R001C00, V200R002C00, V200R003(C00&C02&C10), V200R005C00SPC300, V200R006C00, V200R007C00, V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00

S5700S-LI

V200R001C00, V200R002C00, V200R003C00, V200R005C00SPC300, V200R006C00, V200R007C00, V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00

S5700-SI

V200R001C00, V200R002C00, V200R003C00, V200R005C00

S5700-EI

V200R001(C00&C01), V200R002C00, V200R003C00, V200R005(C00&C01&C02&C03)

S5700-HI

V200R001(C00&C01), V200R002C00, V200R003C00, V200R005(C00SPC500&C01&C02)

S5710-C-LI

V200R001C00

S5710-X-LI

V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00

S5710-EI

V200R001C00, V200R002C00, V200R003C00, V200R005(C00&C02)

S5710-HI

V200R003C00, V200R005(C00&C02&C03)

S5720-LI, S5720S-LI

V200R010C00, V200R011C00, V200R011C10, V200R012(C00&C20), V200R013C00, V200R019C00, V200R019C10

S5720-SI, S5720S-SI

V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S5720I-SI

V200R012C00, V200R013C00, V200R019C00, V200R019C10

S5720-EI

V200R007C00, V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S5720-HI

V200R006C00, V200R007(C00&C10), V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S5730-HI

V200R012C00, V200R013C00, V200R019C00, V200R019C10

S5730-SI

V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S5730S-EI

V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S5731-H

V200R013C02, V200R019C00, V200R019C10

S5731-S, S5731S-S

V200R019C00, V200R019C10

S5731S-H

V200R019C00, V200R019C10

S5732-H

V200R019C00, V200R019C10

S5735-L, S5735S-L

V200R019C00, V200R019C10

S5735S-L-M

V200R019C00, V200R019C10

S5735-S, S5735S-S

V200R019C00, V200R019C10

S5700

S5735-S-I

V200R019C10

S6700

S6700-EI

V200R001(C00&C01), V200R002C00, V200R003C00, V200R005(C00&C01&C02)

S6720-LI, S6720S-LI

V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S6720-SI, S6720S-SI

V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S6720-EI

V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S6720S-EI

V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10

S6720-HI

V200R012C00, V200R013C00, V200R019C00, V200R019C10

S6730-H

V200R013C02, V200R019C00, V200R019C10

S6730-S, S6730S-S

V200R019C00, V200R019C10

S6730S-H

V200R019C10

S7700

S7703, S7706, S7712

V200R001(C00&C01), V200R002C00, V200R003C00, V200R005C00, V200R006C00, V200R007C00, V200R008C00, V200R009C00, V200R010C00, V200R011C10, V200R012C00, V200R013C00, V200R013C02, V200R019C00, V200R019C10

S7703 PoE

V200R013C00, V200R019C00, V200R019C10

S7706 PoE

V200R013C00, V200R019C00, V200R019C10

S9700

S9703, S9706, S9712

V200R001(C00&C01), V200R002C00, V200R003C00, V200R005C00, V200R006C00, V200R007(C00&C10), V200R008C00, V200R009C00, V200R010C00, V200R011C10, V200R012C00, V200R013C00

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >