No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - QoS

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

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, and ACL-based simplified traffic policy.
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 MQC to Implement Traffic Policing

Example for Configuring MQC to Implement Traffic Policing

Networking Requirements

As shown in Figure 5-11, Tenant 1, Tenant 2, and Tenant 3 are connected to SwitchA and the Switch and connect to the external network through the egress router. The servers of Tenant 1, Tenant 2, and Tenant 3 belong to VLAN 10, VLAN 20, and VLAN 30 respectively.

The rates of traffic from tenants must be limited within proper ranges on the Switch. Table 5-11 lists the required CIRs for the tenants.

Table 5-11 CIR values for upstream traffic from tenants

User

CIR (kbit/s)

Tenant 1

2000

Tenant 2

4000

Tenant 3

8000

Figure 5-11 Networking for configuring MQC to implement traffic policing

Configuration Roadmap

The configuration roadmap is as follows:
  1. Create VLANs and add interfaces on the Switch to respective VLANs to enable servers to connect to the external network.
  2. Configure traffic classifiers on the Switch to classify packets based on VLAN IDs.
  3. Configure traffic behaviors on the Switch to limit the rates of traffic from the servers.
  4. Configure a traffic policy on the Switch, associate the traffic behaviors with the traffic classifiers in the traffic policy, and apply the traffic policy to the inbound interface on the Switch.

