CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
-
Upload
menganofulano -
Category
Documents
-
view
245 -
download
0
Transcript of CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
1/99
CloudEngine 6800&5800 Series Switches
V100R001C00
Configuration Guide - QoS
Issue 04
Date 2013-07-10
HUAWEI TECHNOLOGIES CO., LTD.
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
2/99
Copyright Huawei Technologies Co., Ltd. 2013. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior written
consent of Huawei Technologies Co., Ltd.
Trademarks and Permissions
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,and recommendations in this document are provided "AS IS" without warranties, guarantees or representations
of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
Huawei Technologies Co., Ltd.
Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://enterprise.huawei.com
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
i
http://enterprise.huawei.com/ -
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
3/99
About This Document
Intended Audience
This document describes the concepts and configuration procedures of QoS features on the CE
series switches, and provides the configuration examples.
This document is intended for:
l Data configuration engineers
l Commissioning engineers
l Network monitoring engineers
l System maintenance engineers
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Symbol Description
DANGER
Indicates a hazard with a high level or medium level of risk
which, if not avoided, could result in death or serious injury.
WARNINGIndicates a hazard with a low level of risk which, if notavoided, could result in minor or moderate injury.
CAUTION
Indicates a potentially hazardous situation that, if not
avoided, could result in equipment damage, data loss,
performance deterioration, or unanticipated results.
TIP Provides a tip that may help you solve a problem or save time.
NOTE Provides additional information to emphasize or supplement
important points in the main text.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS About This Document
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
ii
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
4/99
Command Conventions
The command conventions that may be found in this document are defined as follows.
Convention Description
Boldface The keywords of a command line are in boldface.
Italic Command arguments are in italics.
[ ] Items (keywords or arguments) in brackets [ ] are optional.
{ x | y | ... } Optional items are grouped in braces and separated by
vertical bars. One item is selected.
[ x | y | ... ] Optional items are grouped in brackets and separated by
vertical bars. One item is selected or no item is selected.
{ x | y | ... }* Optional items are grouped in braces and separated byvertical bars. A minimum of one item or a maximum of all
items can be selected.
[ x | y | ... ]* Optional items are grouped in brackets and separated by
vertical bars. You can select one or several items, or select
no item.
& The parameter before the & sign can be repeated 1 to n times.
# A line starting with the # sign is comments.
Interface Numbering Conventions
Interface numbers used in this manual are examples. In device configuration, use the existing
interface numbers on devices.
Change History
Updates between document issues are cumulative. Therefore, the latest document issue containsall updates made in previous issues.
Changes in Issue 04 (2013-07-10)
This version has the following updates:
The following information is modified:
l 2.4.2 Configuring the Rate Limit on the Management Interface
Changes in Issue 03 (2013-05-10)
This version has the following updates:
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS About This Document
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
iii
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
5/99
The following information is modified:
l 4.6 Applying the Traffic Policy
Changes in Issue 02 (2013-03-15)
This version has the following updates:
The following information is modified:
l 4.2 Traffic Policy Features Supported by the Device
Changes in Issue 01 (2012-12-31)
Initial commercial release.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS About This Document
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
iv
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
6/99
Contents
About This Document.....................................................................................................................ii
1 Priority Mapping Configuration................................................................................................1
1.1 Priority Mapping.............................................................................................................................................................2
1.2 Priority Mapping Features Supported by the Device.....................................................................................................21.3 Default Configuration.....................................................................................................................................................5
1.4 Configuring Priority Mapping........................................................................................................................................8
1.4.1 Configuring the Packet Priority Trusted by an Interface.............................................................................................9
1.4.2 (Optional) Configuring the Priorities of Interfaces.....................................................................................................9
1.4.3 Creatinga DiffServ Domain and Configuring Priority Mapping..............................................................................10
1.4.4 Applying the DiffServ Domain.................................................................................................................................11
1.4.5 (Optional) Configuring the Mapping Between a CoS and a Queue Index................................................................12
1.4.6 Checking the Configuration.......................................................................................................................................13
1.5 Configuration Examples...............................................................................................................................................13
1.5.1 Examplefor Configuring Priority Mapping..............................................................................................................13
1.6 Common Configuration Errors.....................................................................................................................................16
1.6.1 Packets Enter Incorrect Queues.................................................................................................................................16
1.6.2 Priority Mapping Results Are Incorrect....................................................................................................................17
2 Traffic Policing and Traffic Shaping Configurations..........................................................20
2.1 Overviews of Traffic Policing and Traffic Shaping.....................................................................................................21
2.2 Traffic Policing and Traffic Shaping Features Supported by the Device.....................................................................21
2.3 Default Configuration...................................................................................................................................................22
2.4 Configuring Traffic Policing........................................................................................................................................23
2.4.1 Configuring Interface-based Traffic Policing............................................................................................................23
2.4.2 Configuring the Rate Limit on the Management Interface........................................................................................24
2.4.3 Configuring Flow-based Traffic Policing..................................................................................................................24
2.4.4 Checking the Configuration.......................................................................................................................................25
2.5 Configuring Traffic Shaping........................................................................................................................................26
2.5.1 Configuring Interface-based Traffic Shaping............................................................................................................26
2.5.2 Configuring Queue-based Traffic Shaping................................................................................................................26
2.5.3 Checking the Configuration.......................................................................................................................................27
2.6 Maintaining Traffic Policing and Traffic Shaping.......................................................................................................28
2.6.1 Displaying Traffic Statistics......................................................................................................................................28
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS Contents
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
v
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
7/99
2.6.2 Clearing Traffic Statistics..........................................................................................................................................28
2.7 Configuration Examples...............................................................................................................................................29
2.7.1 Example for Configuring Interface-based Traffic Policing.......................................................................................29
2.7.2 Example for Configuring Flow-based Traffic Policing.............................................................................................31
2.7.3 Example for Configuring Hierarchical Traffic Policing............................................................................................36
2.7.4 Examplefor Configuring Traffic Shaping.................................................................................................................41
3 Congestion Avoidance and Congestion Management Configuration..............................44
3.1 Overview......................................................................................................................................................................45
3.2 Features of Congestion Avoidance and Congestion Management Supported by the Device......................................45
3.3 Configuring Congestion Avoidance.............................................................................................................................47
3.3.1 (Optional) Configuring CFI as the Internal Drop Priority.........................................................................................48
3.3.2 Configuring a WRED Drop Profile...........................................................................................................................48
3.3.3 Applying the WRED Drop Profile............................................................................................................................49
3.3.4 (Optional) Configuring ECN.....................................................................................................................................50
3.3.5 Checking the Configuration.......................................................................................................................................51
3.4 Configuring Congestion Management..........................................................................................................................51
3.5 Maintaining Congestion Avoidance and Congestion Management.............................................................................52
3.5.1 ViewingQueue-based Traffic Statistics....................................................................................................................52
3.5.2 ClearingQueue-based Traffic Statistics....................................................................................................................52
3.6 Configuration Examples...............................................................................................................................................53
3.6.1 Examplefor Configuring Congestion Avoidance and Congestion Management.....................................................53
4 Traffic Policy Configuration.....................................................................................................59
4.1 Traffic Policy Overview...............................................................................................................................................60
4.2 Traffic Policy Features Supported by the Device.........................................................................................................60
4.3 Configuring a Traffic Classifier...................................................................................................................................63
4.4 Configuring a Traffic Behavior....................................................................................................................................65
4.4.1 Configuring Packet Filtering.....................................................................................................................................66
4.4.2 Configuring Re-marking............................................................................................................................................66
4.4.3 Configuring Redirection............................................................................................................................................67
4.4.4 Configuring Traffic Policing.....................................................................................................................................69
4.4.5 Configuring Flow Mirroring......................................................................................................................................70
4.4.6 Configuring Traffic Statistics....................................................................................................................................704.4.7 Disabling URPF.........................................................................................................................................................71
4.4.8 Disabling MAC Address Learning............................................................................................................................72
4.4.9 Checking the Configuration.......................................................................................................................................73
4.5 Configuring a Traffic Policy.........................................................................................................................................73
4.6 Applying the Traffic Policy..........................................................................................................................................74
4.7 Maintaining a Traffic Policy.........................................................................................................................................76
4.7.1 Displaying Traffic Statistics......................................................................................................................................76
4.7.2 ClearingTraffic Statistics..........................................................................................................................................76
4.8 Configuration Examples...............................................................................................................................................77
4.8.1 Examplefor Configuring Re-marking.......................................................................................................................77
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS Contents
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
vi
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
8/99
4.8.2 Example for Configuring PBR..................................................................................................................................80
4.8.3 Example for Configuring Traffic Statistics...............................................................................................................85
4.8.4 Example for Configuring Packet Filtering................................................................................................................88
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS Contents
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
vii
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
9/99
1Priority Mapping ConfigurationAbout This Chapter
This chapter provides priority mapping configuration method, configuration examples, and
common configuration errors.
1.1 Priority Mapping
Priority mapping maps QoS priorities in packets to internal priorities (local priorities assigned
by the deviceto packets) to ensure QoS in the differentiated services (DiffServ) model based on
internal priorities.
1.2 Priority Mapping Features Supported by the Device
This section describes priority mappingfeatures supported by the device.
1.3 Default Configuration
This section describes the priority mapping table and default settings.
1.4 Configuring Priority Mapping
After prioritymapping is configured, the device maps packet priorities or the default interface
priority to PHBs and colors so that the device can provide differentiated services for packets.
1.5 Configuration Examples
This section provides a priority mapping configuration example, including networking
requirements, configuration notes, and configuration roadmap.
1.6 Common Configuration ErrorsThis section describes common priority mapping configuration errors.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
1
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
10/99
1.1 Priority Mapping
Priority mapping maps QoS priorities in packets to internal priorities (local priorities assignedby the device to packets) to ensure QoS in the differentiated services (DiffServ) model based on
internal priorities.
Packets carry different priority fields on various networks. For example, packets carry the 802.1p
field in a VLAN and the DSCP field on an IP network. The mapping between the priority fields
must be configured on the network devices to retain priorities of packets when the packets
traverse different networks. When the device functions as the gateway between different
networks, the external priority fields (including 802.1p and DSCP) of all packets received by
the device are mapped to the internal priorities. When the device sends packets, it maps the
internal priorities to external priorities.
1.2 Priority Mapping Features Supported by the Device
This section describes priority mapping features supported by the device.
Configurations Involved in Priority Mapping
1. Priority trust mode: It determines the priority type for priority mapping.
2. Priority mapping mode: It determines the mapping between the packet priority and internal
priority (CoS). In this way, the device can provide differentiated QoS services based on the
internal priority.
3. Mapping between internal priorities and inbound queue indexes: This mapping allowspackets to be sent to different queues, implementing differentiated services.
Priority Trust Modes
You can configure the device to trust either of the following priorities:
l 802.1p priority
The device classifies packets based on 802.1p priorities and performs priority mapping
accordingly.
l DSCP priority
The device classifies packets based on DSCP priorities and performs priority mapping
accordingly.
By default, an interface trusts the default 802.1p priority.
After packets flow into the device,
l In Layer 2 forwarding mode
If packets carry tags, the interface trusts the 802.1p priority. If packets carry no tag, the
interface forwards them based on the interface priority.
l In Layer 3 forwarding mode
Configure the interface to trust DSCP priorities.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
2
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
11/99
Priority Mapping Modes
The device can classify packets based on the mappings from packet priorities to PHBs and colors
defined in a DiffServ domain. When packets are received from an upstream device, priorities in
packets are mapped to PHBs and colors based on the DiffServ domain bound to the inbound
interface. The system then determines the queues that packets enter based on the mapping
between internal priorities and queues. The system performs congestion management based on
PHBs and performs congestion avoidance based on colors. When packets are sent out, PHBs
and colors in packets are mapped to priorities based on the DiffServ domain bound to the
outbound interface. The downstream device then provides QoS based on packet priorities.
The defaultDiffServ domain exists on the device by default. You can use the defaultDiffServ
domain or configure a new DiffServ domain. In addition to the defaultDiffServ domain, a
maximum of 7 DiffServ domains can be created. The device can dynamically modify the priority
mapping relationship. Bind a DiffServ domain to an interface so that the system can perform
priority mapping for incoming and outgoing traffic on the interface.
The device supports the following priority mapping modes:
l 802.1p priorities to PHBs and colors
l PHBs and colors to 802.1p priorities
l DSCP priorities to PHBs and colors
l PHBs and colors to DSCP priorities
Mapping Between an Internal Priority and an Inbound Queue Index
By default, internal priorities (CoS of packets) and interface queues are mapped in one-to-one
mode except that unknown unicast packets on the CloudEngine 6800 are processed in a different
manner. In practice, mappings between CoS values and queues need to be adjusted or packetswith different CoS values are scheduled in the same queue to save the device buffer. The device
sends packets to different interface queues based on the internal priority (CoS), and performs
traffic shaping, congestion avoidance, and queue scheduling for the queues.
Table 1-1lists the mappings between internal priorities and queues supported by the
CloudEngine 6800. Table 1-3lists the mappings between internal priorities and queues
supported by the CloudEngine 5800.
Table 1-1Mappings between internal priorities and queues on the CloudEngine 6800
Internal Priority Queue Index
BE (unknown unicast packets) 0
AF1 (unknown unicast packets) 1
AF2 (unknown unicast packets) 1
AF3 (unknown unicast packets) 1
AF4 (unknown unicast packets) 2
EF (unknown unicast packets) 2
CS6 (unknown unicast packets) 6
CS7 (unknown unicast packets) 6
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
3
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
12/99
Internal Priority Queue Index
BE (known unicast packets) 0
AF1 (known unicast packets) 1
AF2 (known unicast packets) 2
AF3 (known unicast packets) 3
AF4 (known unicast packets) 4
EF (known unicast packets) 5
CS6 (known unicast packets) 6
CS7 (known unicast packets) 7
Unknown unicast packets on the CloudEngine 6800 can only enter queues 0, 1, 2, and 6. After
the mappings between PHBs and queues are modified, the system uses the mappings between
configured queue indexes and actual queue indexes listed in Table 1-2.
Table 1-2Mappings between configured queues and actual queues that packets enter on the
CloudEngine 6800
Configured Queue Index Actual Queue Index
0 0
1 1
2 1
3 1
4 2
5 2
6 6
7 6
Table 1-3Mappings between internal priorities and queues on the CloudEngine 5800
Internal Priority Queue Index
BE 0
AF1 1
AF2 2
AF3 3
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
4
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
13/99
Internal Priority Queue Index
AF4 4
EF 5
CS6 6
CS7 7
1.3 Default Configuration
This section describes the priority mapping table and default settings.
By default, the mappings in the DiffServ domain are as follows:
l Table 1-4lists the mappings from 802.1p priorities to PHBs and colors.
l Table 1-5lists the mappings from PHBs and colors to 802.1p priorities.
l Table 1-6lists the mappings from DSCP priorities to PHBs and colors.
l Table 1-7lists the mappings from PHBs and colors to DSCP priorities.
The mapping from interface priorities to PHBs and colors is similar to the mapping from 802.1p
priorities to PHBs and colors. The color is used to determine whether the packets are discarded,
and is independent of the mappings between internal priorities and queues.
Table 1-4Mappings from 802.1p priorities to PHBs and colors of incoming VLAN packets in
the DiffServ domain
802.1p Priority PHB Color
0 BE green
1 AF1 green
2 AF2 green
3 AF3 green
4 AF4 green
5 EF green
6 CS6 green
7 CS7 green
Table 1-5Mappings from PHBs and colors to 802.1p priorities of outgoing VLAN packets in
the DiffServ domain
PHB Color 802.1p Priority
BE green 0
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
5
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
14/99
PHB Color 802.1p Priority
BE yellow 0
BE red 0
AF1 green 1
AF1 yellow 1
AF1 red 1
AF2 green 2
AF2 yellow 2
AF2 red 2
AF3 green 3
AF3 yellow 3
AF3 red 3
AF4 green 4
AF4 yellow 4
AF4 red 4
EF green 5
EF yellow 5
EF red 5
CS6 green 6
CS6 yellow 6
CS6 red 6
CS7 green 7
CS7 yellow 7
CS7 red 7
Table 1-6Mappings from DSCP priorities to PHBs and colors of incoming IP packets in the
DiffServ domain
DSCP PHB Color DSCP PHB Color
0 BE green 32 AF4 green
1 BE green 33 AF4 green
2 BE green 34 AF4 green
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
6
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
15/99
DSCP PHB Color DSCP PHB Color
3 BE green 35 AF4 green
4 BE green 36 AF4 yellow
5 BE green 37 AF4 green
6 BE green 38 AF4 red
7 BE green 39 AF4 green
8 AF1 green 40 EF green
9 AF1 green 41 EF green
10 AF1 green 42 EF green
11 AF1 green 43 EF green
12 AF1 yellow 44 EF green
13 AF1 green 45 EF green
14 AF1 red 46 EF green
15 AF1 green 47 EF green
16 AF2 green 48 CS6 green
17 AF2 green 49 CS6 green
18 AF2 green 50 CS6 green
19 AF2 green 51 CS6 green
20 AF2 yellow 52 CS6 green
21 AF2 green 53 CS6 green
22 AF2 red 54 CS6 green
23 AF2 green 55 CS6 green
24 AF3 green 56 CS7 green
25 AF3 green 57 CS7 green
26 AF3 green 58 CS7 green
27 AF3 green 59 CS7 green
28 AF3 yellow 60 CS7 green
29 AF3 green 61 CS7 green
30 AF3 red 62 CS7 green
31 AF3 green 63 CS7 green
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
7
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
16/99
Table 1-7Mappings from PHBs and colors to DSCP priorities of outgoing IP packets in the
DiffServ domain
PHB Color DSCP
BE green 0
BE yellow 0
BE red 0
AF1 green 10
AF1 yellow 12
AF1 red 14
AF2 green 18
AF2 yellow 20
AF2 red 22
AF3 green 26
AF3 yellow 28
AF3 red 30
AF4 green 34
AF4 yellow 36
AF4 red 38
EF green 46
EF yellow 46
EF red 46
CS6 green 48
CS6 yellow 48
CS6 red 48
CS7 green 56
CS7 yellow 56
CS7 red 56
1.4 Configuring Priority Mapping
After priority mapping is configured, the device maps packet priorities or the default interface
priority to PHBs and colors so that the device can provide differentiated services for packets.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
8
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
17/99
Pre-Configuration Tasks
Before configuring priority mapping, complete the following tasks:
l Setting physical parameters of relevant interfaces
l Setting the link-layer attributes of each interface
1.4.1 Configuring the Packet Priority Trusted by an Interface
Context
You can configure the device to trust either of the following priorities:
l 802.1p priority
When receiving a tagged packet, the device searches the mapping table for the 802.1p
priority of the packet, and then tags the packet with the mapping inner priority. When
receiving an untagged packet, the device searches the mapping table based on the default802.1p priority, and then tags the packet with the mapping inner priority.
l DSCP priority
When receiving a packet, the device searches the mapping table for the DSCP priority of
the packet, and then tags the packet with the mapping inner priority.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:interfaceinterface-typeinterface-number
The interface view is displayed.
Step 3 Run:trust{ 8021p{ inner| outer} | dscp}
The interface is configured to trust the packet priority.
By default, an interface trusts 802.1p priorities in outer VLAN tags.
Step 4 Run:commit
The configuration is committed.
----End
1.4.2 (Optional) Configuring the Priorities of Interfaces
Context
The interface priority is used as follows:
l
If an interface receives untagged packets, the switch provides differentiated services forpackets based on the port priority.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
9
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
18/99
l If the priority mapping function is disabled on the interface using the trust upstream
nonecommand, the switch provides differentiated services for forwarded packets based
on the port priority.
ProcedureStep 1 Run:
system-view
The system view is displayed.
Step 2 Run:interfaceinterface-typeinterface-number
The interface view is displayed.
Step 3 Run:
port prioritypriority-value
The interface priority is set.
The default port priority is 0.
Step 4 Run:commit
The configuration is committed.
----End
1.4.3 Creating a DiffServ Domain and Configuring PriorityMapping
Context
When the device functions as the edge node in the DiffServ domain, configure priority mapping
between internal priorities and external priorities:
l When traffic enters the device, the device maps packet priorities to PHBs and colors, and
then performs congestion management based on PHBs and performs congestion avoidance
based on colors.
l When traffic flows out of the device, the device maps PHBs and colors of packets topriorities. The downstream device provides QoS services based on packet priorities.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:diffserv domainds-domain-name
A DiffServ domain is created and the DiffServ domain view is displayed.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
10
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
19/99
The domain defaultdefines default mappings between packet priorities and PHBs/colors. You
can modify the mapping defined in the domain defaultbut cannot delete the domain default.
In addition to the domain default, a maximum of 7 DiffServ domains can be created.
Step 3 Run the following commands as required.
Operation Command
Map 802.1p priorities to PHBs on the inbound
direction of an interface and color the packets.
8021p-inbound8021p-valuephb
service-class[ green| yellow| red]
Map PHBs and colors to 802.1p priorities on the
outbound direction of an interface .
8021p-outbound service-class{ green|
yellow| red} map8021p-value
Map DSCP priorities to PHBs on the inbound
direction of an interface and color the packets.
ip-dscp-inbounddscp-valuephb
service-class[ green| yellow| red]
Map PHBs and colors to DSCP priorities on the
outbound direction of an interface .
ip-dscp-outbound service-class{ green
| yellow| red} mapdscp-value
1.3 Default Configurationdescribes the following default mappings:
l Mapping from 802.1p priorities to PHBs and colors
l Mapping from PHBs and colors to 802.1p priorities
l Mapping from DSCP priorities to PHBs and colors
l Mapping from PHBs and colors to DSCP priorities
Step 4 Run:commit
The configuration is committed.
----End
1.4.4 Applying the DiffServ Domain
Context
To map priorities of incoming or outgoing packets to PHBs and colors based on the mappings
defined in a DiffServ domain, bind the DiffServ domain to the inbound or outbound interface
of the packets. The system then maps priorities of packets to PHBs and colors based on themappings in the DiffServ domain.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:interfaceinterface-typeinterface-number
The interface view is displayed.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
11
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
20/99
Step 3 Run:trust upstream{ ds-domain-name| none}
The DiffServ domain is bound to the interface.
If trust upstreamnoneis executed on an interface, the system does not perform prioritymapping for incoming and outgoing packets.
Step 4 (Optional) Run:qos phb marking disable
PHB mapping is disabled for outgoing packets.
By default, PHB mapping is enabled for outgoing packets on an interface.
Step 5 Run:commit
The configuration is committed.
----End
1.4.5 (Optional) Configuring the Mapping Between a CoS and aQueue Index
Context
A device schedules packets based on queues. After packet priorities are mapped to CoS values
(PHBs), the device sends packets to queues based on the mapping between CoS values and queue
indexes to provide packets with differentiated services.
By default, CoS values and interface queues are mapped in one-to-one mode. In practice, packets
with two or more CoS values are scheduled in the same queue to save the device buffer. The
device sends packets to different interface queues based on the internal priority, and performs
traffic shaping, congestion avoidance, and queue scheduling for the queues.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:qos local-precedence-queue-maplocal-precedencequeue-index
The mapping between a CoS and a queue index is configured.
For the default mappings between CoS values and queue indexes, see Mappings between CoS
values and queues.
Step 3 Run:commit
The configuration is committed.
----End
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
12
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
21/99
1.4.6 Checking the Configuration
Procedure
lRun the display diffserv domain[ brief| ds-domain-name] command to check theDiffServ domain configuration.
----End
1.5 Configuration Examples
This section provides a priority mapping configuration example, including networking
requirements, configuration notes, and configuration roadmap.
1.5.1 Example for Configuring Priority Mapping
Networking Requirements
As shown in Figure 1-1, uplink interfaces 40GE1/0/1 and 40GE1/0/2 of Switch connect to core
switches SwitchA and SwitchB, downlink interfaces 10GE1/0/1 and 10GE1/0/2 of Switch
connect to tenant servers, and Switch connects to the Internet through the egress router.
On the data center network, tenant 1 and tenant 2 lease different servers. The CoS of tenant 1 is
higher than that of tenant 2, so a short delay is required for tenant 1' services. 802.1p priorities
of packets from servers of tenant 1 and tenant 2 are 0. DiffServ domains are defined to map
802.1p priority of packets from tenant 1's server to AF4 and map 802.1p priority of packets from
tenant 2's server to AF2. The DiffServ domains are applied to 10GE1/0/1 and 10GE1/0/2 to
implement differentiated services and ensure user experience of tenant 1.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
13
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
22/99
Figure 1-1Networking diagram of priority mapping
Switch
Tenant 1's
Server
Tenant 2's
Server
Network
10GE1/0/210GE1/0/1
40GE1/0/2
SwitchB......
40GE1/0/1
SwitchA
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and configure interfaces so that the Switch connects to tenants' servers,
SwitchA, and SwitchB.
2. Configure interfaces to trust outer 802.1p priorities.
3. Create DiffServ domains, and map 802.1p priorities to PHBs and colors.
4. Bind DiffServ domains to 10GE1/0/1 and 10GE1/0/2 on the Switch respectively.
Procedure
Step 1 Create VLANs and configure interfaces.
# Create VLAN 100 and VLAN 200.
system-view[~HUAWEI] sysname Switch[~HUAWEI] commit[~Switch] vlan batch 100 200[~Switch] commit
# Configure 40GE1/0/1 and 40GE1/0/2 on Switch as trunk interfaces. Add 10GE1/0/1 to VLAN
100, 10GE1/0/2 to VLAN 200, and 40GE1/0/1 and 40GE1/02/ to both VLAN 100 and VLAN200.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
14
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
23/99
[~Switch] interface 10ge 1/0/1[~Switch-10GE1/0/1]port default vlan 100[~Switch-10GE1/0/1] quit[~Switch] interface 10ge 1/0/2[~Switch-10GE1/0/2]port default vlan 200[~Switch-10GE1/0/2] quit
[~Switch] interface 40ge 1/0/1[~Switch-40GE1/0/1]port link-type trunk[~Switch-40GE1/0/1]port trunk allow-pass vlan 100 200[~Switch-40GE1/0/1] quit[~Switch] interface 40ge 1/0/2[~Switch-40GE1/0/2]port link-type trunk[~Switch-40GE1/0/2]port trunk allow-pass vlan 100 200[~Switch-40GE1/0/2] quit[~Switch] commit
Step 2 Configure interfaces to trust outer 802.1p priorities.
By default, an interface trusts outer 802.1p priorities. The procedure is not mentioned here.
Step 3 Create and configure DiffServ domains.
# Create DiffServ domains ds1and ds2on the Switch and map 802.1p priorities of packets from
tenants' servers to different CoS.
[~Switch] diffserv domain ds1[~Switch-dsdomain-ds1] 8021p-inbound 0 phb af4 green[~Switch-dsdomain-ds1] quit[~Switch] diffserv domain ds2[~Switch-dsdomain-ds2] 8021p-inbound 0 phb af2 green[~Switch-dsdomain-ds2] quit[~Switch] commit
Step 4 Bind DiffServ domains to interfaces.
# Bind DiffServ domains ds1and ds2to 10GE1/0/1 and 10GE1/0/2 respectively.[~Switch] interface 10ge 1/0/1[~Switch-10GE1/0/1] trust upstream ds1[~Switch-10GE1/0/1] quit[~Switch] interface 10ge 1/0/2[~Switch-10GE1/0/2] trust upstream ds2[~Switch-10GE1/0/2] quit[~Switch] commit
----End
Configuration Files
l Configuration file of the Switch#sysname Switch
#
vlan batch 100 200
#diffserv domain ds1
8021p-inbound 0 phb af4 green
#diffserv domain ds2
8021p-inbound 0 phb af2 green
#
interface 10GE1/0/1port default vlan 100
trust upstream ds1
#
interface 10GE1/0/2port default vlan 200
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
15
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
24/99
trust upstream ds2
#
interface 40GE1/0/1port link-type trunk
port trunk allow-pass vlan 100 200
#
interface 40GE1/0/2port link-type trunk
port trunk allow-pass vlan 100 200
#
return
1.6 Common Configuration Errors
This section describes common priority mapping configuration errors.
1.6.1 Packets Enter Incorrect Queues
Common Cause
This fault is commonly caused by one of the following:
l The priority mapping configured in the DiffServ domain trusted by the inbound interface
does not meet requirements.
l There are configurations affecting the queues that packets enter on the inbound interface.
l There are configurations affecting the queues that packets enter in the VLAN that packets
belong to.
l There are configurations affecting the queues that packets enter in the system.
NOTE
On the CloudEngine 6800, only queues 0, 1, 2, and 6 are available for unknown unicast packets, and queues
0 to 7 are available for known unicast packets. For details, see 1.2 Priority Mapping Features Supported
by the Device.
Procedure
Step 1 Check whether priority mappings are correct.
Run the display thiscommand in the inbound interface view and check the configuration of the
trust upstreamcommand. If the trust upstreamcommand is not used, the system trusts the
DiffServ domain default. Then, run the display diffserv domainds-domain-namecommandto check whether the priority mapping configured in the DiffServ domain trusted by the inbound
interface is correct.
l If not, run the ip-dscp-inboundor 8021p-inboundcommand to correctly configure priority
mapping.
l If so, go to step 2.
Step 2 Check whether there are configurations affecting the queues that packets enter on the inboundinterface.
The following configurations affect the queues that packets enter on the inbound interface:
l
If the traffic-policyhas the traffic behavior of remark local-precedence, the system sendspackets to queues based on the re-marked PHB.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
16
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
25/99
l If the trust upstreamnonecommand is executed, priorities of all the incoming packets are
not mapped and the packets enter queues based on the interface priority.
l If the port link-typedot1q-tunnelcommand is used but the trust8021p innercommand
is not used on the interface, all the incoming packets enter queues based on the interface
priority.
Run the display thiscommand in the inbound interface view to check whether there are
configurations affecting packets enqueuing on the inbound interface.
l If so, delete or modify the configuration as required.
l If not, go to step 3.
Step 3 Check whether there are configurations affecting the queues that packets enter in the VLAN thatpackets belong to.
The following configurations affect the queues that packets enter in the VLAN that packets
belong to:
l If the traffic-policyhas the traffic behavior of remark local-precedence, the system sendspackets to queues based on the re-marked PHBs.
l If the traffic-policyhas the traffic behavior of remark 8021p, the system maps the re-marked
priorities of packets to PHBs and sends the packets to queues based on the mapped PHBs.
Run the display thiscommand in the view of the VLAN that packets belong to and check whether
the configurations affecting the packets enqueuing are performed in the VLAN.
l If so, delete or modify the configuration as required.
l If not, go to step 4.
Step 4 Check whether there are configurations affecting the queues that packets enter in the system.
The following configurations affect the queues that packets enter in the system:
l If the qos local-precedence-queue-mapcommand is executed, the system sends packets to
queues based on the mapping between PHBs and queues specified by this command.
l If the traffic-policy globalhas the traffic behavior of remark local-precedence, the system
sends packets to queues based on the re-marked PHB.
l If the traffic-policy globalhas the traffic behavior of remark 8021p, the system maps the
re-marked priorities of packets to PHBs and sends the packets to queues based on the mapped
PHBs.
Run the display current-configurationcommand to check whether there are configurations
affecting the queues that packets enter in the system. If so, delete or modify the configurationas required.
NOTE
A traffic policy is applied to an interface, a VLAN, and the system in descending order of priorities.
----End
1.6.2 Priority Mapping Results Are Incorrect
Common Cause
This fault is commonly caused by one of the following:
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
17
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
26/99
l On the outbound interface, packets do not enter queues corresponding to the priority of
packets.
l The priority types trusted by the inbound and outbound interfaces do not meet requirements.
l The priority mappings configured in the DiffServ domain trusted by the inbound and
outbound interfaces do not meet requirements.
l There are configurations affecting priority mapping on the inbound and outbound
interfaces.
Procedure
Step 1 Check that packets enter correct queues on the outbound interface.
Run the display qos queue statisticsinterfaceinterface-type interface-numbercommand to
check whether packets enter correct queues on the outbound interface.
l If not, locate the fault according to 1.6.1 Packets Enter Incorrect Queues.
l If so, go to step 2.
Step 2 Check that the priority types trusted by the inbound and outbound interface are correct.
Run the display thiscommand in the interface view to check whether the trusted priority type
set using the trustcommand on the interface is correct. (If the trustcommand is not used, the
system trusts the 802.1p priority in the outer VLAN tag by default.)
l If not, run the trustcommand to correctly configure the priority type trusted by the interface.
l If so, go to step 3.
Step 3 Check that the priority mapping configured in the DiffServ domain trusted by the inbound andoutbound interfaces is correct.
Run the display thiscommand in the view of the inbound and outbound interfaces to check
whether the trust upstreamcommand is used. If the trust upstreamcommand is not used, the
system trusts the DiffServ domain defaultby default.
Run the display diffserv domainds-domain-namecommand to check whether the mapping
between PHBs/colors and packet priorities is correct.
l If not, run the ip-dscp-outbound or 8021p-outboundcommand to correctly configure the
mapping between PHBs/colors and packet priorities.
l If so, go to step 4.
Step 4 Check whether there are configurations affecting priority mapping on the inbound and outboundinterfaces.
The following configurations affect priority mapping on the inbound and outbound interfaces:
l If the qos phb marking disablecommand is executed, the system does not perform PHB
mapping for outgoing packets on an interface.
l If the trust upstream nonecommand is executed, the system does not perform PHB mapping
for outgoing packets on an interface.
l If the traffic-policyhas the traffic behavior of remark 8021por remark dscpon the inbound
and outbound interfaces, the re-marked priority is the packet priority.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
18
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
27/99
Run the display thiscommand in the view of the inbound and outbound interfaces to check
whether there are configurations affecting priority mapping. If so, delete or modify the
configuration as required.
----End
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 1 Priority Mapping Configuration
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
19
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
28/99
2Traffic Policing and Traffic ShapingConfigurations
About This Chapter
This document describes basic concepts of traffic policing and traffic shaping, and configuration
methods of traffic policing based on a traffic classifier and traffic shaping, and provides
configuration examples.
2.1 Overviews of Traffic Policing and Traffic Shaping
Traffic policing and Traffic Shaping monitor traffic entering a network to control traffic and
resource usage and better serve users.
2.2 Traffic Policing and Traffic Shaping Features Supported by the Device
To make full use of limited network resources, you can police and shape specific service flows
to adapt to the allocated network resources.
2.3 Default Configuration
This section provides the default traffic policing and traffic shaping configurations.
2.4 Configuring Traffic Policing
Interface-based traffic policing allows the device to limit the rate of all service traffic on an
interface. Flow-based traffic policing allows the device to limit the rate of packets matching
traffic classification rules.
2.5 Configuring Traffic Shaping
Traffic shaping enables outgoing traffic to be sent out at an even rate and reduces the number
of discarded packets that exceed the CIR.
2.6 Maintaining Traffic Policing and Traffic Shaping
This section how to maintain traffic policing and traffic shaping, including displaying and
clearing traffic statistics.
2.7 Configuration Examples
This section provides several configuration examples of traffic policing and traffic shaping.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
20
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
29/99
2.1 Overviews of Traffic Policing and Traffic Shaping
Traffic policing and Traffic Shaping monitor traffic entering a network to control traffic and
resource usage and better serve users.
If the transmit rate of packets is greater than the receive rate of packets or the rate of an interface
on a downstream device is smaller than that of the connected interface on the upstream device,
network congestion occurs. If traffic sent by users is not limited, continuous burst data from
numerous users may aggravate network congestion. To efficiently use limited network resources
and better serve more users, traffic sent by users must be limited.
Traffic policing and Traffic Shaping limit traffic and resource usage by monitoring the traffic
rate.
Traffic PolicingTraffic policing discards excess traffic to limit the traffic within a proper range and to protect
network resources and user benefits.
Traffic Shaping
Traffic shaping is a measure to adjust the transmit rate of traffic. When the rate of the inbound
interface on a downstream device is lower than that of the outbound interface on an upstream
device or burst traffic occurs, traffic congestion may occur on the inbound interface of the
downstream device. You can configure traffic shaping on the outbound interface of the upstream
device so that outgoing traffic is sent at an even rate, which prevents congestion.
Traffic policing discards excess traffic, while traffic shaping buffer excess traffic in a token
bucket. When there are sufficient tokens in the token bucket, the buffered packets are forwarded
at an even rate. Traffic shaping increases the delay, whereas traffic policing does not.
2.2 Traffic Policing and Traffic Shaping Features Supportedby the Device
To make full use of limited network resources, you can police and shape specific service flows
to adapt to the allocated network resources.
Traffic Policing
The device supports the following traffic policing features:
l Interface-based traffic policing
Controls all incoming traffic on an interface regardless of packet types. Interface-based
traffic policing discards excess traffic to limit the incoming traffic within a proper range
and to protect network resources.
NOTE
Interface-based traffic policing can be configured only in the inbound direction on an interface.
l Management interface-based traffic policing
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
21
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
30/99
Limits traffic on the management interface. This is because CPU usage becomes high and
services are interrupted if there is heavy traffic on the management interface due to
malicious attacks or network exceptions.
l Flow-based traffic policing
Limits the rate of traffic matching traffic classification rules. The device monitors the rateof traffic of a specified type and discards excess packets to limit traffic of this type within
a proper range and protect network resources. Flow-based traffic policing uses dual token
buckets.
The CE5800 can apply CAR to limit the uplink traffic twice. That is, CAR first applies to
the uplink traffic matching traffic classification rules, and then applies to these aggregated
uplink traffic. The uplink traffic refers to the incoming service traffic that matches the traffic
classifier bound to a traffic behavior with aggregated CAR configured in the same traffic
policy.
NOTE
lAggregated CAR supports only the single token bucket at a single rate.
l Flow-based traffic policing allows the device to limit the inbound and outbound interface rates
(the matching rule is configured using the if-match anycommand) and traffic rate.
Traffic Shaping
The device supports the following traffic shaping features:
l Interface-based traffic shaping
Shapes all the packets that pass through an interface.
l Queue-based traffic shaping
Shape packets in different queues on an interface. Therefore, the device can shape trafficbased on service types, such as audio, data, and video services.
NOTE
Traffic shaping can be configured only in the outbound direction on an interface.
2.3 Default Configuration
This section provides the default traffic policing and traffic shaping configurations.
Table 2-1lists the default traffic policing configuration, and Table 2-2lists the default traffic
shaping configuration.
Table 2-1Default traffic policing configuration
Parameter Default Setting
Interface-based traffic policing Disabled
Management interface-based
traffic policing
Disabled
Flow-based traffic policing Disabled
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
22
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
31/99
Table 2-2Default traffic shaping configuration
Parameter Default Setting
Interface-based traffic shaping Disabled
Queue-based traffic shaping Disabled
2.4 Configuring Traffic Policing
Interface-based traffic policing allows the device to limit the rate of all service traffic on an
interface. Flow-based traffic policing allows the device to limit the rate of packets matching
traffic classification rules.
Pre-configuration TasksBefore configuring traffic policing, complete the following tasks:
l Configuring link layer attributes of interfaces to ensure that the interfaces work properly
l Configuring IP addresses and routing protocols for interfaces to ensure connectivity
2.4.1 Configuring Interface-based Traffic Policing
Context
If user traffic is not limited, continuous burst data from numerous users can cause networkcongestion. To better use network resources, you can configure traffic policing to limit the user
traffic within a proper range and protect the network resources and user interests.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:qos carcar-namecircir-value[ kbps|mbps| gbps] [ cbscbs-value[bytes|kbytes|mbytes] [pbspbs-value[bytes| kbytes|mbytes] ] |pirpir-value[ kbps|mbps| gbps] [ cbscbs-value[bytes| kbytes|mbytes]pbspbs-value[bytes| kbytes|mbytes] ] ]
A QoS CAR profile is created and configured.
Step 3 Run:interfaceinterface-typeinterface-number
The interface view is displayed.
NOTE
When configuring interface-based traffic policing, the interface type can be GE, 10GE, 40GE or Eth-Trunk.
Step 4 Run:
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
23
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
32/99
qos car inboundcar-name
The QoS CAR profile is applied to the interface.
After the QoS CAR profile is applied to the interface, the device limits the rate of all incoming
service traffic on the interface.
Step 5 Run:commit
The configuration is committed.
----End
2.4.2 Configuring the Rate Limit on the Management Interface
Context
If there is heavy traffic on the management interface because of malicious attacks or networkexceptions, CPU usage becomes high and services are interrupted. To ensure that the system
works properly, limit the traffic on the management interface. After traffic policing is configured
on the management interface, the device limits the rate of traffic received on the management
interface to improve system performance.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:interfacemeth 0/0/0
The MEth interface view is displayed.
Step 3 Run:qos lr ppspackets
The rate limit of traffic on the management interface is set.
NOTE
The rate limit of traffic on the management interface cannot be smaller than 100 pps; otherwise, FTP and
Telnet functions are affected.
Step 4 Run:commit
The configuration is committed.
----End
2.4.3 Configuring Flow-based Traffic Policing
Context
To limit the rate of incoming traffic on an interface, configure flow-based traffic policing. Atraffic policy can be applied to multiple interfaces. When the rate of packets matching traffic
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
24
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
33/99
classification rules exceeds the rate limit, the device discards the packets. Flow-based traffic
policing can implement differentiate services using traffic classification.
Level-2 CAR is supported by the device. After the system applies CAR to service flows matching
a traffic classifier in a traffic policy, it aggregates all the service flows matching the traffic
classifier bound to the aggregated CAR action in the same traffic policy and applies CAR to theaggregated service flows. Level-2 CAR is also called hierarchical traffic policing. Hierarchical
traffic policing implements traffic statistics multiplexing and fine-grained control over services.
For example, hierarchical traffic policing limits the service traffic of level-1 and level-2 users
or traffic of level-1 and level-2 user groups.
Procedure
Step 1 Configure a traffic classifier.
The device can classify traffic according to the ACL, Layer 2 information in packets, and Layer
3 information in packets. Configure a traffic classifier by selecting proper traffic classificationrules. For details, see 4.3 Configuring a Traffic Classifier.
Step 2 Configure a traffic behavior.
Create a traffic behavior and configure the CAR action in the traffic behavior. For details, see
4.4.4 Configuring Traffic Policing.
Step 3 Configure a traffic policy.
Create a traffic policy, and associate the traffic classifier and traffic behavior with the traffic
policy. For details, see 4.5 Configuring a Traffic Policy.
Step 4 Apply the traffic policy.
Apply the traffic policy to the system, VLANs, and interfaces. For details, see 4.6 Applying the
Traffic Policy.
----End
2.4.4 Checking the Configuration
Procedure
l Run the display traffic behavior[behavior-name] command to check the traffic behaviorconfiguration.
l Run the display traffic classifier[ classifier-name] command to check the traffic classifier
configuration.
l Run the display traffic policy[policy-name[ classifierclassifier-name] ] command to
check the traffic policy configuration.
l Run the display traffic-policyapplied-record[policy-name] command to check the
application record of the specified traffic policy.
l Run the display qos car[ car-name] command to check the QoS CAR configuration.
----End
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
25
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
34/99
2.5 Configuring Traffic Shaping
Traffic shaping enables outgoing traffic to be sent out at an even rate and reduces the number
of discarded packets that exceed the CIR.
Pre-configuration Tasks
Before configuring traffic shaping, complete the following tasks:
l Configuring link layer attributes of interfaces to ensure that the interfaces work properly
l Configuring IP addresses and routing protocols for interfaces to ensure connectivity
2.5.1 Configuring Interface-based Traffic Shaping
Context
To limit the rate of outgoing traffic on an interface, configure interface-based traffic shaping.
When the packet rate exceeds the traffic shaping rate, excess packets enter the buffer queue.
When there are sufficient tokens in the token bucket, the device forwards buffered packets at an
even rate. When the buffer queue is full, the device discards packets.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interfaceinterface-typeinterface-number
The interface view is displayed.
Step 3 Run:
qos lrcircir-value[ kbps|mbps| gbps] [ cbscbs-value[bytes| kbytes|mbytes] ] [ outbound]
The traffic shaping rate is configured in the outbound direction on an interface.
The default shaping rate of an interface is the maximum bandwidth of the interface.
Step 4 Run:
commit
The configuration is committed.
----End
2.5.2 Configuring Queue-based Traffic Shaping
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
26
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
35/99
Context
The received packets on an interface enter different queues based on priority mapping.
Differentiated services are provided by setting different traffic shaping parameters for queues
with different priorities.
Before configuring queue-based traffic shaping, configure priority mapping to map priorities of
packets to PHBs. In this way, packets of different services enter different queues.
For the priority mapping configuration, see 1.4 Configuring Priority Mapping.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:interfaceinterface-typeinterface-number
The interface view is displayed.
Step 3 Run:qos queuequeue-indexshapingcircir-value[ kbps|mbps| gbps]pirpir-value[ kbps|mbps| gbps] [ cbscbs-value[bytes| kbytes|mbytes]pbspbs-value[bytes| kbytes|mbytes] ]
The traffic shaping rate of a queue on the interface is configured. It is recommended that the
CBS be 120 times the CIR.
The default traffic shaping rate of queues on an interface is the maximum bandwidth of theinterface.
If both queue-based traffic shaping and interface-based traffic shaping (using the qos lr
command) are configured on an interface, the CIR of interface-based traffic shaping cannot be
smaller than the sum of CIR values of all the queues on the interface; otherwise, traffic shaping
result may be incorrect. For example, the queue with a lower priority occupies the bandwidth
of the queue with a higher priority.
Step 4 Run:commit
The configuration is committed.
----End
2.5.3 Checking the Configuration
Procedure
l Run the display qos queue statisticsinterfaceinterface-type interface-numbercommand
to check traffic statistics in a queue on an interface.
l Run the display qos configurationinterfaceinterface-type interface-numbercommand
to check all the QoS configuration on an interface.
----End
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
27
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
36/99
2.6 Maintaining Traffic Policing and Traffic Shaping
This section how to maintain traffic policing and traffic shaping, including displaying and
clearing traffic statistics.
2.6.1 Displaying Traffic Statistics
Context
To view flow-based traffic statistics, a traffic policy must exist and contain the traffic statistics
action.
Procedure
l Run the display traffic-policy statistics{ global[ slotslot-id] | interfaceinterface-type
interface-number| vlanvlan-id} { inbound| outbound} [ verbose{ classifier-base|
rule-base} [ classclassifier-name] ] command to check flow-based traffic statistics.
l Run the display qos car statisticsinterfaceinterface-type interface-numberinbound
command to check statistics on forwarded and discarded packets on a specified interface
configured with interface-based traffic policing.
l Run the display qos queue statisticsinterfaceinterface-type interface-numbercommand
to check traffic statistics in a queue on an interface.
----End
2.6.2 Clearing Traffic Statistics
Context
CAUTION
The cleared flow-based traffic statistics cannot be restored. Exercise caution when you use thereset command.
Procedure
l Run the reset qos car statisticsinterfaceinterface-type interface-numberinbound
command to clear statistics on forwarded and discarded packets on a specified interface
configured with interface-based traffic policing.
l Run the reset qos queue statisticsinterfaceinterface-type interface-numbercommand to
clear traffic statistics in a queue on an interface.
----End
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
28
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
37/99
2.7 Configuration Examples
This section provides several configuration examples of traffic policing and traffic shaping.
2.7.1 Example for Configuring Interface-based Traffic Policing
Networking Requirements
As shown in Figure 2-1, a tenant server sends traffic through SwitchA and Switch and accesses
the network through the egress router.
The tenant server requires the fixed bandwidth of 80 Mbit/s and the maximum bandwidth of 100
Mbit/s.
Figure 2-1Networking diagram for configuring interface-based traffic policing
Switch
Tenant Server
Network
10GE1/0/1
10GE1/0/2
Traffic Direction
SwitchA
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure interfaces on Switch so that users can access the network.
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
29
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
38/99
2. Create a CAR profile and set the CIR and PIR values.
3. Apply the CAR profile to 10GE1/0/1 on Switch in the inbound direction and limit the
interface bandwidth within the allowed range.
Procedure
Step 1 Create a VLAN and configure interfaces on Switch.
# Create VLAN 100 on Switch.
system-view[~HUAWEI] sysname Switch[~HUAWEI] commit[~Switch] vlan 100[~Switch-vlan100] quit[~Switch] commit
# Configure 10GE1/0/1 and 10GE1/0/2 on Switch as trunk interfaces and add them to VLAN
100.
[~Switch] interface 10ge 1/0/1[~Switch-10GE1/0/1]port link-type trunk[~Switch-10GE1/0/1]port trunk allow-pass vlan 100[~Switch-10GE1/0/1] quit[~Switch] interface 10ge 1/0/2[~Switch-10GE1/0/2]port link-type trunk[~Switch-10GE1/0/2]port trunk allow-pass vlan 100[~Switch-10GE1/0/2] quit[~Switch] commit
Step 2 Configure the CAR profile.
# Create CAR profile car1on Switch to limit traffic from the tenant server.
[~Switch] qos car car1 cir 81920 pir 102400[~Switch] commit
Step 3 Apply the CAR profile.
# Apply car1in the inbound direction of 10GE1/0/1 on Switch to limit traffic from the tenant
server.
[~Switch] interface 10ge 1/0/1[~Switch-10GE1/0/1] qos car inbound car1[~Switch-10GE1/0/1] quit[~Switch] commit
Step 4 Verify the configuration.
# View the CAR profile configuration.
[~Switch] display qos car car1 ----------------------------------------------------------------
CAR Name : car1 CAR Index : 0
car cir 81920 Kbps pir 102400 Kbps cbs 10240000 Bytes pbs 12800000 Bytes
Applied number on behavior : 0
Applied number on interface inbound : 1 10GE1/0/1
Applied number on trunk inbound : 0
# Send traffic to 10GE1/0/1 at the rates of 60000 kbit/s, 90000 kbit/s, and 110000 kbit/s, and
run the display qos car statisticscommand to check the QoS CAR statistics. If the configurationis successful, you can obtain the following results:
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
30
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
39/99
l When packets are sent to 10GE1/0/1 at the rate of 60000 kbit/s, all the packets are forwarded.
l When packets are sent to 10GE1/0/1 at the rate of 90000 kbit/s, all the packets are forwarded.
l When packets are sent to 10GE1/0/1 at the rate of 110000 kbit/s, some packets are discarded.
----End
Configuration Files
l Configuration file of Switch#sysname Switch
#
vlan batch 100#
qos car car1 cir 81920 kbps pir 102400 kbps
#
interface 10GE1/0/1port link-type trunk
port trunk allow-pass vlan 100
qos car inbound car1
#interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 100
#return
2.7.2 Example for Configuring Flow-based Traffic Policing
Networking Requirements
As shown in Figure 2-2, Tenant 1, Tenant 2, and Tenant 3 are connected to SwitchA andSwitch and access the network through the egress router. The server of Tenant 1 belongs to
VLAN 10, the server of Tenant 2 belongs to VLAN 20, and the server of Tenant 3 belongs to
VLAN 30.
The rate of traffic from users needs to be limited within a proper range on Switch. Table 2-3
describes details about required bandwidth of each tenant.
Table 2-3CAR values for traffic from each tenant
User CIR (kbit/s) PIR (kbit/s)
Tenant 1 204800 1024000
Tenant 2 409600 1228800
Tenant 3 819200 1433600
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
31
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
40/99
Figure 2-2Flow-based traffic policing
VLAN10
Network
SwitchSwitchA
10GE1/0/1
40GE1/0/1
VLAN20
VLAN30
10GE1/0/1
10GE1/0/2
10GE1/0/3
10GE1/0/4
Traffic Direction
Tenant1's
Server
Tenant2's
Server
Tenant3's
Server
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and configure interfaces on Switch so that the servers can access the
network.
2. Configure traffic classifiers on Switch to classify packets based on the VLAN ID.
3. Configure traffic behaviors on Switch to limit the rate of traffic from the servers.
4. Configure a traffic policy on Switch, bind the configured traffic behaviors and trafficclassifiers to the traffic policy, and apply the traffic policy to the inbound interface on
Switch.
Procedure
Step 1 Create VLANs and configure interfaces.
# Create VLAN 10, VLAN 20, and VLAN 30 on SwitchA.
system-view[~HUAWEI] sysname SwitchA[~HUAWEI] commit
[~SwitchA] vlan batch 10 20 30[~SwitchA] commit
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
32
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
41/99
# 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 Switch.
system-view[~HUAWEI] sysname Switch[~HUAWEI] commit[~Switch] vlan batch 10 20 30[~Switch] commit
# Configure 10GE1/0/1 and 40GE1/0/1 on Switch as trunk interfaces. Add both 10GE1/0/1 and
40GE1/0/1 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 40ge 1/0/1
[~Switch-40GE1/0/1]port link-type trunk[~Switch-40GE1/0/1]port trunk allow-pass vlan 10 20 30[~Switch-40GE1/0/1] quit[~Switch] commit
Step 2 Configure traffic classifiers.
# Configure traffic classifiers c1, c2, and c3on Switch to classify different service flows from
the servers based on the VLAN ID.
[~Switch] traffic classifier c1 type and[~Switch-classifier-c1] if-match vlan 10[~Switch-classifier-c1] quit[~Switch] traffic classifier c2 type and[~Switch-classifier-c2] if-match vlan 20
[~Switch-classifier-c2] quit[~Switch] traffic classifier c3 type and[~Switch-classifier-c3] if-match vlan 30[~Switch-classifier-c3] quit[~Switch] commit
Step 3 Configure traffic behaviors.
# Create traffic behaviors b1, b2, and b3on Switch to limit the rates of service flows.
[~Switch] traffic behavior b1[~Switch-behavior-b1] car cir 204800 pir 1024000 green pass[~Switch-behavior-b1] statistic enable[~Switch-behavior-b1] quit[~Switch] traffic behavior b2
[~Switch-behavior-b2] car cir 409600 pir 1228800 green pass[~Switch-behavior-b2] statistic enable
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
33
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
42/99
[~Switch-behavior-b2] quit[~Switch] traffic behavior b3[~Switch-behavior-b3] car cir 819200 pir 1433600 green pass[~Switch-behavior-b3] statistic enable[~Switch-behavior-b3] quit[~Switch] commit
Step 4 Configure a traffic policy and apply it to interfaces.
# Create a traffic policy p1on Switch, bind the traffic behaviors and traffic classifiers to p1, and
apply p1to 10GE1/0/1 in the inbound direction.
[~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
Step 5 Verify the configuration.
# View the traffic classifier configurations.
[~Switch] display traffic classifier Traffic Classifier Information:
Classifier: c1 Type: AND
Rule(s):
if-match vlan 10
Classifier: c2
Type: AND
Rule(s):
if-match vlan 20
Classifier: c3
Type: AND 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: AND
Behavior: b1 Statistic: enable
Committed Access Rate:
CIR 204800 (Kbps), PIR 1024000 (Kbps), CBS 25562500 (Bytes), PBS 128000000
(Bytes) Color Mode: color blind
Conform Action: pass
Yellow Action: pass Exceed Action: discard
Classifier: c2
Type: AND Behavior: b2
Statistic: enable
Committed Access Rate:
CIR 409600 (Kbps), PIR 1228800 (Kbps), CBS 51200000 (Bytes), PBS 153600000(Bytes)
CloudEngine 6800&5800 Series Switches
Configuration Guide - QoS 2 Traffic Policing and Traffic Shaping Configurations
Issue 04 (2013-07-10) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
34
-
8/12/2019 CloudEngine 6800&5800 V100R001C00 Configuration Guide - QoS 04.pdf
43/99
Color Mode: color blind
Conform Action: pass
Yellow Action: pass Exceed Action: discard
Classifier: c3
Type: AND Behavior: b3
Statistic: enable
Committed Access Rate:
CIR 819200 (Kbps), PIR 1433600 (Kbps), CBS 102400000 (Bytes), PBS 179200000(Bytes)
Color Mode: color blind
Conform Action: pass Yellow Action: pass
Exceed Action: discard
# View the traffic policy configuration on 10GE1/0/1.
[~Switch]