ODR002013 Configure QoS On NE Series Routers ISSUE1.02 PDF
ODR002013 Configure QoS On NE Series Routers ISSUE1.02 PDF
ODR002013 Configure QoS On NE Series Routers ISSUE1.02 PDF
Series Routers
www.huawei.com
Foreword
Page2
Objectives
Page3
Contents
1. QoS Overview
2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice
Page4
Contents
1. QoS Overview
2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice
Page5
Contents
1. QoS Overview
1.1 Background of QoS
1.2 How to Measure QoS
1.3 How to Guarantee QoS
Page6
Background of QoS
Solve resource competition
Improve benefits
Deploy QoS
Traditional IP Networks
Bear data services
(Email, FTP, WWW)
Current IP Networks
Bear multiple services
(VoIP, Video, VPN etc.)
All these requirements can be met only with a stronger service capability
of the networks.
Page7
Contents
1. QoS Overview
1.1 Background of QoS
1.2 How to Measure QoS
1.3 How to Guarantee QoS
Page8
Bandwidth
100Mbps
10Mbps
256kbps
2Mbps
1Gbps
Server
PC
BWmax256kbps
Page9
Delay
Transmission
Transmission
Transmission
Transmission
delay
Queue
Queue delay
Processing Queue delay
delay
Processing delay
Processing delay
delay
delay
delay
delay
Page10
Jitter
Page11
Packet Loss
Page12
Contents
1. QoS Overview
1.1 Background of QoS
1.2 How to Measure QoS
1.3 How to Guarantee QoS
Page13
Increase bandwidth.
Improve processing
performance.
Page14
Contents
1. QoS Overview
1.1 Background of QoS
1.2 How to Measure QoS
1.3 How to Guarantee QoS
Page15
Page16
Page17
A. Best-Effort
B. Integrated Service
C. Differentiated Service
D. FIFO Service
Page18
Contents
1. QoS Overview
2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice
Page19
Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping
Page20
Non-DS Domain
RTB
DS domain
RTA
Configure simple
traffic classification ,
queue scheduling,
congestion avoidance
and management
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.
Page21
Description
Generally, an enterprise network is a non-DS domain.
Deploy traffic shaping on the egress of the router to
limit the rate of the traffic sent to the ISP.
Page22
Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping
Page23
Traffic classifier is divided into complex traffic classifier and simple traffic
classifier
Page24
Complex traffic
classification
Simple traffic
classification
2
Marking
implementing
PHB
Page25
model.
Version
TTL
Total Length
Fragment Offset
Flags
Protocol
Header Checksum
Source Address
Destination Address
Options
R
IP Precedence TOS
R
DSCP
Page26
TOS
R
Max. reliability
000
001
010
011
100
101
110
Routine
Priority
Immediate
Flash
Flash Override
Critical
Internetwork
Control
111 Network Control
Max. throughput
Min. delay
Page27
Page28
PHB(Per-Hop Behavior)(1/5)
Page29
PHB(Per-Hop Behavior)(2/5)
PHB
Default
Remarks
DSCP Value
BE
(Default
000000
PHB
FIFO
Tail-drop
Page30
PHB(Per-Hop Behavior)(3/5)
To support the compatibility with the nodes which dont support DSCP
CS Class
DSCP Value
Default
000000
Routine
CS1
001000
Priority
CS2
010000
Immediate
CS3
011000
Flash
CS4
100000
Override Flash
CS5
101000
Critical
CS6
110000
CS7
111000
Value
Precedence Class
Internetwork
Control
Network Control
Page31
PHB(Per-Hop Behavior)(4/5)
PHB
Default
Remarks
DSCP Value
EF PHB
101110
Page32
PHB(Per-Hop Behavior)(5/5)
Class
Low drop
precedence
Medium drop
precedence
High drop
precedence
Drop probability
Class1
Class2
Class3
Class4
001010
010010
011010
100010
001100
010100
011100
100100
001110
010110
011110
100110
Page33
Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping
Page34
Token Bucket
Page35
Traffic Policing(1/2)
Traffic policing monitors the specification of a certain traffic volume that enters
into a network, and confines the traffic within an allowed range. If the packet
traffic volume at a certain connection exceeds the range, packets are dropped,
or the priority of the packet is modified.
Page36
Traffic Policing(2/2)
Traffic policing
Enterprise
network
S0
RTA
S0
ISP
RTB
Traffic shaping
When the packet sending rate of a neighboring network is higher than the packet
rate that is supported by the local network, traffic policing can be deployed at
Page37
Sent out
classification
Token
bucket
Page38
S0
RTA
S0
ISP
RTB
Page40
Traffic Shaping(1/2)
router at a certain side. In this case, to avoid the router with the
small interface bandwidth from dropping packets, packets on the
router with the large interface bandwidth can be buffered to match
the processing capability of the router with the small interface
bandwidth at an equal speed. This technology is called traffic
shaping.
Page41
Traffic Shaping(2/2)
Traffic
Policing
Enterprise
S0
RTA
S0
ISP
RTB
Traffic
Shaping
Traffic shaping can delay the traffic to avoid a large number of packets from being
dropped, and avoid congestion at the egress. As shown in the preceding figure, RT A is
the egress of the enterprise network, and sends traffic to RTB. RTB deploys traffic
policing on interface S0. To match traffic policing set on RTB, and avoid packets from
being dropped, RTA deploys traffic shaping on S0 to buffer packets, and send packets
at a rate that matches traffic policing set on RTB.
Page42
Page43
Enterprise
S0
RTA
S0
ISP
RTB
[RTA]interface Serial0
[RTA-Serial0] undo shutdown
[RTB-Serial0]port shaping 20
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.
Page44
After basic configuration, certain commands can be run to check whether the configuration is
consistent with the planning. Run display interface Serial0 on RTA. The following result is
[RTA]display
expected: interface Servial 0
Serial0 current state : UP
Line protocol current state : UP
Description: Serial0 Interface
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Derived from T3 3/1/0, Unchannelized mode, baudrate is 44210000 bps
Internet protocol processing : disabled
Link layer protocol is PPP
LCP initial
clock master, loopback none
CRC: CRC-32
Scramble disabled
Statistics last cleared:2012-08-12 09:25:21
Traffic statistics:
Last 300 seconds input rate 32136 bits/sec, 875 packets/sec
Last 300 seconds output rate 19898 bits/sec, 537 packets/sec
Input: 13415135 packets, 14524525 bytes
Input error: 0 shortpacket, 0 longpacket, 0 CRC, 0 lostpacket
Output: 12143525 packets, 1215245 bytes
Output error: 0 lostpackets
Output error: 0 overrunpackets, 0 underrunpackets
The NE80E or NE40E supports traffic shaping only for packets in the outbound direction on the interface. On the interface,
configure different shaping parameters for the packets that participate in the traffic shaping based on different service
classes (EF, AF1, AF2, AF3, AF4, BE, CS6, or CS7).
Page45
Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping
Page46
Congestion Management
Page47
PQPriority Queuing
Page48
Packets to be sent
From the interface
Queue
Out queue
scheduling
Packets leaving
the packets
FIFO
Symbols
Urgent packets
Hypo-urgent packets
Non-urgent packets
Page49
Advantages of FIFO:
Disadvantages of FIFO:
Page50
Priority Queuing(PQ)(1/3)
Queue
CS7
Packets to be sent
from the interface
CS6
PQ
EF
AF4
classification
AF3
AF2
WFQ
AF1
BE
Symbols
Urgent packets
LPQ
Hypo-urgent packets
Non-urgent packets
Page51
Priority Queuing(PQ)(2/3)
Enterprise
S0
RTA
S0
ISP
RTB
Page52
Priority Queuing(PQ)(3/3)
Advantages of PQ:
Data is forwarded at a low delay. That is, the packets in the lowpriority queues are forwarded only after the packets in the high-priority
queues are forwarded. In this case, the delay in packet forwarding is
low, and key services in the high-priority queues are forwarded.
Disadvantages of PQ:
Each of the four PQ queues uses the FIFO mechanism. That is, each
queue has all the disadvantages of the FIFO queue.
If packets exist in the high-priority queues for a long time, the packets
in the low-priority queues cannot be forwarded during this period.
Page53
Q1
Packets to be sent
from the interface
classification
Out queue
scheduling
Packets leaving
the interface
Q2
Q3
Qn
Symbols
Page54
Enterprise
E0
S0
Page55
Advantages of WFQ:
Disadvantages of WFQ:
slow.
Page56
LPQ Feathers
Page57
Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping
Page58
Congestion Avoidance
Tail drop
Page59
Tail Drop
Bandwidth
Saturation
bandwidth
Average
bandwidt
h
Page60
Time
Not drop
Random drop
Tail drop
100%
10%
20
(low limit)
40
(high limit)
Queue percent
Page61
10%
20
AF21
AF22
AF23
25 30
35
40
Queue percent
Page62
In the example, WRED is configured. Set the green, yellow, red color s low-limit
value of priority levels 1 to 20, 30,35and the high-limit value to 30,35,40 .
Drop
probability
100%
red
10%
yellow
green
20
25 30
35
40
Page63
Queue percent
Enterprise
S0
S0
ISP
RTA
RTB
[RTB]port-wred 1
[RTB-port-wred-1]color green low-limit 20 high-limit 30 discard-percentage
10
[RTB-port-wred-1]color yellow2 low-limit 30 high-limit 35 discardpercentage 10
[RTB-port-wred-1]color red low-limit 35 high-limit 40 discard-percentage 10
[RTB-port-wred-1]quit
[RTB]interface Serial 0
[RTB-Seirial0]port-queue be port-wred 1 outbound
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.
Page64
Page65
Page66
A. GTS
B. WRED
C. RED
D. CAR
Page67
Page68
Page69
Page70
Contents
1. QoS Overview
2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice
Page71
Class-Based QoS
Page72
Page73
Traffic Classifier(1/2)
Page74
Traffic Classifier(2/2)
[RTB]traffic classifier classier
[RTB-classifier-classier]if-match ?
8021p
Specify 802.1p parameters
acl
Specify ACL to match
any
Specify any packets to match
destination-mac Specify destination MAC address to match
dscp
Specify DSCP (DiffServ CodePoint) to match
ip-precedence
Specify IP precedence to match
ipv6
Specify IPv6
mpls-exp
Specify MPLS EXP value to match
source-mac
Specify source MAC address to match
tcp
Specify Transmission Control Protocol
parameters
Page75
Traffic Behavior(1/4)
Page76
Traffic Behavior(2/4)
1. Traffic marking
Page77
Traffic Behavior(3/4)
2. Traffic policing
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1] car { cir cir-value [ pir pirvalue] } [ cbs cbs-value pbs pbs-value ] [ green {
discard | pass [ service-class class color color ] } |
yellow { discard | pass [ service-class class color
color ] } | red { discard | pass [ service-class class
color color ] } ]*
Page78
Traffic Behavior(4/4)
Page79
Traffic Policy(1/2)
Page80
Traffic Policy(2/2)
Policy nesting indicates that a QoS policy contains another QoS policy. The
behavior of a parent policy is a sub policy. The behavior of a certain class of traffic
defined by using the traffic classifier command executes the behavior defined in
the parent policy. In addition, the traffic is further classified by the sub policy to
execute the behavior defined in the sub policy. NE routers support only two levels
of policy nesting.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.
Page81
After traffic policies associate traffic classifier with traffic behavior, you
need to apply the policies on the outbound or inbound direction of an
interface according to the requirements for the policies to take effect.
outbound
Page82
are ( )
A. Traffic classifier
B. Traffic behavior
C. Traffic policy
D. Traffic shaping and policing
Page83
Contents
1. QoS Overview
2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice
Page84
Diff-Serv
Traffic shaping
Congestion
management
Congestion
avoidance
Page85
In the network as shown in the preceding figure, the server provides the network
resources, and two PCs simulate users obtaining network resources from the
server. The two PCs belong to different service guarantee levels. QoS policies
need to be deployed between the server and PCs to control and adjust the traffic
between the server and PCs.
Operation
View
Commands
Deploy the
[Quidway-
port CAR
Ethernet0/1]
policy
Deploy the
[Quidway-
port GTS
Ethernet0/]
policy
Page87
Configuration Example
Configuration Example
Page88
Page89
Different from GTS, when CAR is used, if the rate exceeds the restriction
range, the extra traffic is remarked or dropped according to the
configuration. In this experiment, 1543 packets are dropped.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.
Page90
Output:
Unicast: 34525245 packets, Multicast: 0 packets
Broadcast: 0 packets, JumboOctets: 0 packets
Lost: 0 packets, Overflow: 0 packets, Underrun: 0 packets
System: 0 packets, Overruns: 0 packets
TxPause: 0 packets
Under the restrictions of GTS, the rate is restricted. The data that
exceeds the traffic specification, however, is buffered but not dropped.
Page91
PQ ConfigurationConfiguration Flow
Step
1
Operation
Enter the
interface view
Apply the
priority list
View
[Quidway]
Commands
interface
interface-type
[Quidwayinterface]
group on the
interface.
interface-number
port-queue cos-value
{ pq | shaping
{ shaping-value |
shaping-percentage
shaping-percentagevalue } [ pbs pbsvalue ] | port-wred
wred-name } *
outbound
Page92
PQ ConfigurationConfiguration
Example
Configuration Example
Page93
PQ Configuration
Page94
PQ ConfigurationConfiguration
Verification(1/5)
Configuration Verification
Page95
PQ ConfigurationConfiguration
Verification(2/5)
Page96
PQ ConfigurationConfiguration
Verification(3/5)
Page97
PQ ConfigurationConfiguration
Verification(4/5)
Download status of PC 2:
Page98
PQ ConfigurationConfiguration
Verification(5/5)
Download status of PC 1:
Page99
Configure WFQ
View
Commands
[Quidway]
interface interface-
[Quidwayinterface]
type interface-number
port-queue cos-value
{ wfq weight weightvalue | shaping
{ shaping-value |
shaping-percentage
shaping-percentagevalue } [ pbs pbsvalue ] | port-wred
wred-name } *
outbound
Page100
WFQ ConfigurationConfiguration
Example
Configuration Example
omitted.
Page101
Operation
Configure
View
[Quidway]
WRED
module
Apply
WRED on
the interface.
[QuidwayEthernet0/
1]
Commands
1.port-wred port-wred-name
2.color{ green | yellow |
red } low-limit low-limitpercentage high-limit highlimit-percentage discardpercentage discard-percentage
port-queue cos-value { { pq |
wfq weight weight-value | lpq}
| shaping { shaping-value |
shaping-percentage shapingpercentage-value } | portwred wred-name } * outbound
Page102
WRED ConfigurationExample
Page103
WRED ConfigurationConfiguration on
RT1
[RT1] port-wred pw
[RT1-port-wred-pw]color green low-limit 70
high-limit 100 discard-percentage 100
[RT1-port-wred-pw]color yellow low-limit 60
high-limit 90 discard-percentage 100
[RT1-port-wred-pw]color red low-limit 50
high-limit 80 discard-percentage 100
[RT1]interface Ethernet 0/0
[RT1]port-queue ef pq port-wred pw outbound
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.
Page104
WRED ConfigurationConfiguration
Verification(1/3)
Configuration Verification
70
100
100
yellow
60
90
100
red
50
80
100
reference relationships
NULL
Page105
WRED ConfigurationConfiguration
Verification(2/3)
Page106
WRED ConfigurationConfiguration
Verification(3/3)
Page107
Operation
View
Commands
[Quidway]
acl
Configure traffic
[Quidway]
traffic classifier
classifier-name
[ operator { and | or } ]
[Quidway]
traffic behavior
behaviorname
[Quidway]
1. traffic policy
policy-name
2. Classifier
classifier-name
behavior behaviorname [ precedence
precedence ]
traffic-policy policyname { inbound |
outbound } [ link-layer
| all-layer | mplslayer ]
classifier
Configure traffic
behavior
Configure traffic
policies
[Quidway-
interfaces
Ethernet0/1]
Page108
Page109
1. Configure ACL
Page110
[RT3]traffic classifier c1
[RT3-classifier-c1]if-match acl 3000
[RT3-classifier-c1]quit
[RT3]traffic classifier c2
[RT3-classifier-c2]if-match acl 3001
Page111
[RT3]traffic behavior b1
[RT3-behavior-b1]remark dscp ef
[RT3-behavior-b1]quit
[RT3]traffic behavior b2
[RT3-behavior-b2]remark dscp af11
Page112
Page113
[RT3]interface Ethernet0/1
[RT3-Ethernet0/1] traffic-policy
ftpuser inbound
Page114
[RT1]traffic classifier c1
[RT1-classifier-c1]if-match dscp ef
[RT1-classifier-c1]quit
[RT1]traffic classifier c2
[RT1-classifier-c2]if-match dscp af11
[RT1]traffic behavior b1
[RT1-behavior-b1] service-class cs6 color
green
[RT1-behavior-b1]quit
[RT1]traffic behavior b2
[RT1-behavior-b2] service-class af4 color red
[RT1-behavior-b2]quit
Page116
[RT1]interface Ethernet0/1
[RT1-Ethernet0/1]traffic-policy
ftpuser inbound
Page117
Operator: OR
Rule(s) : if-match dscp af11
RefedByPolicyNum : 0
PolicyName : ftpuser
Classifier: c1
Operator: OR
Rule(s) : if-match dscp ef
RefedByPolicyNum : 0
PolicyName : ftpuser
Page118
Page119
Page120
Page121
Page122
Contents
1. QoS Overview
2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice
Page123
Page124
Configuration Tasks(1/2)
Task
1
Description
Remark the DSCP domain for the packet traffic from the server and PC
sent by interface GE1/0/1 on router A
Remark the DSCP field for the data sent from the server as EF
Remark the DSCP field for the data sent from the PC as AF11
2
Perform traffic control on the packet traffic from the server and PC
received by interface GE1/0/0 on router B as follows
Constrain the packet traffic from the server to 54000 bit/. When the
traffic is lower than 54000 bit/s, the traffic can be normally sent. When
the traffic exceeds 54000 bit/s, set the priority level of the extra traffic
to 0 before sending the extra traffic
Constrain the packet traffic from the PC to 8000 bit/s. When the traffic
is lower than 8000 bit/s, the traffic can be normally sent. When the
burst traffic size exceeds 15000 bit/s, the extra traffic is dropped
Configuration Tasks(2/2)
Task
3
Description
The packet receiving and sending on GE1/0/0 and GE1/0/1 on router B must meet
the following requirements:
The total traffic restriction for packet receiving at GE1/0/0 on router B is 500
kbit/s. Extra traffic is dropped as incompliant packets.
The restriction on packet traffic that enters into the Internet through GE1/0/1
on router B is 1000 kbit/s. Extra traffic is dropped as incompliant packets.
be allocated to the data from the server, and the delay and jitter must be ensured
Implement AF for traffic whose DSCP field is AF. Ensure that the
minimum bandwidth is 5%
Implement EF for traffic whose DSCP field is EF. Ensure that the
minimum bandwidth is 30%.
Summary
QoS Overview
QoS Implementation
Class-based QoS
Page127
Thank you
www.huawei.com