configuration guide - qos(v200r001c01_04)
TRANSCRIPT
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
1/110
Huawei AR1200-S Series Enterprise Routers
V200R001C01
Configuration Guide - QoS
Issue 04
Date 2012-01-06
HUAWEI TECHNOLOGIES CO., LTD.
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
2/110
Copyright © Huawei Technologies Co., Ltd. 2012. 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 the 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://www.huawei.com
Email: [email protected]
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
i
http://www.huawei.com/
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
3/110
About This Document
Intended Audience
This document describes the concepts and configuration procedures of QoS features on theAR1200-S, and provides the configuration examples.
This document provides guidance for configuring QoS features.
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 of risk, which if not
avoided, will result in death or serious injury.
WARNING
Indicates a hazard with a medium or low level of risk, whichif not avoided, could result in minor or moderate injury.
CAUTION
Indicates a potentially hazardous situation, which if not
avoided, could result in equipment damage, data loss,
performance degradation, or unexpected results.
TIP Indicates a tip that may help you solve a problem or save
time.
NOTE Provides additional information to emphasize or supplement
important points of the main text.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS About This Document
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
ii
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
4/110
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. Several items or no item can be selected.
& 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 contains
all updates made in previous issues.
Changes in Issue 04 (2012-01-06)
Based on issue 03 (2011-11-27), the document is updated as follows:
The following information is modified:
l 2.4.4 Configuring Re-marking
Changes in Issue 03 (2011-11-27)
Based on issue 02 (2011-10-15), the document is updated as follows:
The following information is modified:
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS About This Document
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
iii
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
5/110
l 2.4.5 Configuring Traffic Policing
Changes in Issue 02 (2011-10-15)
Based on issue 01 (2011-08-15), the document is updated as follows:
The following information is modified:
l 1.3.3 Setting the Default 802.1p Priority of an Interface
l 1.6.2 Configuring Queue-based Congestion Management
Changes in Issue 01 (2011-08-15)
Initial commercial release.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS About This Document
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
iv
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
6/110
Contents
About This Document.....................................................................................................................ii
1 QoS Configuration........................................................................................................................1
1.1 QoS Overview....................................................................................................................................................3
1.2 QoS Features Supported by the AR1200-S........................................................................................................31.3 Configuring Priority Mapping..........................................................................................................................12
1.3.1 Establishing the Configuration Task.......................................................................................................12
1.3.2 Conf iguring the Packet Priority Trusted by an Interface.........................................................................13
1.3.3 Setting the Default 802.1p Priority of an Interface..................................................................................13
1.3.4 Configuring a Priority Mapping Table....................................................................................................15
1.3.5 Checking the Configuration.....................................................................................................................15
1.4 Configuring Traffic Policing............................................................................................................................16
1.4.1 Establishing the Configuration Task.......................................................................................................16
1.4.2 Conf iguring Traffic Policing on an Interface..........................................................................................17
1.4.3 Configuring Flow-based Traffic Policing................................................................................................18
1.4.4 Checking the Configuration.....................................................................................................................18
1.5 Configuring Traffic Shaping............................................................................................................................19
1.5.1 Establishing the Configuration Task.......................................................................................................19
1.5.2 Conf iguring Interface-based Traffic Shaping..........................................................................................21
1.5.3 Configuring Queue-based Traffic Shaping..............................................................................................21
1.5.4 Configuring Flow-based Traffic Shaping................................................................................................22
1.5.5 Checking the Configuration.....................................................................................................................23
1.6 Configuring Congestion Management..............................................................................................................24
1.6.1 Establishing the Configuration Task.......................................................................................................251.6.2 Conf iguring Queue-based Congestion Management...............................................................................26
1.6.3 Configuring Class-based Congestion Management................................................................................28
1.6.4 Checking the Configuration.....................................................................................................................29
1.7 Configuring Congestion Avoidance.................................................................................................................30
1.7.1 Establishing the Configuration Task.......................................................................................................30
1.7.2 Configuring Queue-based WRED...........................................................................................................32
1.7.3 Configuring Flow-based WRED.............................................................................................................33
1.7.4 Checking the Configuration.....................................................................................................................35
1.8 Configuring HQoS............................................................................................................................................36
1.8.1 Establishing the Configuration Task.......................................................................................................36
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS Contents
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
v
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
7/110
1.8.2 Configuring a Traffic Policy....................................................................................................................38
1.8.2.1 Configuring a Sub Traffic Policy...................................................................................................38
1.8.2.2 Configuring a Traffic Policy...........................................................................................................39
1.8.2.3 Applying the Traffic Policy to an Interface....................................................................................40
1.8.3 (Optional) Configuring Traffic Policing on an Interface.........................................................................40
1.8.4 (Optional) Configuring Traffic Shaping on an Interface.........................................................................41
1.8.5 Checking the Configuration.....................................................................................................................41
1.9 Maintaining QoS...............................................................................................................................................42
1.9.1 Displaying the Queue-based Traffic Statistics........................................................................................42
1.9.2 Clearing the Queue-based Traffic Statistics............................................................................................42
1.10 Configur ation Examples.................................................................................................................................43
1.10.1 Example for Configuring Priority Mapping..........................................................................................43
1.10.2 Example for Configuring Traffic Policing............................................................................................46
1.10.3 Example for Configuring Traffic Shaping.............................................................................................52
1.10.4 Example for Configuring Congestion Avoidance and Congestion Management.................................55
1.10.5 Example for Configuring HQoS............................................................................................................62
2 Traffic Policy Configuration.....................................................................................................72
2.1 Traffic Policy Overview...................................................................................................................................73
2.2 Traffic Policy Features Supported by the AR1200-S.......................................................................................73
2.3 Configuring a Traffic Classifier.......................................................................................................................76
2.4 Configuring a Traffic Behavior........................................................................................................................78
2.4.1 Establishing the Configuration Task.......................................................................................................78
2.4.2 Configuring a Permit or Deny Action.....................................................................................................79
2.4.3 Configuring Redirection..........................................................................................................................80
2.4.4 Configuring Re-marking..........................................................................................................................81
2.4.5 Configuring Traffic Policing...................................................................................................................82
2.4.6 Configuring Traffic Shaping...................................................................................................................83
2.4.7 Configuring Congestion Management.....................................................................................................83
2.4.8 Configuring Congestion Avoidance........................................................................................................85
2.4.9 Binding a Sub Traffic Policy...................................................................................................................86
2.4.10 Configuring Traffic Statistics................................................................................................................88
2.4.11 Checking the Configuration...................................................................................................................882.5 Configuring a Traffic Policy.............................................................................................................................89
2.6 Maintaining a Traffic Policy.............................................................................................................................90
2.6.1 Displaying the Flow-based Traffic Statistics...........................................................................................90
2.6.2 Clearing the Flow-based Traffic Statistics..............................................................................................90
2.7 Configuration Examples...................................................................................................................................91
2.7.1 Example for Configuring Re-marking.....................................................................................................91
2.7.2 Example for Configuring Traffic Statistics.............................................................................................95
2.7.3 Example for Configuring Association Between NQA and Redirection..................................................98
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS Contents
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
vi
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
8/110
1 QoS ConfigurationAbout This Chapter
This chapter describes common QoS functions on interfaces of the AR1200-S: priority mapping,
traffic policing, traffic shaping, congestion management, congestion avoidance, and
Hierarchical Quality of Service (HQoS). It also provides configuration methods and examples.
1.1 QoS Overview
QoS is designed to provide differentiated services based on networking requirements.
1.2 QoS Features Supported by the AR1200-S
This section describes QoS features supported by the AR1200-S.
1.3 Configuring Priority Mapping
After priority mapping is configured, the AR1200-S determines the queues and output priorities
of the received packets based on packet priorities or the default 802.1p priority of the interface.
By doing this, the AR1200-S provides differentiated services.
1.4 Configuring Traffic Policing
The AR1200-S supports interface-based traffic policing and flow-based traffic policing.
1.5 Configuring Traffic Shaping
Traffic shaping enables outgoing traffic to be sent out at an even rate and reduces the number
of discarded packets whose rate exceeds the rate limit.
1.6 Configuring Congestion ManagementIf congestion occurs on a network after congestion management is configured, the AR1200-S
determines the sequence at which packets are forwarded according to the defined scheduling
policy.
1.7 Configuring Congestion Avoidance
After congestion avoidance is complete, the AR1200-S discards the packets whose rate exceeds
the rate limit based on the WRED configuration.
1.8 Configuring HQoS
To provide differentiated QoS services, configure HQoS on the AR1200-S.
1.9 Maintaining QoS
This section describes how to maintain QoS.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
1
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
9/110
1.10 Configuration Examples
This section provides several configuration examples of traffic policing, traffic shaping,
congestion avoidance, and congestion management.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
10/110
1.1 QoS Overview
QoS is designed to provide differentiated services based on networking requirements.
QoS evaluates the capabilities of the service supplied to meet customer requirements. On the
Internet, QoS is used to evaluate capabilities of a network to transmit packets. The network
provides various services, and QoS evaluates services from different aspects. Generally, QoS
evaluates core items, including the delay, jitter, and packet loss ratio during packet transmission.
QoS uses the following models:
l Best-Effort (BE) model: The BE model is a service model that handles all packets equally.
In the BE model, a network attempts to send packets, but cannot ensure performance such
as delay and reliability. The BE model can be applied to various network applications, such
as FTP and email. The BE model can be implemented using the First in First out (FIFO)
queue.l IntServ model: The IntServ model is an integrated service model. A device must submit a
request to a network before sending packets. Combined with multicast, the IntServ model
can be used in real-time multimedia applications that require high bandwidth and low delay,
such as video conference and video on demand (VoD).
l DiffServ model: The DiffServ model is a multi-service model and can meet different QoS
requirements, which ensures that applications are provided with differentiated QoS levels.
QoS can be s pecified based on various information, such as the IP precedence, source
address, and destination address of packets. Network devices perform traffic classification,
traffic shaping, traffic policing, and queue scheduling based on the information.
1.2 QoS Features Supported by the AR1200-S
This section describes QoS features supported by the AR1200-S.
The AR1200-S supports the following functions:
l Priority Mapping
l Traffic Policing
l Traffic Shaping
l Congestion Avoidance
l Congestion Management
l HQoS
Table 1-1 Implementation of QoS features
Feature Implementation
Traffic policing Interface-based traffic policing can be
applied to inbound and outbound WAN-side
interfaces, but can only be applied to inbound
LAN-side interfaces.
Flow-based traffic policing can be applied to
inbound and outbound interfaces.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
11/110
Feature Implementation
Traffic shaping Interface-based traffic shaping can only be
applied to outbound interfaces.
Queue-based traffic shaping can only beapplied to outbound interfaces.
Flow-based traffic shaping can only be
applied to outbound WAN-side interfaces.
Congestion avoidance Queue-based congestion avoidance can only
be applied to outbound WAN-side interfaces.
Flow-based congestion avoidance can only
be applied to outbound WAN-side interfaces.
Congestion management Queue-based congestion management can
only be applied to outbound interfaces.
Class-based congestion management can
only be applied to outbound WAN-side
interfaces.
HQoS Flow-based hierarchical QoS (HQoS) can
only be applied to outbound WAN-side
interfaces.
Priority Mapping
Different packets carry different precedence fields. For example, VLAN packets carry the 802.1p
field, IP packets carry the DSCP field. The mappings between priority fields must be configured
on gateways to retain priorities of packets when the packets traverse different networks.
To ensure QoS for different packets, the AR1200-S determines the queues that received packets
enter based on 802.1p priorities or DSCP priorities in packets or the default 802.1p priority of
an interface. The AR1200-S can re-mark packet priorities so that the connected device can
provide differentiated QoS based on precedence fields of the packets.
The AR1200-S sends packets to different interface queues based on the 802.1p priority, and
performs traffic shaping, congestion avoidance, and queue scheduling for the queues. FE
interfaces on the SRU of the AR1200-S support only four queues, whereas other interfaces
support eight queues. The mappings between local priorities and queues on FE interfaces on theSRU of the AR1200-S are different. Table 1-2 lists the mappings between 802.1p priorities and
queues on FE interfaces of the SRU on the AR1200-S. Table 1-3 lists the mappings between
802.1p priorities and queues on other interfaces.
Table 1-2 Mappings between 802.1p priorities and queues
802.1p Priority Queue Index
0 0
1 0
2 1
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
12/110
802.1p Priority Queue Index
3 1
4 2
5 2
6 3
7 3
Table 1-3 Mappings between 802.1p priorities and queues
802.1p Priority Queue Index
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
Traffic Policing
Traffic policing limits the traffic and resource usage by monitoring the rate limit.
Traffic policing discards the excess traffic to limit traffic within a proper range and to protect
network resources.
Traffic policing limits the traffic entering the Internet Service Provider (ISP).
l Token bucket and traffic measurement
The AR1200-S needs to determine whether the traffic rate exceeds the rate limit before
performing traffic policing. Token buckets are usually used to measure traffic.
With a certain capacity, a token bucket stores tokens. The system places tokens into a token
bucket at the configured rate (one token occupies one bit). If the token bucket is full, excess
tokens overflow and no token is added.
When measuring traffic, a token bucket forwards packets based on the number of tokens
in the token bucket. If there are enough tokens in the token bucket for forwarding packets,
the traffic rate is within the rate limit. Otherwise, the traffic rate is not within the rate limit.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
13/110
Figure 1-1 Measuring traffic using token buckets
Packets sent by the
interface Continue to send
packets
Token
bucket
Put tokens into the bucket at the
specified rate
Classification
Drop
The AR1200-S supports dual token bucket technology:
The dual token bucket technology uses the following parameters:
– Committed Burst Size (CBS): capacity of bucket C, that is, the maximum volume of
burst traffic (in bytes) allowed by bucket C each time.
–
Committed Information Rate (CIR): rate at which tokens are put into bucket C, that is,the average rate of traffic (in kbit/s) allowed by bucket C.
– Peak Burst Size (PBS): capacity of bucket P, that is, the maximum volume of burst
traffic (in bytes) allowed by bucket P each time.
– Peak Information Rate (PIR): rate at which tokens are put into bucket P, that is, the
average rate of traffic (in kbit/s) allowed by bucket P.
When dual token buckets are used, the packets whose rate is less than the CIR value are
colored green, the packets whose rate is greater than the PIR value are colored red, and the
packets whose rate is greater than the CIR value, but less than the PIR value are colored
yellow.
Traffic policing actions include permit, deny, and forward after a priority change. By
default, green packets and yellow packets are allowed to pass through, and red packets arediscarded.
l Traffic policing features supported by the AR1200-S
The AR1200-S supports the following traffic policing features:
– Interface-based traffic policing limits all the incoming or outgoing service traffic on an
interface.
– Flow-based traffic policing limits incoming or outgoing service traffic matching traffic
classification rules.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
14/110
Traffic Shaping
Traffic shaping also limits traffic and resource usage by monitoring the rate limit. It also uses
the token bucket technology to measure traffic.
Traffic shaping adjusts the speed of outgoing traffic so that the downstream device hascapabilities to process traffic.
l Differences between traffic shaping and traffic policing
Traffic policing directly discards the excess packets. Traffic shaping buffers the packets
whose rate is greater than the traffic shaping rate in queues; therefore, traffic shaping
reduces the number of discarded packets. As shown in Figure 1-2, when there are sufficient
tokens in the token bucket, the buffered packets are forwarded at an even rate. If the tokens
are insufficient, packets are buffered continuously. If the number of packets to be buffered
is greater than the queue length, excess packets are discarded.
Figure 1-2 Traffic shaping
Packets sent by the
interface
Flows
Token
bucket
Put tokens into
token bucket at
specified rateSimple traffic
classification
Packets
within the
rate limit
Packets not
within the rate
limit
Token
Buffer
packets in
queues
Discarded
packets when
the token bucket
is full
Packets that do
not need to be
shaped
Packets that
need to be
shaped
Traffic shaping increases the delay because it buffers packets in queues, whereas traffic
policing does not.
l Traffic shaping features supported by the AR1200-S
The AR1200-S supports the following traffic shaping features:
– Traffic shaping on an interface or a sub-interface
Traffic shaping is performed for all the packets that pass through an interface or a sub-
interface.
– Queue-based traffic shaping
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
15/110
Traffic shaping is performed for packets in a specified queue on an interface so that
packets are shaped based on priorities.
– Flow-based traffic shaping
Traffic shaping is performed for packets of a specified type that pass through an interface
so that packets matching traffic classification rules can be shaped.
Congestion Avoidance
Congestion avoidance is a flow control mechanism. A system configured with congestion
avoidance monitors network resources such as queues and memory buffers. When congestion
occurs or aggravates, the system discards packets.
Congestion avoidance policies include tail drop, Random Early Detection (RED), and Weighted
Random Early Detection (WRED):
l Tail drop
The traditional packet loss policy uses the tail drop method. This method processes all packets equally without classifying the packets into different types. When congestion
occurs, packets at the end of a queue are discarded until the congestion problem is solved.
This policy leads to global TCP synchronization. When packets of multiple TCP
connections are discarded simultaneously, these TCP connections enter the congestion
avoidance and slow start state. After a while, the peak of these TCP connections occurs.
The volume of traffic varies greatly, affecting link usage.
l RED
The RED technique randomly discards packets to prevent the transmission speed of
multiple TCP connections from being reduced simultaneously.
As specified by the RED algorithm, the upper drop threshold and lower drop threshold are
set. RED processes packets as follows:
– When the queue length is shorter than the lower drop threshold, no packet is discarded.
– When the queue length is longer than the upper drop threshold, all packets are discarded.
– When the queue length is between the lower drop threshold and the upper drop threshold,
incoming packets are discarded randomly. RED generates a random number for each
incoming packet and compares it with the drop probability of the current queue. If the
random number is greater than the drop probability, the packet is discarded. A longer
queue indicates a higher drop probability.
l WRED
WRED also discards packets randomly to prevent global TCP synchronization. WRED,
however, generates random numbers of packets based on packet priorities. WRED discards packets based on packet priorities, so the drop probability of packets with higher priorities
is low.
By default, the AR1200-S uses tail drop. The AR1200-S supports queue-based WRED and flow-
based RED.
Congestion Management
If a network transmitting both delay-sensitive and delay-insensitive services is congested
intermittently, congestion management is required. However, if a network is always congested,
bandwidth needs to be increased.
Generally, the AR1200-S uses the following queue scheduling mechanisms:
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
16/110
l PQ scheduling
l WRR scheduling
l DRR scheduling
l WFQ scheduling
l PQ+WRR/PQ+DRR/PQ+WFQ scheduling
l CBQ scheduling
l PQ scheduling
Priority queuing (PQ) schedules packets in descending order of priorities. Queues with
lower priories are processed only after all the queues with higher priorities have been
processed.
By using PQ scheduling, the AR1200-S puts packets of delay-sensitive services into queues
with higher priorities and packets of other services into queues with lower priorities. In this
manner, packets of key services can be transmitted first.
PQ scheduling has a disadvantage. If a lot of packets exist in queues with higher prioritieswhen congestion occurs, packets in queues with lower priorities cannot be transmitted for
a long time.
l WRR scheduling
Weighted Round Robin (WRR) scheduling ensures that packets in all the queues are
scheduled in turn.
For example, eight queues are configured on an interface. Each queue is configured with
a weight: w7, w6, w5, w4, w3, w2, w1, and w0. The weight value represents the percentage
of obtaining resources. The following scenario assumes that the weights of queues on the
100M interface are 50, 50, 30, 30, 10, 10, 10, and 10, which match w7, w6, w5, w4, w3,
w2, w1, and w0. Therefore, the queue with the lowest priority can obtain at least 5 Mbit/s
bandwidth. This ensures that packets in all the queues can be scheduled.
In addition, WRR can dynamically change the time of scheduling packets in queues. For
example, if a queue is empty, WRR ignores this queue and starts to schedule the next queue.
This ensures efficient use of bandwidth.
WRR scheduling has two disadvantages:
– WRR schedules packets based on the number of packets. When the average packet
length in each queue is the same or known, you can obtain the required bandwidth by
setting WRR weight values. When the average packet length in each queue is variable,
you cannot obtain the required bandwidth by setting WRR weight values.
– Delay-sensitive services, such as voice services, cannot be scheduled in a timely
manner.
l DRR scheduling
Implementation of Deficit Round Robin (DRR) is similar to that of WRR.
The difference between DRR and WRR is as follows: WRR schedules packets based on
the number of packets, whereas DRR schedules packets based on the packet length. If the
packet length is too long, DRR allows the negative weight value so that long packets can
be scheduled. In the next round, the queue with the negative weight value is not scheduled
until its weight value becomes positive.
DRR offsets the disadvantages of PQ scheduling and WRR scheduling. That is, in PQ
scheduling, packets in queues with lower priorities cannot be scheduled for a long time; in
WRR scheduling, bandwidth is allocated improperly when the packet length of each queueis different or variable.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
17/110
DRR cannot schedule delay-sensitive services such as voice services in time.
l WFQ scheduling
Fair Queue (FQ) ensures that network resources are allocated evenly to optimize the delay
and jitter of all flows. Weighted FQ (WFQ) schedules packets based on priorities, and
schedules more packets with higher priorities than packets with lower priorities.WFQ can automatically classify flows based on the session information, including the
protocol type, source and destination TCP or UDP port numbers, source and destination IP
addresses, and precedence field in the ToS field. In addition, WFQ provides a large number
of queues and evenly puts flows into queues to smooth out the delay. When flows leave
queues, WFQ allocates the bandwidth on the outbound interface for each flow based on
the precedence of each flow. Flows with the lowest priorities obtain the least bandwidth.
l PQ+WRR/PQ+DRR/PQ+WFQ scheduling
PQ, WRR, DRR, and WFQ have their own advantages and disadvantages. If only PQ
scheduling is used, packets in queues with lower priorities cannot obtain bandwidth. If only
WRR, DRR, or WFQ scheduling is used, delay-sensitive services cannot be scheduled in
time. PQ+WRR, PQ+DRR, or PQ+WFQ scheduling integrates the advantages of PQscheduling and WRR or DWRR scheduling and offsets their disadvantages.
By using PQ+WRR, PQ+DRR, or PQ+WFQ scheduling, the AR1200-S puts important
packets, such as protocol packets and packets of delay-sensitive services to the PQ queue,
and allocates bandwidth to the PQ queue. Then the AR1200-S can put other packets into
WRR, DRR, or WFQ queues based on the packet priority. Packets in WRR, DRR, or WFQ
queues can be scheduled in turn.
l CBQ scheduling
Class-based queueing (CBQ) is an extension of WFQ and matches packets with traffic
classifiers. CBQ classifies packets based on the IP precedence or DSCP priority, inbound
interface, or 5-tuple (protocol type, source IP address and mask, destination IP address and
mask, source port range, and destination port range). Then CBQ puts packets into differentqueues. If packets do not match any configured traffic classifiers, CBQ matches packets
with the default traffic classifier.
CBQ provides the following types of queues:
– Expedited Forwarding (EF) queues are applied to short-delay services.
An EF queue has the highest priority. You can put one or more types of packets into EF
queues and set different bandwidth for different types of packets. During scheduling, if
EF queues have packets, packets in EF queues are sent first. Packets in other queues are
sent only after EF queues are empty or the maximum reservable bandwidth of EF queues
is exceeded.
UDP packets of VoIP services often exist in EF queues; therefore, use the tail drop
method but not WRED.
– Assured Forwarding (AF) queues are applied to key data services that require assured
bandwidth.
Each AF queue corresponds to one type of packets. You can set bandwidth for each
type of packets. During scheduling, the system sends packets based on the configured
bandwidth. AF implements fair scheduling. If an interface has remaining bandwidth,
packets in AF queues obtain the remaining bandwidth based on weights. When
congestion occurs, each type of packets can obtain the minimum bandwidth.
If the length of an AF queue reaches the maximum value, the tail drop method is used
by default. You can choose to use WRED.
–
Best-Effort (BE) queues are applied to best-effort services that require no strict QoSassurance.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
18/110
If packets do not match any configured traffic classifiers, packets match the default
traffic classifier defined by the system. You are allowed to configure AF queues and
bandwidth for the default traffic classifier, whereas BE queues are configured in most
situations. BE uses WFQ scheduling so that the system schedules packets matching the
default traffic classifier based on flows.
If the length of a BE queue reaches the maximum value, the tail drop method is used
by default. You can choose to use WRED.
HQoS
The traditional QoS technology schedules packets based on interfaces. An interface, however,
can identify only priorities of different services but cannot identify services of different users.
Packets of the same priority are placed into the same queue on an interface, and compete for the
same queue resource. Therefore, the traditional QoS technology is unable to provide
differentiated services based on types of traffic and users.
As the number of users increases continuously and services develop, users require differentiated
services to have better QoS and gain more profits. Hierarchical QoS (HQoS) implements
hierarchical scheduling based on queues and differentiates services and users. It provides QoS
guarantee and saves network operation and maintenance costs.
l Queues supported by HQoS
The AR1200-S supports three levels of queues, that is, level-3 flow queue (FQ), level-2
subscriber queue (SQ), and level-1 port queue (PQ). The HQoS hierarchy is a tree structure.
The flow queue is taken as the leaf node and the port queue is taken as the root node. When
packets pass through an interface using HQoS, the packets are classified so that they
traverse the branches of the tree. Packets arrive at the top of the tree and are classified on
one of the leaves. Packets then traverse down the tree until they are transmitted out the
interface at the root.l HQoS implementation
HQoS is implemented by traffic policy nesting supported by the AR1200-S.
A traffic policy can be nested into another traffic policy. That is, the traffic behavior or
action in a traffic policy is a sub traffic policy. When a sub traffic policy is bound to a traffic
policy, the traffic behavior in the traffic policy is taken for packets matching the traffic
classifier associated with the traffic behavior. Then the packets are classified by the sub
traffic policy and the traffic behavior in the sub traffic policy is taken for the classified
packets.
A traffic classifier in the traffic policy differentiates users by using VLAN IDs, PVC
information, and DLCI numbers. That is, the packets that match the traffic classifier in the
traffic policy enter the same subscriber queue.The traffic classifier in a sub traffic policy differentiates services. That is, the packets that
match the traffic classifier in the sub traffic policy enter the same flow queue.
l HQoS scheduling
HQoS implements hierarchical scheduling and provides good service support. Scheduler
levels are relevant to the topology.
The AR1200-S provides three levels of schedulers, that is, flow queue scheduler, subscriber
queue scheduler, and port queue scheduler. The flow queue scheduler and subscriber queue
scheduler support PQ scheduling, WFQ scheduling, and PQ+WFQ scheduling. The port
queue scheduler uses RR scheduling.
HQoS deployment for enterprise users is used as an example. Enterprise users have VoIPservices, video conference (VC) services, and data services. Each subscriber queue
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
19/110
corresponds to one enterprise user and each flow queue corresponds to a type of services.
By deploying HQoS, the AR1200-S implements the following functions:
– Controlling traffic scheduling among the three types of services of a single enterprise
user
– Controlling total bandwidth of the three types of services of a single enterprise user
– Controlling bandwidth allocation between multiple enterprise users
– Controlling total bandwidth of multiple enterprise users
1.3 Configuring Priority Mapping
After priority mapping is configured, the AR1200-S determines the queues and output priorities
of the received packets based on packet priorities or the default 802.1p priority of the interface.
By doing this, the AR1200-S provides differentiated services.
1.3.1 Establishing the Configuration Task
Before configuring priority mapping, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
The AR1200-S can determine the queues that packets enter based on packet priorities (802.1p/
DSCP priorities) or the priority of an interface. The AR1200-S can re-mark packet priorities so
that the connected device can provide differentiated QoS based on precedence fields of the
packets.
l When the AR1200-S is configured to trust DSCP priorities of packets, it maps DSCP
priorities to 802.1p priorities based on priority mapping. The AR1200-S also determines
the queues that packets enter, and re-marks packet priorities.
l When the AR1200-S is configured to trust 802.1p priorities of packets or uses the priority
of an interface, it determines the queues that packets enter based on the 802.1p priority and
re-marks packet priorities.
Pre-configuration Tasks
Before configuring priority mapping, complete the following tasks:l Configuring link layer attributes of interfaces to ensure that these interfaces work properly
l Configuring IP addresses and routing protocols for interfaces to ensure connectivity
Data Preparation
To configure priority mapping, you need the following data.
No. Data
1 Types and numbers of interfaces
2 Priority of an interface
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
12
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
20/110
No. Data
3 Packet priority trusted by an interface
4 Input priority and output priority
1.3.2 Configuring the Packet Priority Trusted by an Interface
After an interface is configured to trust the priority of packets, the AR1200-S performs mapping
based on the specified priority.
Context
The AR1200-S trusts the following priorities:
l 802.1p priority
– The AR1200-S determines the queues that tagged packets enter based on 802.1p
priorities in the tagged packets and modifies packet priorities.
– The AR1200-S determines the queues that untagged packets enter based on the default
802.1p priority of an interface and modifies packet priorities.
l DSCP priority
The AR1200-S maps DSCP priorities of packets to 802.1p priorities, determines the queues
that packets enter, and modifies packet priorities based on the priority mapping table.
l Priority of an interface
The AR1200-S determines the queues that packets enter based on the priority of the
interface, and modifies packet priorities based on the priority mapping table.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:interface interface-type interface-number [.subinterface-number ]
The interface view or sub-interface view is displayed.
Step 3 Run:trust { 8021p | dscp } [ override ]
The packet priority trusted by the interface is configured.
By default, the priority of an interface is used.
----End
1.3.3 Setting the Default 802.1p Priority of an Interface
The default 802.1p priority of an interface can be set. By default, the default 802.1p priority of an interface is 0.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
13
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
21/110
Context
The 802.1p priority is determined by the 3-bit priority field contained in a VLAN tag. The 802.1p
priority is used to provide differentiated services.
The default 802.1p priority of an interface is used in the following situations presented in thefollowing table.
Interface Configuration Whether a ReceivedPacket Carries a VLANTag
Processing Method
Default configuration (the
priority of an interface is
used)
No The AR1200-S searches for
the mapping table between
802.1p priorities and other
priorities based on the
priority of an interface,
modifies the packet priority,
and send the packet to a
queue based on the modified
802.1p priority.
Default configuration (the
priority of an interface is
used)
Yes The AR1200-S searches for
the mapping table between
802.1p priorities and other
priorities based on the
priority of an interface,
modifies the packet priority,
and sends the packet to a
queue based on the modified
802.1p priority.
trust 8021p override No The AR1200-S searches for
the mapping table between
802.1p priorities and other
priorities based on the
priority of an interface,
modifies the packet priority,
and sends the packet to a
queue based on the 802.1p
priority.
trust 8021p No The AR1200-S searches for the mapping table between
802.1p priorities and other
priorities based on the
priority of an interface,
modifies the packet priority,
and sends the packet to a
queue based on the 802.1p
priority.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
14
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
22/110
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:interface interface-type interface-number
The interface view is displayed.
Step 3 Run: port priority priority-value
The priority of the interface is set.
By default, the priority of an interface is 0.
----End
1.3.4 Configuring a Priority Mapping Table
A priority mapping table includes mappings between 802.1p priorities, DSCP priorities.
Context
The AR1200-S performs priority mapping based on packet priorities or the default priority of
an interface. Mappings between priorities can be configured in the priority mapping table.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:qos map-table { dot1p-dot1p | dot1p-dscp | dscp-dot1p | dscp-dscp }
The priority mapping table view is displayed.
Step 3 Run:input { input-value1 [ to input-value2 ] } & output output-value
Mappings are configured in the priority mapping table.
----End
1.3.5 Checking the Configuration
After priority mapping is configured, you can view global priority mapping.
Prerequisite
All the priority mapping configurations are complete.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
15
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
23/110
Procedure
l Run the display qos map-table [ dot1p-dot1p | dot1p-dscp | dscp-dot1p | dscp-dscp ]
command to view the priority mapping.
----End
1.4 Configuring Traffic Policing
The AR1200-S supports interface-based traffic policing and flow-based traffic policing.
1.4.1 Establishing the Configuration Task
Before configuring traffic policing, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
A network is congested if traffic sent by users is not limited. To make use of limited network
resources, limit the user traffic.
l Interface-based traffic policing limits all the incoming or outgoing service traffic on an
interface.
l Flow-based traffic policing limits incoming or outgoing service traffic matching traffic
classification rules.
Pre-configuration Tasks
Before configuring traffic policing, complete the following tasks:
l Configuring link layer attributes of interfaces to ensure that these interfaces work properly
l Configuring IP addresses and routing protocols for interfaces to ensure connectivity
Data Preparation
To configure interface-based traffic policing, you need the following data.
No. Data1 Interface and direction to which the traffic policy is applied
2 CIR value and optional parameters including the PIR value, CBS value, PBS value,
color, and coloring mode
To configure flow-based traffic policing, you need the following data.
No. Data
1 Traffic classifier name and related parameters
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
16
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
24/110
No. Data
2 Traffic behavior name and committed access rate (CAR) parameters: CIR value and
optional parameters including the PIR value, CBS value, PBS value, color, and
coloring mode
3 Traffic policy name and interface and direction to which the traffic policy is applied
1.4.2 Configuring Traffic Policing on an Interface
You can configure CAR on an interface in the inbound or outbound direction to limit the rate
of incoming or outgoing traffic on the interface.
Context
To limit all the incoming or outgoing traffic on an interface, configure traffic policing on the
interface. If the rate of received or sent packets exceeds the rate limit, packets are discarded.
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:interface interface-type interface-number [.subinterface-number ]
The interface view or sub-interface view is displayed.
Step 3 Run the following commands as required.
l On the WAN side, run:
qos car { inbound | outbound } cir cir-value [ pir pir-value ] [ cbs cbs-value
pbs pbs-value ] [ green { discard | pass [ remark-8021p 8021p-value | remark-
dscp dscp-value ] } ] [ yellow { discard | pass [ remark-8021p 8021p-value |
remark-dscp dscp-value ] } ] [ red { discard | pass [ remark-8021p 8021p-value
| remark-dscp dscp-value ] } ]
Traffic policing is configured on the WAN-side interface.
By default, traffic policing is not performed on an interface.
NOTE
If the CBS and PBS values are not specified, their values are determined as follows:
l If the PIR value is not set or the PIR and CIR values are the same, the CBS value is 188 times the
CIR value and the PBS value is 313 times the CIR value.
l If the PIR value is set and the PIR and CIR values are different, the CBS value is 125 times the
CIR value and the PBS value is 125 times the PIR value.
When the CBS value is less than the number of bytes in a single packet of a service, packets of the
service are discarded.
l On the LAN side, run:
qos car inbound cir cir-value
Traffic policing is configured on the LAN-side interface.
By default, traffic policing is not performed on an interface.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
17
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
25/110
NOTE
LAN-side interfaces on the AR1200-S support only traffic policing in the inbound direction.
----End
1.4.3 Configuring Flow-based Traffic Policing
After traffic policing is configured in a traffic policy, the traffic policy can be applied to multiple
interfaces to limit the rate of incoming or outgoing traffic on the interfaces.
Context
To limit the rate of incoming or outgoing traffic matching traffic classification rules, configure
flow-based traffic policing. A traffic policy can be applied to multiple interfaces. When the
traffic rate exceeds the rate limit, traffic is discarded. Flow-based traffic policing can implement
differentiated services using complex traffic classification.
Procedure
Step 1 Configure a traffic classifier.
The AR1200-S can classify traffic according to the ACL, Layer 2 information in packets, and
Layer 3 information in packets. Configure a traffic classifier by selecting appropriate traffic
classification rules. For details, see 2.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
2.4.5 Configuring Traffic Policing.
Step 3 Configure a traffic policy.
Create a traffic policy, associate the traffic classifier and traffic behavior with the traffic policy,
and apply the traffic policy to an interface. For details, see 2.5 Configuring a Traffic Policy.
----End
1.4.4 Checking the Configuration
After traffic policing is configured, you can view the rate limit.
Prerequisite
All the traffic policing configurations are complete.
Procedure
l Checking the interface-based traffic policing configuration
Run the display this command in the interface view to check the traffic policing
configuration on the interface.
l Checking the flow-based traffic policing configuration
–
Run the display traffic behavior { system-defined | user-defined } [ behavior-name ] command to check the traffic behavior configuration.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
18
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
26/110
– Run the display traffic classifier { system-defined | user-defined } [ classifier-
name ] command to check the traffic classifier configuration.
– Run the display traffic policy user-defined [ policy-name [ classifier classifier-
name ] ] command to check the traffic policy configuration.
– Run the display traffic-policy policy-name applied-record command to check thespecified traffic policy record.
----End
Example
l Checking the interface-based traffic policing configuration
Run the display this command to check the traffic policing configuration on the interface.
[Huawei-Ethernet0/0/0] display
this
#
interface Ethernet0/0/0
qos car inbound cir
2000
#
return
l Checking the flow-based traffic policing configuration
For details, see 2.3 Configuring a Traffic Classifier, 2.4.11 Checking the
Configuration, and 2.5 Configuring a Traffic Policy.
1.5 Configuring Traffic Shaping
Traffic shaping enables outgoing traffic to be sent out at an even rate and reduces the number
of discarded packets whose rate exceeds the rate limit.
1.5.1 Establishing the Configuration Task
Before configuring traffic shaping, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
If the bandwidth on the upstream network is different from the bandwidth on the downstream
network, configure traffic shaping on the outbound interface that connects the upstream network to the downstream network. Traffic shaping ensures that the rate of packets destined for the
downstream network does not exceed the bandwidth of the downstream network, reducing
congestion and packet loss. The AR1200-S supports the following types of traffic shaping:
l Interface-based traffic shaping: shapes all the service traffic on an interface so that the
service traffic can be sent out at an even rate.
l Queue-based traffic shaping: sets different rate limits for queues with different priorities
on an interface.
l Flow-based traffic shaping: sets different rate limits for different types of traffic matching
traffic configuration rules on an interface.
You can configure one or two types of traffic shaping on an interface, but queue-based trafficshaping and flow-based traffic shaping cannot be configured on the same interface.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
19
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
27/110
NOTE
Queue-based traffic shaping and flow-based traffic shaping cannot be configured simultaneously.
If both interface-based traffic shaping and queue-based traffic shaping are configured on an interface, the
CIR value of interface-based traffic shaping cannot be less than the sum of CIR values of all the queues
on the interface; otherwise, the traffic shaping result may be incorrect. For example, packets in queues withhigher priorities are not scheduled in a timely manner.
If both interface-based traffic shaping and flow-based traffic shaping are configured on an interface, the
CIR value of interface-based traffic shaping cannot be less than the sum of CIR values of all the flows on
the interface; otherwise, the traffic shaping result may be incorrect. For example, packets in queues with
higher priorities are not scheduled in a timely manner.
Traffic shaping can be configured on the logical interface, including the dialer interface, MP-Group
interface, virtual template interface, virtual Ethernet interface, tunnel interface, or the physical interface
corresponding to the virtual interface. If traffic shaping, congestion management, congestion avoidance,
or a combination of them is configured on the virtual interface, the configuration on the virtual interface
takes effect. The configuration on the physical interface, however, does not take effect.
Pre-configuration TasksBefore configuring traffic shaping, complete the following tasks:
l Configuring link layer attributes of interfaces to ensure that these interfaces work properly
l Configuring IP addresses and routing protocols for interfaces to ensure connectivity
Data Preparation
To configure interface-based traffic shaping, you need the following data.
No. Data
1 Interface to which traffic shaping is applied
2 CIR value and (optional) CBS value
To configure queue-based traffic shaping, you need the following data.
No. Data
1 Number of the interface and index of the queue to which traffic shaping is applied
2 Queue profile name
3 CIR value and (optional) CBS value
4 Number of the interface to which a queue profile is applied
To configure flow-based traffic policing, you need the following data.
No. Data
1 Traffic classifier name and related parameters
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
20
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
28/110
No. Data
2 Traffic behavior name, and CIR value and optional parameters including the PIR
value, PBS value, and queue length
3 Traffic policy name and interface to which the traffic policy is applied
1.5.2 Configuring Interface-based Traffic Shaping
You can configure traffic shaping on an interface to limit the rate of data sent by the interface.
Context
To limit all the outgoing traffic on an interface, configure traffic shaping on the interface. Traffic
shaping buffers the packets whose rate is greater than the traffic shaping rate. When there are
sufficient tokens in the token bucket, the buffered packets are forwarded at an even rate. If queues
are full, packets are discarded.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:interface interface-type interface-number [.subinterface-number ]
The interface view or sub-interface view is displayed.
Step 3 Run:
qos gts cir cir-value [ cbs cbs-value ]
Traffic shaping is configured.
By default, traffic shaping is not performed on an interface. When you configure traffic shaping
on an interface without specifying the CBS value, the CBS value is 25 times the CIR value.
----End
1.5.3 Configuring Queue-based Traffic Shaping
This section describes how to configure a queue profile, set traffic shaping parameters, and apply
a traffic shaping profile to an interface.
Context
To shape packets in each queue on an interface, configure a queue profile and apply it to the
interface. The received packets enter different queues based on priority mapping. Differentiated
services are provided by setting different traffic shaping parameters for queues with different priorities.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
21
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
29/110
Procedure
Step 1 Run:system-view
The system view is displayed.
Step 2 Run:qos queue-profile queue-profile-name
A queue profile is created and the queue profile view is displayed.
Step 3 Run:queue { start-queue-index [ to end-queue-index ] } & length { bytes bytes-
value | packets packets-value }*
The length of each queue is set.
By default, the length of a queue using PQ on the WAN side is 40960 bytes; the length of a
queue using WFQ on the WAN side is 131072 bytes; the length of a queue using PQ, DRR, or WRR on the LAN side is 5120 bytes.
NOTE
The FE interface on the AR1200-S SRU does not support the queue length command.
Step 4 Run:queue { start-queue-index [ to end-queue-index ] } & gts cir cir-value [ cbs
cbs-value ]
Queue-based traffic shaping is configured.
By default, traffic shaping is not performed for queues. When you configure traffic shaping on
an interface without specifying the CBS value, the CBS value is 25 times the CIR value.
Step 5 Run:quit
Exit from the queue profile view.
Step 6 Run:interface interface-type interface-number [.subinterface-number ]
The interface view or sub-interface view is displayed.
Step 7 Run:qos queue-profile queue-profile-name
The queue profile is applied to the interface or sub-interface.
----End
1.5.4 Configuring Flow-based Traffic Shaping
After traffic shaping is configured in a traffic policy, the traffic policy can be applied to multiple
interfaces to limit the rate of traffic of a specified type on the interfaces.
Context
To limit all the outgoing traffic of a specified type on an interface, configure flow-based trafficshaping. A traffic policy can be applied to different interfaces. When the rate of packets matching
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
22
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
30/110
the traffic policy exceeds the rate limit, traffic shaping buffers the excess packets. When there
are sufficient tokens in the token bucket, the buffered packets are forwarded at an even rate.
When the token bucket is full, the packets are discarded. Flow-based traffic shaping can
implement differentiated services using complex traffic classification.
Procedure
Step 1 Configure a traffic classifier.
The AR1200-S can classify traffic according to the ACL, Layer 2 information in packets, and
Layer 3 information in packets. Configure a traffic classifier by selecting appropriate traffic
classification rules. For details, see 2.3 Configuring a Traffic Classifier.
Step 2 Configure a traffic behavior.
Create a traffic behavior and configure the GTS action in the traffic behavior. For details, see
2.4.6 Configuring Traffic Shaping.
Step 3 Configure a traffic policy.
Create a traffic policy, associate the traffic classifier and traffic behavior with the traffic policy,
and apply the traffic policy to an interface. For details, see 2.5 Configuring a Traffic Policy.
----End
1.5.5 Checking the Configuration
After traffic shaping is configured, you can view the traffic shaping rate.
PrerequisiteAll the traffic shaping configurations are complete.
Procedure
l Checking the interface-based traffic shaping configuration
Run the display this command in the interface view to check the traffic shaping
configuration on the interface.
l Checking the queue-based traffic shaping configuration
– Run the display this command in the interface view to check the queue profile bound
to the interface.
– Run the display qos queue-profile [ queue-profile-name ] command to check the queue
profile configuration.
l Checking the flow-based traffic shaping configuration
– Run the display traffic behavior { system-defined | user-defined } [ behavior-
name ] command to check the traffic behavior configuration.
– Run the display traffic classifier { system-defined | user-defined } [ classifier-
name ] command to check the traffic classifier configuration.
– Run the display traffic policy user-defined [ policy-name [ classifier classifier-
name ] ] command to check the traffic policy configuration.
–
Run the display traffic-policy policy-name applied-record command to check thespecified traffic policy record.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
23
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
31/110
l Checking the packet statistics on the interface configured with traffic policing
– Run the display qos car statistics interface interface-type interface-number
{ inbound | outbound }or display qos car statistics interface { virtual-template vt-
number | dialer number } virtual-access va-number { inbound | outbound } command
to check the statistics on forwarded and discarded packets on the interface.
----End
Example
l Checking the interface-based traffic shaping configuration
Run the display this command to check the interface-based traffic shaping configuration.
[Huawei-Ethernet0/0/0] display
this
#
interface
Ethernet0/0/0
qos gts cir 2000 cbs
375000
#
return
l Checking the queue-based traffic shaping configuration
Run the display this command to check the queue profile bound to the interface.
[Huawei-Ethernet0/0/0] display
this
#
interface
Ethernet0/0/0
qos queue-profile qp1
#
return
Run the display qos queue-profile command to check the queue profile configuration.
display qos queue-profile qp1
Queue-profile:qp1
Queue Schedule Weight Length(Bytes/Packets) GTS(CIR/CBS)
------------------------------------------------------------------------------
--------------------
0 DRR 10 2048/4 -/-
1 DRR 10 2048/4 -/-
2 DRR 10 2048/4 -/-
3 DRR 10 2048/4 -/-
4 DRR 10 2048/4 -/-
5 PQ - 512/1 -/-
6 PQ - 512/1 -/-
7 PQ - 512/1 64/10000
l Checking the flow-based traffic shaping configuration
For details, see 2.3 Configuring a Traffic Classifier, 2.4.11 Checking the
Configuration, and 2.5 Configuring a Traffic Policy.
1.6 Configuring Congestion Management
If congestion occurs on a network after congestion management is configured, the AR1200-S
determines the sequence at which packets are forwarded according to the defined scheduling
policy.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
24
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
32/110
1.6.1 Establishing the Configuration Task
Before configuring congestion management, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the data required for the
configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
When congestion occurs on a network, configure congestion management to implement the
following functions:
l Smooth out the delay and jitter.
l Preferentially process packets of delay-sensitive services, such as video services and voice
services.
l Process packets with the same priority uniformly and process packets with different
priorities based on packet priorities among delay-insensitive services, for example, email
services.
The AR1200-S supports queue-based congestion management and class-based congestion
management:
l Queue-based congestion management: When packets enter queues on an interface based
on packet priorities, configure different scheduling modes for queues using a queue profile
so that differentiated services are provided.
l Class-based congestion management: The AR1200-S provides EF, AF, and BE queues and
different scheduling modes for packets matching traffic classifiers so that differentiated
services can be provided.
NOTE
Queue-based congestion management and class-based congestion management cannot be configuredsimultaneously.
Class-based congestion management can only be configured on the AR1200-S WAN-side interfaces but
not on the LAN-side interfaces.
Congestion management can be configured on the logical interface, including the dialer interface, MP-
Group interface, virtual template interface, virtual Ethernet interface, tunnel interface, or the physical
interface corresponding to the virtual interface. If traffic shaping, congestion management, congestion
avoidance, or a combination of them is configured on the virtual interface, the configuration on the virtual
interface takes effect. The configuration on the physical interface, however, does not take effect.
Pre-configuration Tasks
Before configuring congestion management, complete the following tasks:l Configuring priority mapping
l Configuring priority re-marking based on traffic classification
Data Preparation
To configure queue-based congestion management, you need the following data.
No. Data
1 Interface and queue to which congestion management is applied
2 Queue profile name
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
25
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
33/110
No. Data
3 Queue scheduling mode
4 (Optional) Queue length
5 (Optional) Queue weight
To configure class-based congestion management, you need the following data.
No. Data
1 Traffic classifier name and related parameters
2 Traffic behavior name and scheduling mode
3 Traffic policy name and interface to which the traffic policy is applied
1.6.2 Configuring Queue-based Congestion Management
The AR1200-S supports the following scheduling modes: PQ, DRR, WFQ, WRR, PQ+DRR,
PQ+WFQ, and PQ+WRR.
Context
After packets enter queues on an interface based on priority mapping, they are scheduledaccording to rules. Interfaces on the AR1200-S support different scheduling modes. PQ queues
are scheduled first, and multiple queues are scheduled in descending order of priorities. After
all the PQ queues are scheduled, the AR1200-S schedules DRR, WFQ, or WRR queues in turn.
Table 1-4 Scheduling mode supported by each interface
Interface Scheduling Mode
LAN-side interface l PQ
l DRR
l
WRR l PQ+DRR
l PQ+WRR
NOTEFE interfaces of the SRU on theAR1200-S do not
support DRR scheduling. They support the
following scheduling modes:
l PQ
l WRR
l PQ+WRR
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
26
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
34/110
Interface Scheduling Mode
WAN-side interface l PQ
l WFQ
l PQ+WFQ
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
qos queue-profile queue-profile-name
A queue profile is created and the queue profile view is displayed.
Step 3 Run the following commands as required.
l On the WAN-side interface, run:
schedule { { pq start-queue-index [ to end-queue-index ] } | { wfq start-queue-
index [ to end-queue-index ] } }*
A scheduling mode is configured for each queue on the WAN-side interface.
l On the LAN-side interface, run:
schedule { { pq start-queue-index [ to end-queue-index ] } | { drr start-queue-index [ to end-queue-index ] } | { wrr start-queue-index [ to end-queue-
index ] } }*
A scheduling mode is configured for each queue on the LAN-side interface.
By default, all the queues on the LAN side use WRR and all the queues on the WAN use
WFQ.
Step 4 (Optional) Run:
queue { start-queue-index [ to end-queue-index ] } & length { bytes bytes-
value | packets packets-value }*
The length of each queue is set on the interface.
By default, the length of a queue using PQ, DRR, or WRR on the LAN side is 5120 bytes; the
length of a queue using PQ on the WAN side is 40960 bytes; the length of a queue using WFQ
on the WAN side is 131072 bytes.
NOTE
The FE interface on the AR1200-S SRU does not support the queue length command.
Step 5 (Optional) Run:
queue { start-queue-index [ to end-queue-index ] } & weight weight-value
The weight value of each queue is set on the interface.
By default, the weight value of a queue is 10.
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
27
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
35/110
NOTE
The FE interface on the AR1200-S SRU does not support the queue weight command.
Step 6 Run:
quit
Exit from the queue profile view.
Step 7 Run:interface interface-type interface-number [.subinterface-number ]
The interface view or sub-interface view is displayed.
Step 8 Run:qos queue-profile queue-profile-name
The queue profile is applied to the interface or sub-interface.
----End
1.6.3 Configuring Class-based Congestion Management
After a traffic policy is configured, it can be applied to multiple interfaces so that the same
scheduling mode can be applied to traffic of a specified type on multiple interfaces.
Context
The AR1200-S provides the following queues for data packets matching traffic classification
rules:
l AF: ensures low drop probability of packets when the rate of outgoing service traffic does
not exceed the minimum bandwidth. It is applied to services of heavy traffic that need to
be ensured.
l EF: is applied to services requiring a low delay, low drop probability, and assured
bandwidth. EF is also applied to services occupying low bandwidth, for example, voice
packets. After packets matching traffic classification rules enter EF queues, they are
scheduled in Strict Priority (SP) mode. Packets in other queues are scheduled only after all
the packets in EF queues are scheduled.
l BE: is used with the default traffic classifier. The remaining packets that do not enter AF
or EF queues enter BE queues. BE queues use WFQ scheduling. When a greater number
of queues are configured, WFQ allocates bandwidth more evenly but more resources are
occupied. WFQ is applied to the services insensitive to the delay and packet loss, for example, Internet access services.
Class-based congestion management, also called CBQ, on the main interface or sub-interface is
exclusive with the queue profile or traffic shaping on the same main interface or sub-interface.
CBQ Configuration Whether the QueueProfile Can BeConfigured (qos queue-profile (interface view))
Whether Traffic Shaping Can Be Configured (qosgts)
Main interface Main interface: No Main interface: Yes
Sub-interface: No Sub-interface: No
Huawei AR1200-S Series Enterprise Routers
Configuration Guide - QoS 1 QoS Configuration
Issue 04 (2012-01-06) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
28
-
8/19/2019 Configuration Guide - QoS(V200R001C01_04)
36/110
CBQ Configuration Whether the QueueProfile Can BeConfigured (qos queue-profile (interface view))
Whether Traffic Shaping Can Be Configured (qosgts)
Sub-interface Main interface: Yes Main interface: Yes
Sub-interface: No Sub-interface: Yes
Procedure
Step 1 Configure a traffic classifier.
The AR1200-S can classify traffic according to the ACL, Layer 2 information in packets, and
Layer 3 information in packets. Configure a traffic classifier by selecting appropriate trafficclassification rules. For details, see 2.3 Configuring a Traffic Classifier.
Step 2 Configure a traffic behavior.
Create a traffic behavior and configure flow-based queue scheduling in the traffic behavior. For
details, see 2.4.7 Configuring Congestion Management.
Step 3 Configure a traffic policy.
Create a traffic policy, associate the traffic classifier and traffic behavior with the traffic policy,
and apply the traffic policy to an interface. For details, see 2.5 Configuring a Traffic Policy.
----End
1.6.4 Checking the Configuration
After congestion management is configured, you can view scheduling parameters of each queue
on a specified interface.
Prerequisite
All the congestion management configurations are complete.
Procedurel Checking the queue-based congestion management configuration
– Run the display this command in the interface view to check the queue profile