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 Hierarchical Traffic Policing

Example for Configuring Hierarchical Traffic Policing

Networking Requirements

NOTE:

This configuration example applies only to the CE5810EI, CE5855EI, and CE5850EI switches.

As shown in Figure 5-12, servers of tenants connect to SwitchA and the Switch and communicate with the external network through the egress router. Packets sent from the servers include voice, video, and data packets, which carry DSCP priorities AF21, CS5, and EF respectively.

The rates of different service packets must be limited within allowed ranges to meet bandwidth requirements of the services, as listed in Table 5-12. The total CIR of tenants cannot exceed 500 Mbit/s.

Table 5-12 CAR parameters for traffic from each tenant

Tenant Traffic

DSCP Priority

CIR (kbit/s)

PIR (kbit/s)

Data

AF21

50000

100000

Video

CS5

200000

400000

Voice

EF

100000

200000

Figure 5-12 Networking of hierarchical traffic policing

Configuration Roadmap

The configuration roadmap is as follows:
  1. Create a VLAN and add interfaces on SwitchA and the Switch to the VLAN to enable servers of the tenants to communicate with the external network.
  2. Configure traffic classifiers on the Switch to classify packets based on DSCP priorities. Configure traffic behaviors to limit the rates of different service flows and the total rate of all service flows.
  3. Create a traffic policy on the Switch, associate the traffic classifiers with the traffic behaviors, and apply the traffic policy to the inbound interface of service flows on the Switch to limit the rate of inbound traffic on the Switch.