Procedure

  1. Create VLANs and configure interfaces.

    # Create VLAN 10, VLAN 20, and VLAN 30 on SwitchA.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan batch 10 20 30
    [*SwitchA] commit
    

    # Configure 10GE1/0/4 on SwitchA as a trunk interface. Add 10GE1/0/1 to VLAN 10, 10GE1/0/2 to VLAN 20, 10GE1/0/3 to VLAN 30, and 10GE1/0/4 to VLAN 10, VLAN 20, and VLAN 30.

    [~SwitchA] interface 10ge 1/0/1
    [~SwitchA-10GE1/0/1] port default vlan 10
    [*SwitchA-10GE1/0/1] quit
    [*SwitchA] interface 10ge 1/0/2
    [*SwitchA-10GE1/0/2] port default vlan 20
    [*SwitchA-10GE1/0/2] quit
    [*SwitchA] interface 10ge 1/0/3
    [*SwitchA-10GE1/0/3] port default vlan 30
    [*SwitchA-10GE1/0/3] quit
    [*SwitchA] interface 10ge 1/0/4
    [*SwitchA-10GE1/0/4] port link-type trunk
    [*SwitchA-10GE1/0/4] port trunk allow-pass vlan 10 20 30
    [*SwitchA-10GE1/0/4] quit
    [*SwitchA] commit
    

    # Create VLANs 10, 20, and 30 on the Switch.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch
    [*HUAWEI] commit
    [~Switch] vlan batch 10 20 30
    [*Switch] commit
    

    # Configure 10GE1/0/1 and 10GE1/0/2 on the Switch as trunk interfaces. Add both 10GE1/0/1 and 10GE1/0/2 to VLAN 10, VLAN 20, and VLAN 30.

    [~Switch] interface 10ge 1/0/1
    [~Switch-10GE1/0/1] port link-type trunk
    [*Switch-10GE1/0/1] port trunk allow-pass vlan 10 20 30
    [*Switch-10GE1/0/1] quit
    [*Switch] commit
    [~Switch] interface 10ge 1/0/2
    [~Switch-10GE1/0/2] port link-type trunk
    [*Switch-10GE1/0/2] port trunk allow-pass vlan 10 20 30
    [*Switch-10GE1/0/2] quit
    [*Switch] commit
    

  2. Configure traffic classifiers.

    # Configure traffic classifiers c1, c2, and c3 on the Switch to classify service flows from the servers based on VLAN IDs.

    [~Switch] traffic classifier c1
    [*Switch-classifier-c1] if-match vlan 10
    [*Switch-classifier-c1] quit
    [*Switch] traffic classifier c2
    [*Switch-classifier-c2] if-match vlan 20
    [*Switch-classifier-c2] quit
    [*Switch] traffic classifier c3
    [*Switch-classifier-c3] if-match vlan 30
    [*Switch-classifier-c3] quit
    [*Switch] commit
    

  3. Configure traffic behaviors.

    # Create traffic behaviors b1, b2, and b3 on the Switch to limit the rates of service flows.

    [~Switch] traffic behavior b1
    [*Switch-behavior-b1] car cir 2000
    [*Switch-behavior-b1] statistics enable
    [*Switch-behavior-b1] quit
    [*Switch] traffic behavior b2
    [*Switch-behavior-b2] car cir 4000
    [*Switch-behavior-b2] statistics enable
    [*Switch-behavior-b2] quit
    [*Switch] traffic behavior b3
    [*Switch-behavior-b3] car cir 8000
    [*Switch-behavior-b3] statistics enable
    [*Switch-behavior-b3] quit
    [*Switch] commit
    

  4. Configure a traffic policy and apply it to the inbound interface.

    # Create a traffic policy p1 on the Switch, associate the traffic behaviors with traffic classifiers in the traffic policy, and apply the traffic policy to the inbound direction on 10GE1/0/1.

    [~Switch] traffic policy p1
    [*Switch-trafficpolicy-p1] classifier c1 behavior b1
    [*Switch-trafficpolicy-p1] classifier c2 behavior b2
    [*Switch-trafficpolicy-p1] classifier c3 behavior b3
    [*Switch-trafficpolicy-p1] quit
    [*Switch] interface 10ge 1/0/1
    [*Switch-10GE1/0/1] traffic-policy p1 inbound
    [*Switch-10GE1/0/1] quit
    [*Switch] commit
    

  5. Verify the configuration.

    # View the traffic classifier configuration.

    [~Switch] display traffic classifier
      Traffic Classifier Information: 
        Classifier: c1
          Type: OR
          Rule(s):
            if-match vlan 10
    
        Classifier: c2
          Type: OR
          Rule(s):
            if-match vlan 20
    
        Classifier: c3
          Type: OR
          Rule(s):
            if-match vlan 30
    
    Total classifier number is 3

    # View the traffic policy configuration.

    [~Switch] display traffic policy p1
      Traffic Policy Information:
        Policy: p1
          Classifier: c1
            Type: OR
          Behavior: b1
            Committed Access Rate:
              CIR 2000 (Kbps), PIR 2000 (Kbps), CBS 250000 (Bytes), PBS 250000 (Bytes)
              Color Mode: color blind
              Conform Action: pass
              Yellow  Action: pass
              Exceed  Action: discard
            Statistics: enable
    
          Classifier: c2
            Type: OR
          Behavior: b2
            Committed Access Rate:
              CIR 4000 (Kbps), PIR 4000 (Kbps), CBS 500000 (Bytes), PBS 500000 (Bytes)
              Color Mode: color blind
              Conform Action: pass
              Yellow  Action: pass
              Exceed  Action: discard
            Statistics: enable
    
          Classifier: c3
            Type: OR
          Behavior: b3
            Committed Access Rate:
              CIR 8000 (Kbps), PIR 8000 (Kbps), CBS 1000000 (Bytes), PBS 1000000 (Bytes)
              Color Mode: color blind
              Conform Action: pass
              Yellow  Action: pass
              Exceed  Action: discard
            Statistics: enable

    # View the traffic policy configuration on 10GE1/0/1.

    [~Switch] display traffic-policy statistics interface 10ge 1/0/1 inbound
    Traffic policy: p1, inbound                                                                                                         
    --------------------------------------------------------------------------------
     Slot: 1                                                                        
     Item                  Packets                Bytes           pps           bps 
     -------------------------------------------------------------------------------
     Matched                262685             26268500          2000       1600744 
      Passed                262685             26268500          2000       1600744 
      Dropped                    0                    0             0             0 
       Filter                    0                    0             0             0 
       CAR                       0                    0             0             0 
     -------------------------------------------------------------------------------
    

Configuration Files

  • Switch configuration file

    #
    sysname Switch
    #
    vlan batch 10 20 30
    #
    traffic classifier c1 type or
     if-match vlan 10
    #
    traffic classifier c2 type or
     if-match vlan 20
    #
    traffic classifier c3 type or
     if-match vlan 30
    #
    traffic behavior b1
     statistics enable
     car cir 2000 kbps
    #
    traffic behavior b2
     statistics enable
     car cir 4000 kbps
    #
    traffic behavior b3
     statistics enable
     car cir 8000 kbps
    #
    traffic policy p1
     classifier c1 behavior b1 precedence 5 
     classifier c2 behavior b2 precedence 10 
     classifier c3 behavior b3 precedence 15
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10 20 30
     traffic-policy p1 inbound
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 10 20 30
    #
    return
    
  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 10 20 30
    #
    interface 10GE1/0/1
     port default vlan 10
    #
    interface 10GE1/0/2
     port default vlan 20
    #
    interface 10GE1/0/3
     port default vlan 30
    #
    interface 10GE1/0/4
     port link-type trunk
     port trunk allow-pass vlan 10 20 30
    #
    return
    
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166640

Views: 51561

Downloads: 221

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