Class-based QoS
www.huawei.com
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Foreword
This section introduces Class-based QoS principles and configuration.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 2
Objectives
Upon completion of this section, you will be able to:
Describe Class-based QoS basic principles
Master Class-based QoS configuration
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 3
Class-based QoS
Class-based QoS is a new method for delivering QoS commands.
This method divides QoS commands into three parts:
Traffic classifier
− Identifies the packets conforming to some features by using
a certain rule.
Traffic behavior
− A set of QoS behaviors performed for packets.
Traffic policy
− Combination of traffic classifier and traffic behavior.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 4
Traffic Classifier
The traffic classifier command is used to define the traffic
classification rule.
Traffic classifier is based on the ACL but different from the ACL..
The classification is based on the following:
Precedence of the packet
Protocol type
MAC address
Inbound interface
VLAN precedence
Port number
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 5
Configure the Traffic Classifier
[RTA]traffic classifier Class1
[RTA-classifier-Class1]if-match ?
8021p Specify 802.1p parameters
acl Specify ACL to match
any Specify any packets to match
classifier Specify traffic classifier to match
destination-mac Specify destination MAC address to match
dscp Specify DSCP (DiffServ CodePoint) to match
inbound-interface Specify an inbound interface to match
ip-precedence Specify IP precedence to match
ipv6 Specify ipv6 acl number
mpls-exp Specify MPLS EXP value to match
not Rule of not matching the statement
protocol Specify protocol to match
qos-local-id Specify QoS local ID feature
rtp Specify RTP port to match
source-mac Specify source MAC address to match
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 6
Traffic Behavior
Class-based marking behavior
Class-based traffic policing and shaping behavior
CBQ behavior
Class-based WRED behavior
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 7
Class-based Marking Behavior
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1]remark ?
8021p Specify 802.1p parameters
atm-clp Remark atm-clp
dscp Remark DSCP (DiffServ CodePoint)
fr-de Remark fr-de
ip-precedence Remark IP precedence
mpls-exp Remark MPLS EXP
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 8
Configure the Class-based Traffic Policing
and Shaping Behavior
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1]car cir cir [ cbs cbs ebs ebs ] [ green
action [ red action] ]
[RTA]traffic behavior Behavior2
[RTA-behavior-Behavior1]gts cir cir [ cbs cbs [ ebs ebs [ queue-length
queue-length ] ] ]
[RTA]traffic behavior Behavior3
[RTA-behavior-Behavior1]lr cir cir [ cbs cbs [ ebs ebs ] ]
or
[RTA-behavior-Behavior1]lr percent cir cir [ cbs cbs[ ebs ebs ] ]
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 9
CBQ: Class-based Queuing
L2 protocol queue
RTPQ
Packets to be sent
from the interface LLQ Out queue Packets leaving
scheduling the interface
Classification
BQ1
BQ2
……
BQ64
Default Class
FIFO/WFQ
Symbols
Packets
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 10
Configure the CBQ Behavior
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1] queue af bandwidth { bandwidth | pct
percentage }
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1] queue wfq [ queue-number total-queue-number ]
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1] queue-length queue-length
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1] queue ef bandwidth { bandwidth [ cbs cbs ] | pct
percentage }
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 11
Configure the Class-based WRED Behavior
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1] wred [ dscp | ip-precedence ]
[RTA-behavior-Behavior1] wred weighting-constant exponent
[RTA-behavior-Behavior1] wred dscp dscp-value low-limit low-limit high-
limit high-limit [ discard-probability discard-probability ]
[RTA-behavior-Behavior1] wred ip-precedence ip-precedence low-limit low-
limit high-limit high-limit [ discard-probability discard-probability ]
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 12
Traffic Policy
A traffic policy associates the traffic classifier with the traffic
behavior.
Traffic policies can be nested.
The behavior of a parent policy is realized by child policies.
Currently, the device supports two layers of nesting.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 13
Configure the Traffic Policy and Nested Policy
[RTA]traffic policy Policy1
[RTA-trafficpolicy-Policy1]classifier classifier-name behavior
behavior-name
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1]traffic-policy Policy1
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 14
Example for Configuring Class-based QoS
1.1.1.1 4.4.4.4
S0 S0 S1 S0 S1 S0
2.2.2.2
RTA RTB RTC RTD
3.3.3.3
On RTA, the flows are classified into three classes: AF11, AF21, and EF
On RTB:
Allocate 5% bandwidth to AF11 flow.
Re-mark the AF21 flow to AF22 and allocate 5% bandwidth to it.
Guarantee low delay and jitter of the EF flow and allocate 30%
bandwidth for it.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 15
Example for Configuring Class-based QoS—
Configure RTA
acl number 2001
rule 0 permit source 1.1.1.1 0
acl number 2002
rule 0 permit source 2.2.2.2 0
acl number 2003
rule 0 permit source 3.3.3.3 0
traffic classifier Class_af11 operator and
if-match acl 2001
traffic classifier Class_af21 operator and
if-match acl 2002
traffic classifier Class_ef operator and
if-match acl 2003
traffic behavior Behavior_af11
remark dscp af11
traffic behavior Behavior_af21
remark dscp af21
traffic behavior Behavior_ef
remark dscp ef
traffic policy Mark
classifier Class_af11 behavior Behavior_af11
classifier Class_af21 behavior Behavior_af21
classifier Class_ef behavior Behavior_ef
interface Serial0
ip address 12.12.12.1 255.255.255.252
traffic-policy Mark outbound
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 16
Example for Configuring Class-based QoS—
Configure RTB
traffic classifier Class_af11 operator and
if-match dscp af11
traffic classifier Class_af21 operator and
if-match dscp af21
traffic classifier Class_ef operator and
if-match dscp ef
#
traffic behavior Behavior_af11
queue af bandwidth pct 5
traffic behavior Behavior_af21
remark dscp af22
queue af bandwidth pct 5
traffic behavior Behavior_ef
queue ef bandwidth pct 30
#
traffic policy dscp
classifier Class_af11 behavior Behavior_af11
classifier Class_af21 behavior Behavior_af21
classifier Class_ef behavior Behavior_ef
interface Serial1
ip address 23.23.23.1 255.255.255.252
traffic-policy dscp outbound
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 17
Example for Configuring Class-based QoS—
Debugging (1)
[RTB]display traffic policy interface Serial 1
Interface: Serial1
Direction: Outbound
Policy: dscp
Classifier: default-class
Matched : 211/14536 (Packets/Bytes)
Rule(s) : if-match any
Behavior: be
Default Queue:
Flow Based Weighted Fair Queuing
Max number of hashed queues: 256
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Discard Method: Tail
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 18
Example for Configuring Class-based QoS—
Debugging (2)
[RTB]display traffic policy interface Serial 1
……
Classifier: Class_af11
Matched : 5/420 (Packets/Bytes)
Operator: AND
Rule(s) : if-match dscp af11
Behavior: Behavior_af11
Assured Forwarding:
Bandwidth 2 (Kbps)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 19
Example for Configuring Class-based QoS—
Debugging (3)
[RTB]display traffic policy interface Serial 1
……
Classifier: Class_af21
Matched : 15/1260 (Packets/Bytes)
Operator: AND
Rule(s) : if-match dscp af21
Behavior: Behavior_af21
Marking:
Remark DSCP af22
Remarked: 15 (Packets)
Assured Forwarding:
Bandwidth 2 (Kbps)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 20
Example for Configuring Class-based QoS—
Debugging (4)
[RTB]display traffic policy interface Serial 1
……
Classifier: Class_ef
Matched : 5/420 (Packets/Bytes)
Operator: AND
Rule(s) : if-match dscp ef
Behavior: Behavior_ef
Expedited Forwarding:
Bandwidth 15 (Kbps), CBS 1500 (Bytes)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 21
Summary
What is the procedure to configure
class-based QoS?
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 22
Thank You
www.huawei.com