Procedure

  1. Create a VLAN and add interfaces to the VLAN.

    # Create VLAN 10 on SwitchA.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan 10
    [*SwitchA-vlan10] quit
    [*SwitchA] commit
    

    # Configure 10GE1/0/2 on SwitchA as a trunk interface, and add 10GE1/0/1 and 10GE1/0/2 to VLAN 10.

    [~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 link-type trunk
    [*SwitchA-10GE1/0/2] port trunk allow-pass vlan 10
    [*SwitchA-10GE1/0/2] quit
    [*SwitchA] commit
    

    # Create VLAN 10 on the Switch.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch
    [*HUAWEI] commit
    [~Switch] vlan 10
    [*Switch-vlan10] quit
    [*Switch] commit
    

    # Configure 10GE1/0/1 and 40GE1/0/1 on the Switch as trunk interfaces and add them to VLAN 10.

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

  2. Create a CAR profile and set the maximum bandwidth to 500 Mbit/s.

    [~Switch] qos car car_total cir 500000
    [*Switch] commit
    

  3. Configure traffic classifiers on the Switch to classify packets based on DSCP priorities. Configure traffic behaviors to limit the rates of different service flows and the total rate of all service flows.

    # Configure traffic classifiers c1, c2, and c3 on the Switch to classify traffic based on DSCP priorities.

    [~Switch] traffic classifier c1
    [*Switch-classifier-c1] if-match dscp af21
    [*Switch-classifier-c1] quit
    [*Switch] traffic classifier c2
    [*Switch-classifier-c2] if-match dscp cs5
    [*Switch-classifier-c2] quit
    [*Switch] traffic classifier c3
    [*Switch-classifier-c3] if-match dscp ef
    [*Switch-classifier-c3] quit
    [*Switch] commit
    

    # 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 50000 pir 100000
    [*Switch-behavior-b1] car car_total share
    [*Switch-behavior-b1] statistics enable
    [*Switch-behavior-b1] quit
    [*Switch] traffic behavior b2
    [*Switch-behavior-b2] car cir 200000 pir 400000 
    [*Switch-behavior-b2] car car_total share
    [*Switch-behavior-b2] statistics enable
    [*Switch-behavior-b2] quit
    [*Switch] traffic behavior b3
    [*Switch-behavior-b3] car cir 100000 pir 200000 
    [*Switch-behavior-b3] car car_total share
    [*Switch-behavior-b3] statistics enable
    [*Switch-behavior-b3] quit
    [*Switch] commit
    

  4. Create a traffic policy p1 on the Switch and associate the traffic classifiers with the traffic behaviors in the traffic policy.

    [~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] commit
    

  5. Apply the traffic policy p1 to the inbound interface 10GE1/0/1 on the Switch.

    [~Switch] interface 10ge 1/0/1
    [~Switch-10GE1/0/1] traffic-policy p1 inbound
    [*Switch-10GE1/0/1] quit
    [*Switch] commit
    

  6. Verify the configuration.

    # View the traffic classifier configuration.

    [~Switch] display traffic classifier
      Traffic Classifier Information:
        Classifier: c1
          Type: OR
          Rule(s):
            if-match dscp af21
    
        Classifier: c2
          Type: OR
          Rule(s):
            if-match dscp cs5
    
        Classifier: c3
          Type: OR
          Rule(s):
            if-match dscp ef
    
    Total classifier number is 3
    

    # View the traffic policy configuration.

    [~Switch] display traffic policy
      Traffic Policy Information:
        Policy: p1
          Classifier: c1
            Type: OR
          Behavior: b1
            Committed Access Rate:
              CIR 50000 (Kbps), PIR 100000 (Kbps), CBS 6250000 (Bytes), PBS 12500000 (Bytes)
              Color Mode: color blind
              Conform Action: pass
              Yellow  Action: pass
              Exceed  Action: discard
            Share car:
              Car car_total share
            Statistics: enable
    
          Classifier: c2
            Type: AND
          Behavior: b2
            Committed Access Rate:
              CIR 200000 (Kbps), PIR 400000 (Kbps), CBS 25000000 (Bytes), PBS 50000000 (Bytes) 
              Color Mode: color blind
              Conform Action: pass
              Yellow  Action: pass
              Exceed  Action: discard
            Share car:
              Car car_total share
            Statistics: enable
    
          Classifier: c3
            Type: AND
          Behavior: b3
            Committed Access Rate:
              CIR 100000 (Kbps), PIR 200000 (Kbps), CBS 12500000 (Bytes), PBS 25000000 (Bytes)
              Color Mode: color blind
              Conform Action: pass
              Yellow  Action: pass
              Exceed  Action: discard
            Share car:
              Car car_total share
            Statistics: enable
    
    Total policy number is 1
    

    # View statistics on packets matching the traffic policy on 10GE1/0/1 of the Switch.

    [~Switch] display traffic-policy statistics interface 10ge 1/0/1 inbound
    Traffic policy: p1, inbound
    -------------------------------------------------------------------------
      Slot: 2
        Item                              Packets                       Bytes
        ---------------------------------------------------------------------
        Matched                         231899573                 24118326440
          +--Passed                     136982327                 14246674104
          +--Dropped                     94917246                  9871652336
            +--Filter                           0                           0
            +--CAR                       94917246                  9871652336
        ---------------------------------------------------------------------
    

Configuration Files

  • Switch configuration file

    #
    sysname Switch
    #
    vlan batch 10
    #
    qos car car_total cir 500000 kbps 
    #
    traffic classifier c1 type or
     if-match dscp af21
    #
    traffic classifier c2 type or
     if-match dscp cs5
    #
    traffic classifier c3 type or
     if-match dscp ef
    #
    traffic behavior b1
     car cir 50000 kbps pir 100000 kbps
     car car_total share
     statistics enable
    #
    traffic behavior b2
     car cir 200000 kbps pir 400000 kbps
     car car_total share
     statistics enable
    #
    traffic behavior b3
     car cir 100000 kbps pir 200000 kbps
     car car_total share
     statistics enable
    #
    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
     traffic-policy p1 inbound
    #
    interface 40GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    return
    
  • SwitchA configuration file

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

Document ID: EDOC1000166640

Views: 46897

Downloads: 219

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