Date post: | 02-Apr-2018 |
Category: |
Documents |
Upload: | mickyalemu |
View: | 224 times |
Download: | 0 times |
of 103
7/27/2019 QoS Principle
1/103
HUAWEI TECHNOLOGIES CO., LTD.
www.huawei.com
HUAWEI Confidential
For internal use only
QoS Principle
ISSUE 1.0
7/27/2019 QoS Principle
2/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage2
By taking this course, we can
master the following topics:
Basic QoS concepts
Traffic policing & traffic shaping
Congestion control
Congestion avoidance
7/27/2019 QoS Principle
3/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage3
Chapter 1 Basic QoS ConceptsCha
pter 1 Basic QoS Concepts
Chapter 2 Packet Classification & Marking
Chapter 3 Traffic Policing & Shaping
Chapter 4 Congestion Control & Avoidance
7/27/2019 QoS Principle
4/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage4
Basic QoS Concepts
QoS stands for the quality of service. It refers to the expected
quality of subscriber service in case of packet loss, delay, jitter
and bandwidth during network communication.
Targets of IP QoS:
Avoid and control the IP network congestion.
Reduce the packet loss rate of the IP packet.
Adjust the traffic over the IP network.
Provide private bandwidth for specific subscribers or services.
Support real-time services on the IP network.
7/27/2019 QoS Principle
5/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage5
Bandwidth Limit
IP
IP IP
IP IP
IP IP
IP
10 Mbps
10 Mbps
256 kbps
256 kbps512 kbps
512 kbps
100 Mbps
100 Mbps
BWmax= min(10M, 256k, 512k, 100M)=256 kbps
BWavail= BWmax/Flows
7/27/2019 QoS Principle
6/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage6
End-to-End Delay
IP
IP
Propagation
Delay (P1)
Propagation
Delay (P1)
Processing and
Queuing Delay (Q1)
Processing and
Queuing Delay (Q1)
IP
IP IP
IP IP
IP
Propagation
Delay (P2)
Propagation
Delay (P2)
Processing and
Queuing Delay (Q2)
Processing and
Queuing Delay (Q2)
Propagation
Delay (P3)
Propagation
Delay (P3)
Processing and
Queuing Delay (Q3)
Processing and
Queuing Delay (Q3)
Delay = P1 + Q1 + P2 + Q2 + P3 + Q3 + P4 = X ms
Propagation
Delay (P4)
Propagation
Delay (P4)
7/27/2019 QoS Principle
7/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage7
Delay
Processing delay
Queuing delay
Transit delay
IPIP IPIPIPIPIPIP
Forwarding
Processing Delay Queuing DelayTransit Delay
Bandwidth
7/27/2019 QoS Principle
8/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage8
Packet Loss
Tail-drop occurs when the transmitting queue is overlong. It is themost common discarding way in case of link congestion.
There are many other discarding ways such as input queue drop,ignore, overrun, no buffer, and so on. These ways are used in caseof router congestion.
IPIP
Forwarding
IPIPIPIPIPIPIPIP
Tail-dropTail-drop
7/27/2019 QoS Principle
9/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage9
How To Reduce Delay?
Expand the link bandwidth.
FIFO queuingIP TCP Data Fancy Queuing
Forward critical packets preferentially.
Compressthe Headers
cTCP Data
Compress the header of the IP packet.
Compressthe Payload
Compressed Packet
Compress the valid load of the Layer2 frame.
Priority Queuing (PQ)Custom Queuing (CQ)
Modified Deficit Round Robin (MDRR)Class-Based Weighted Fair Queing (CBWFQ)
Priority Queuing (PQ)Custom Queuing (CQ)
Modified Deficit Round Robin (MDRR)Class-Based Weighted Fair Queing (CBWFQ)
StackerPredictor
StackerPredictor
TCP Header CompressionRTP Header CompressionTCP Header CompressionRTP Header Compression
7/27/2019 QoS Principle
10/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage10
How To Reduce the Packet Loss Rate?
Expand the link bandwidth.
FIFO queuingIPIP DataData Fancy Queuing
Provide adequate bandwidth for delay-sensitive services.
Dropper
Use the random discard mechanism to prevent congestion.
Custom Queuing (CQ)Modified Deficit Round Robin (MDRR)
Class-Based Weighted Fair Queuing (CBWFQ)
Custom Queuing (CQ)Modified Deficit Round Robin (MDRR)
Class-Based Weighted Fair Queuing (CBWFQ)
Weighted Random Early Detection (WRED)Weighted Random Early Detection (WRED)
7/27/2019 QoS Principle
11/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage11
Mapping Between Services and QoSRequirements
Throughput Delay Loss Jitter
Interactive (e.g.,Telnet)
Batch (e.g.,
FTP)
Fragile (e.g,.SNA)
Voice
Low Low
Not important
Not important
High
Low
Low
Not important
None Not important
Low LowLow Low andpredictable
Low Low
Video Low LowHighLow and
predictable
7/27/2019 QoS Principle
12/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage12
Different Effects of Various Services
Throughput Delay Loss Jitter
Gold
Silver
Bronze
Best Effort
Guaranteed Low
No guarantee
Low
Guaranteed
Low
No guarantee No guarantee
No guarantee No guarantee
No guarantee No guaranteeNo guarantee No guarantee
Guaranteedlimited
No guarantee
7/27/2019 QoS Principle
13/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage13
Three IP QoS Models
Best-Effort: It is the default service model of Internet. Best-Effort
uses the first-in-first-out (FIFO) queue.
IntServ: In this model, the service applies to the network for
specific QoS service by sending signaling. Within the range of
traffic parameters, the network reserves resources to meet therequirement.
DiffServ: In case of network congestion, DiffServ controls traffic
based on services and forwards traffic to solve the congestion
according to the committed QoS levels of various services.
7/27/2019 QoS Principle
14/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage14
Best-Effort
Best-Effort is a single and simple service model.
Application programs can transmit any packet in any case if they
are permitted or inform the network of the transmission.
Network tries everything to transmit the packets but does not
guarantee the delay and reliability.
Best-Effort service is the default service model of Internet. It uses
FIFO technology.
7/27/2019 QoS Principle
15/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage15
IntServ
Provide controllable and end-to-end service for applications.
Network unit supports the QoS control mechanism.
Application programs apply to the network for specific QoS
service.
Signaling protocols place the QoS request on network.
Resource Reservation Protocol (RSVP) is the mainly used
signaling protocol.
7/27/2019 QoS Principle
16/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage16
IntServ
Resource reservation
Admission control
requestrequest requestrequest requestrequest requestrequest
reservereservereservereservereservereservereservereserve
Local
Admission
Control
Local
Admission
Control
Local
Admission
Control
Local
Admission
Control
Policy Decision
Point (PDP)
Policy Enforcement
Point (PEP)
r
equest
r
equest
rep
ly
rep
ly
Remote Admission
Control
Remote Admission
Control
7/27/2019 QoS Principle
17/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage17
Related Protocols
RSVP is a protocol for reserving resources. The receiver initiates RSVP to set
up the resource reservation for the multicast and unicast data traffic. RSVP is
used between the host and the network device (FRCs 2205 to 2215).
Common Open Policy Service (COPS) is a simple protocol at the application
layer. COPS uses the query/response mode. This protocol applies to the policy
exchange between the policy server and the policy client. In the COPS protocol,
policy server is also the policy decision point (PDP), such as SPS in SIG. Policy
client is also the policy enforcement point (PEP), such as the MA5200F. (RFCs
2748 to 2753)
7/27/2019 QoS Principle
18/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage18
RSVP Application
RSVP is used to transmit voice or video data on the IP network through
application programs. In this case, the host serves as the initiator.
RSVP applies to the MPLS traffic engineering and sets up the MPLS/TE tunnel.In this case, the router serves as the initiator.
7/27/2019 QoS Principle
19/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage19
IntServ Application
RSVP
Class of Service
or
Best Effort
7/27/2019 QoS Principle
20/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage20
IntServ Application End-to-End
All Routers
WFQ applied per flowbased on RSVP requests
RSVP
7/27/2019 QoS Principle
21/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage21
IntServ DiffServ Integration
Precedence
Classifier
Premium
Standard
Ingress Router RSVP protocol
Mapped to classes
Passed through to egress Backbone WRED applied based
on class
Egress Router RSVP protocol
sent on to destination WFQ applied to
manage egress flow
RSVP RSVP
WRED
7/27/2019 QoS Principle
22/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage22
IntServ Advantages & Disadvantages
+ RSVP advantages
Simple to control (end-to-end)
Dynamic signaling port (such as H.323)
RSVP disadvantages
No expandability
Transmission problems of successive signaling caused by the network structure
configured with diversified attribute.
7/27/2019 QoS Principle
23/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage23
Common Open Policy Service
Compared with RSVP, COPS has the following advantages:
Manage services in an integrated manner.
authorize and access the RSVP traffic in an integrated manner.
QoS-based RSVP solution has more expandability.
7/27/2019 QoS Principle
24/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage24
DiffServ Model Structure
DiffServ
network
Subscriber
network
Traffic
control
SLA/TCA
Inner
node
Boundary
node
Boundary
node
Inner
nodeClassify services and
adjust traffic on the edge
of network.
- Service classification
. Based on the DS field
. Based on other features- Traffic adjustment
. Measure
. Mark
. Discard
. Shape
Various DS fields can have different PHB to provide diversified policies based on services.
Cross-regional services are offered between these DS fields by balancing SLA and TCA.
. Service Level Agreement (SLA): It refers to the expected quality of the service traffictransmitted over networks.
. Traffic Control Agreement (TCA): It is an agreement on the service classification rules,
service models, and the related processing.
PHB determines the policy
of the services provided
by the DS filed. DS nodes
forward packets according
to the PHB attribute.
Subscriber
network
Boundary
node
DiffServ
network
Boundary
node
7/27/2019 QoS Principle
25/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage25
Differentiated Services Model
The Differentiated Services model describes the relationship
between the service and the traffic classification.
Classification and shaping of integrated traffic is completed on the
edge router.
No per-flow/per-application status exists at the core layer.
The core layer completes only simple per-hop behaviors during
the traffic aggregation.
Its aims at retractility.
7/27/2019 QoS Principle
26/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage26
DSCP Field: 6 bits Unused: 2 bits
Former ToS Byte = New DS Field
Packet Header
DS code point : The DS node chooses corresponding PHB according to the DSCP value.
DS field: It contains the TOS of the IPV4 packet header or the traffic type field of IPV6
(defined by RFC2474).
7/27/2019 QoS Principle
27/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage27
DSCP Code
Three combinations
xxxxx0: common
xxxx11: pilot or for local use
xxxx01: pilot or for local use (It can be also used as the formal
one)
Default DSCP: 000000
Default PHB: FIFO, tail-drop
7/27/2019 QoS Principle
28/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage28
Chapter 1 Basic QoS Concepts
Chapter 2 Packet Classification & MarkingChapter 2 Packet Classification & Marking
Chapter 3 Traffic Policing & Shaping
Chapter 4 Congestion Control & Avoidance
7/27/2019 QoS Principle
29/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage29
Packet Classification & Marking
Packet classification and marking is the foundation for
implementing the QoS service.
Packet classification uses the ACL and IP priority technologies.
Forward packets to other modules to process or mark (coloring)
based on the classification result for the classification on the core
network.
ACL , IP priority
7/27/2019 QoS Principle
30/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage30
Chapter 1 Basic QoS Concepts
Chapter 2 Packet Classification & Marking
Chapter 3 Traffic Policing & ShapingChapter 3 Traffic Policing & Shaping
Chapter 4 Congestion Control & Avoidance
7/27/2019 QoS Principle
31/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage31
Traffic Shaping and Policing
Classifier Marker Dropper
Meter
TrafficStream
7/27/2019 QoS Principle
32/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage32
Application of Traffic Shaping orPolicing
Low-SpeedLink
High-SpeedLink
No congestion on theegress.
Queues and WREDdo not work.
No congestion on theegress.
Queues and WREDdo not work.
Congestion occurs onlinks because no
packet is intelligentlydiscarded at layer 2.
Congestion occurs onlinks because no
packet is intelligentlydiscarded at layer 2.
ServerFarm
WAN
Internet
F
astEthe
rne
t
256 kbps
64 kbps
128 kbps
The accessresources are limited.
The accessresources are limited.
Use TDM on a singlephysical link orlease links.
Use TDM on a singlephysical link orlease links.
7/27/2019 QoS Principle
33/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage33
Traffic Shaping vs. Traffic Policing
Traffic Shaping
Traffic shaping does not discard packets.
Traffic shaping displays the congestion of frame relay communication.
Traffic Policing
Traffic policing supports the packet marking.
Traffic policing does not require Buffer to be added, whereas traffic
shaping requires additional queue system.
7/27/2019 QoS Principle
34/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage34
How Does the Router Measure the TrafficSpeed?
Use the token bucket mechanism to record the arrival rate of packets.
The token bucket functions only on the condition of new packets.
The conforming traffic and exceeding traffic are returned.
Bandwidth
Time
Link Bandwidth
Rate Limit
Exceeding Traffic
Conforming Traffic
7/27/2019 QoS Principle
35/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage35
700700200200
Token Bucket
500 bytes500 bytes 500 bytesConform Action
7/27/2019 QoS Principle
36/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage36
200200
Token Bucket (cont.)
300 bytes300 bytes Exceed Action
300bytes
7/27/2019 QoS Principle
37/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage37
Token Bucket
Bcrefers to the normal burst traffic.
Berefers to the excess burst traffic.
Bc + Be
Bc of tokens is added
every Tc [ms]
Tc= Bc / CIR
Time
LinkUtilization
Tc
2*Tc
3*Tc
4*Tc
5*Tc
Bc Bc Bc Bc Bc Bc
Link BW
Average BW(CIR)
Be
7/27/2019 QoS Principle
38/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage38
Traffic Shaping & Policing Mechanism
Shaping
Generic traffic shaping (GTS)
Frame Relay traffic shaping (FRTS)
Class-based traffic shaping
Policing
Committed access rate (CAR)
Class-based traffic policing
7/27/2019 QoS Principle
39/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage39
GTS
Traffic
Stream
Classifier Marker Shaper
Dropper
Meter
7/27/2019 QoS Principle
40/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage40
GTS Model
Classifier
Classifier
Classifier
No
No
NoPhysical Interface
Queue(s)
ShapingWFQ
Yes
Yes
Yes
ShapingWFQ
ShapingWFQ
No
No
No
Yes
Yes
Yes
Forwarder
7/27/2019 QoS Principle
41/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage41
GTS Implementation
Shaping
Queue(WFQ)
Shaping
Queue(WFQ)
SoftwareQueue(FIFO, PQ,
CQ, WFQ, ...)
SoftwareQueue(FIFO, PQ,
CQ, WFQ, ...)
Hardware
Queue(FIFO)
Hardware
Queue(FIFO)
Transmitpacketsbased on theconfiguredtraffic.
Transmitpacketsbased on theconfiguredtraffic.
Transmitpacketsbased on theline rate.
Transmitpacketsbased on theline rate.
Transmitpacketsbased on theline rate.
Transmitpacketsbased on theline rate.
If the hardware queue is
empty skip over it
directly.
If the hardware queue is
empty skip over it
directly.
Software queue does not work if the configured shaping rate ismuch less than the link bandwidth.
7/27/2019 QoS Principle
42/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage42
GTSExample #1
ISP expects to provide a service for subscribers. With this service, subscribers
can use the whole E1 line for 30s in case of burst, but the normal rate is 256
kbps.
GTS parameters
Bit rate: 256,000 output rate is 256,000 bps
Burst size32,000 the number of bits sent in 125 ms
Excess burst size: 61,440,000 = 2,048,000 x 30
7/27/2019 QoS Principle
43/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage43
Core
Customer
GTSExample #1 (cont.)
interface ethernet0/0
qos gts cir 256000 cbs 32000 ebs 61440000
!
interface serial1/0
qos gts cir 256000 cbs 32000 ebs 61440000
interface ethernet0/0
qos gts cir 256000 cbs 32000 ebs 61440000
!
interface serial1/0
qos gts cir 256000 cbs 32000 ebs 61440000
WAN
7/27/2019 QoS Principle
44/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage44
Core
Customer
GTSExample #2
Subscribers hope that the WEB traffic does not exceed
64 kbps.
WAN
interface ethernet 0/0
qos gts acl 101 cir 64000
interface serial 1/0
qos gts acl 101 cir 64000
!access-list 101 permit tcp any any eq www
interface ethernet 0/0
qos gts acl 101 cir 64000
interface serial 1/0
qos gts acl 101 cir 64000
!access-list 101 permit tcp any any eq www
7/27/2019 QoS Principle
45/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage45
CAR
Classifier Marker Dropper
Meter
Inboundor
Outbound
7/27/2019 QoS Principle
46/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage46
CAR Can Be Configured Both on the Egress andIngress.
Inbound Classifier Marker Dropper
Meter
Outbound
Classifier Marker Dropper
Meter
Forwarding
Queuing
7/27/2019 QoS Principle
47/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage47
CAR Implementation
Software queue does not work if the configured CAR value is
much less than the link bandwidth.
SoftwareQueue
(FIFO, PQ,CQ, WFQ, ...)
SoftwareQueue
(FIFO, PQ,CQ, WFQ, ...)
HardwareQueue
(FIFO)
HardwareQueue
(FIFO)
CARCAR
Transmitpacketsbased on theconfiguredtraffic.
Transmitpacketsbased on theconfiguredtraffic.
Transmitpacketsbased on theline rate.
Transmitpacketsbased on theline rate.
Transmitpacketsbased on theline rate.
Transmitpacketsbased on theline rate.
If the hardware queue is
empty skip over it
directly.
If the hardware queue is
empty skip over it
directly.
7/27/2019 QoS Principle
48/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage48
CAR Mechanism
Class 1?Class 1?
Class 2?Class 2?
Class n?Class n?
CARCAR
CARCAR
CARCAR
continue
continue
transmit
transmit
transmit
drop
drop
drop
Output Queueor
Forward
The CAR mechanism has three behaviors:TransmitContinueDrop
7/27/2019 QoS Principle
49/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage49
CAR Mechanism
MeterMeter
Conforms?Conforms?
Set IP Precedence?Set IP Precedence?
Set DSCP?Set DSCP?
Set MPLS Experimental?Set MPLS Experimental?
Set QoS group?Set QoS group?
Mark?Mark?
Transmit?Transmit?Yes / No
Set IP PrecedenceSet IP Precedence
Set DSCPSet DSCP
Set MPLS ExperimentalSet MPLS Experimental
Set QoS GroupSet QoS Group
Continue?Continue?
Drop?Drop?
Yes
Yes
Yes
No
No
Forwardor
Enqueue
Go toNext
CAR Command
Marking depends on the configured conform andexceed parameters.
Yes
Yes
Yes
Yes
7/27/2019 QoS Principle
50/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage50
CAR: LimitingExample #1
ISP connects all customers through the 2M leased link (or
ADSL) by using CAR to limit the communication traffic.
Provide various services according to the customer demand.
7/27/2019 QoS Principle
51/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage51
CAR: LimitingExample #1 (cont.)
ISPCustomer
Customer
2Mbps
2Mbps
Customer
2Mbp
s
NAP
Internet
interface serial 0/0
qos car input cir 256000 cbs 4000 ebs 96000
green pass red discard
qos car output cir 256000 cbs 4000 ebs 96000
green pass red discard
interface serial 0/0
qos car input cir 256000 cbs 4000 ebs 96000
green pass red discard
qos car output cir 256000 cbs 4000 ebs 96000
green pass red discard
7/27/2019 QoS Principle
52/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage52
CAR: Limiting and Marking Example#2
The WEB traffic is limited as 512 kbps and with high priority.
The priority of excess traffic is the same as that of normal traffic.
All traffic cannot exceed 256 kbps and should have the priority 0.
Excess traffic is discarded.
Normal burst traffic is 16000 bytes.
Extra burst traffic is 24000 bytes.
7/27/2019 QoS Principle
53/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage53
CAR: Limiting and MarkingExample #2 (cont.)
ISPCustomer
2 Mbps
NAP
Internet
interface serial 0/0
qos car input acl 101 cir 256000 cbs 4000 ebs 96000
green remark-prec-pass 1 red continue
qos car input cir 256000 cbs 16000 ebs 24000
green remark-prec-pass 0 red discard
qos car output acl 101 cir 512000 cbs 64000 ebs 128000
green remark-prec-pass 1 red continue
qos car output cir 256000 cbs 16000 ebs 24000
green remark-prec-pass 0 red discard
!
access-list 101 permit tcp any any eq www
access-list 101 permit tcp any eq www any
interface serial 0/0
qos car input acl 101 cir 256000 cbs 4000 ebs 96000
green remark-prec-pass 1 red continue
qos car input cir 256000 cbs 16000 ebs 24000
green remark-prec-pass 0 red discard
qos car output acl 101 cir 512000 cbs 64000 ebs 128000
green remark-prec-pass 1 red continue
qos car output cir 256000 cbs 16000 ebs 24000
green remark-prec-pass 0 red discard
!
access-list 101 permit tcp any any eq www
access-list 101 permit tcp any eq www any
7/27/2019 QoS Principle
54/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage54
Chapter 1 Basic QoS Concepts
Chapter 2 Packet Classification & Marking
Chapter 3 Traffic Policing & Shaping
Chapter 4 Congestion Control & AvoidanceChapter 4 Congestion Control & Avoidance
7/27/2019 QoS Principle
55/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage55
Congestion Control
In case of network congestion, guarantee that the packets with different
priorities can get different QoS, including delay and bandwidth.
Place the packets with different priorities into different queues. Various
queues are guaranteed with different scheduling priorities, discarding
probabilities, and bandwidth.
Algorithm
First In First Out (FIFO)
Priority Queue (PQ)
Custom Queue (CQ)
Weighted Fair Queuing (WFQ)
Inbound
Outbound
7/27/2019 QoS Principle
56/103
7/27/2019 QoS Principle
57/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage57
FIFO Advantages & Disadvantages
+ Advantages FIFO is simple and fast.
Support many devices manufactured by different vendors.
Support all HUAWEI VRP versions.
All switching channels support FIFO.
Disadvantages
Cannot assign bandwidth fairly.
Some traffic occupies bandwidth alone and make other traffic is discarded.
Cause jitter and some burst traffic fill in all queues.
7/27/2019 QoS Principle
58/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage58
PQ
PQ uses 4 FIFO queues.
Priority Queuing SystemPriority Queuing System
HardwareQueuing System
HardwareQueuing System
High?High? Queue 1Queue 1
Pre-emptiveScheduler
Pre-emptiveScheduler InterfaceInterface
Forwarded Packets
Hardware QHardware Q
Tail-dropTail-drop
Medium?Medium? Queue 2Queue 2Tail-dropTail-drop
Normal?Normal? Queue 3Queue 3Tail-dropTail-drop
Low?Low? Queue 4Queue 4Tail-dropTail-drop
7/27/2019 QoS Principle
59/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage59
PQ Classification
PQ classification supports the following options (for IP):
Source interface
IP access list (standard and extended)
Fragments
TCP source/destination port ID
UDP source/destination port ID
7/27/2019 QoS Principle
60/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage60
PQ Classification
PQ also supports other protocol options:
Other protocol access lists
Packet length (longer or shorter than the specified length)
The following protocols support PQ:
IPX
CLNS DECnet
AppleTalk
VINES
DLSw
7/27/2019 QoS Principle
61/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage61
PQ Insertion Policy
Each queue has its maximum capacity.
Before packets are placed into queues, the router queues these packets if
the queue is not full. Each class uses tail-drop.
7/27/2019 QoS Principle
62/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage62
PQ Scheduling
Packet inHIGH
queue?
Packet inHIGH
queue?
Packet inMEDIUMqueue?
Packet inMEDIUMqueue?
Packet inNORMALqueue?
Packet in
NORMALqueue?
Packet inLOW
queue?
Packet inLOW
queue?
Hardware QHardware Q
Yes
Yes
Yes
Yes
No
No
No
No
Dispatch packetand start checking the
HIGH queue again
Dispatch packetand start checking the
HIGH queue again
7/27/2019 QoS Principle
63/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage63
PQ Advantages & Disadvantages
+ Advantages
Transmit the packets with high priority at short delay.
Support devices manufactured by different vendors.
Support all HUAWEI VRP versions.
Disadvantages
Each PQ class has the disadvantages of FIFO.
The queue with low priority is discarded when congestion
occurs in the queue with high priority.
Configure the classification manually on each hop.
7/27/2019 QoS Principle
64/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage64
CQ
Custom Queuing SystemCustom Queuing System
HardwareQueuing System
HardwareQueuing System
Class 1?Class 1? Queue 1Queue 1
Round-Robin
Scheduler
Round-Robin
SchedulerInterfaceInterface
Forwarded Packets
Hardware QHardware Q
Tail DropTail Drop
Class 2?Class 2? Queue 2Queue 2Tail DropTail Drop
Class 16?Class 16? Queue 16Queue 16Tail DropTail Drop
CQ uses 16 FIFO queues for subscriber queues.
7/27/2019 QoS Principle
65/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage65
CQ Flowchart
Custom Queuing SystemCustom Queuing System
HardwareQueuing System
HardwareQueuing SystemClass 1?
Class 1? Queue 1Queue 1
Round-Robin
Scheduler
Round-Robin
Scheduler
Inter-faceInter-face
Forwarded Packets
Hardware QHardware Q
Tail DropTail Drop
Class 2?Class 2? Queue 2Queue 2Tail DropTail Drop
Class 16?Class 16? Queue 16Queue 16Tail DropTail Drop
Class 0?Class 0? Queue 0Queue 0Tail DropTail Drop
Pre-emptiveScheduler
Pre-emptiveScheduler
Custom queuing has Queue 0 forsystem and link-level messagesthat use pre-emptive scheduling.
Custom queuing has Queue 0 forsystem and link-level messagesthat use pre-emptive scheduling.
Queue 1 is the lowestcustom queue that is
serviced by the round-robin scheduler.
Queue 1 is the lowestcustom queue that is
serviced by the round-robin scheduler.
7/27/2019 QoS Principle
66/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidentialpage66
CQ Flowchart
Custom Queuing SystemCustom Queuing System
HardwareQueuing System
HardwareQueuing SystemClass 1?
Class 1? Queue 1Queue 1
Round-Robin
Scheduler
Round-Robin
Scheduler
Inter-faceInter-face
Forwarded Packets
Hardware QHardware Q
Tail DropTail Drop
Class 2?Class 2? Queue 2Queue 2Tail DropTail Drop
Class 16?Class 16? Queue 16Queue 16Tail DropTail Drop
Custom queues can beconfigured to use the pre-
emptive scheduler.
Queue 2 is now the lowestcustom queue that is
serviced by the round-robin scheduler.
Class 0?Class 0? Queue 0Queue 0Tail DropTail Drop
Pre-emptiveScheduler
Pre-emptiveScheduler
7/27/2019 QoS Principle
67/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page67
CQ Classification
CQ classification covers the following options (for IP):
Source interface
IP access list (standard and extended)
Packet length (longer or shorter than the specified length)
Fragments
TCP source/destination port ID
UDP source/destination port ID
CQ classification is the same as the PQ classification.
7/27/2019 QoS Principle
68/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page68
CQ Insertion Policy
Each queue has its maximum capacity.
Before packets are placed into queues, the router queues
these packets if the queue is not full. Each class uses tail-
drop.
7/27/2019 QoS Principle
69/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page69
CQ Scheduling
CQ uses the round-robin scheduling.
Each queue uses the round-robin scheduling to transmit packets
according to the pre-configured threshold.
Packet inQueue N?
Packet inQueue N?
Hardware QHardware Q
Yes
No
DispatchPacket
DispatchPacket
Is Queue Nover the
threshold?
Is Queue Nover the
threshold?
No
Next Queue(increase N)
Next Queue(increase N)
Yes
7/27/2019 QoS Principle
70/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page70
CQ Scheduling
The threshold parameterbyte-count defines the maximum byte number in
each forwarding for queues.
The router allows to send out a complete packet, even though the byte
number exceeds the threshold.
150014991500
Threshold (byte-count) = 3000Threshold (byte-count) = 3000
Up to 4499 bytes can be forwarded in oneround in the worst case.
Up to 4499 bytes can be forwarded in oneround in the worst case.
7/27/2019 QoS Principle
71/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page71
CQ Advantages & Disadvantages
+ Advantages
Guarantee the service for all queues, and no traffic is discarded.
Support devices manufactured by different vendors.
Support all HUAWEI VRP versions.
Disadvantages
Each CQ class has the disadvantages of FIFO.
Configure the classification manually on each hop.
Bandwidth is assigned inaccurately.
Scheduling causes jitter.
7/27/2019 QoS Principle
72/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page72
WFQ
Weighted Fair Queuing (WFQ) uses the traffic FIFO queue.
Weighted Fair Queuing SystemWeighted Fair Queuing System
HardwareQueuing System
HardwareQueuing System
Flow 1?Flow 1? Queue 1Queue 1
WFQScheduler
WFQScheduler InterfaceInterface
Forwarded Packets
Hardware QHardware Q
Flow 2?Flow 2?
Queue 2Queue 2
Flow N?Flow N? Queue NQueue N
WFQ dropWFQ drop
WFQ dropWFQ drop
WFQ dropWFQ drop
7/27/2019 QoS Principle
73/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page73
WFQ Tool
Parameter
Classification mechanism
Weighted fairness Each queue uses the improved tail-drop.
7/27/2019 QoS Principle
74/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page74
WFQ Classification
IP TCP PayloadIP TCP Payload
Src.Addr.
Dest.Addr.
Protocol ToS Src.Port
Dest.Port
Hash AlgorithmHash Algorithm
#queue(index of the queue)
The packets of the same traffic are terminated in the same
queue.
The TOS field is the only changeable parameter. Changing thisparameter enables the packets of the same traffic to beterminated in different queues.
WFQ classification uses the
following parameters: Source IP address Destination IP address Source TCP/UDP port Destination TCP/UDP port Transport protocol Type of service (ToS)
WFQ classification uses the
following parameters: Source IP address Destination IP address Source TCP/UDP port Destination TCP/UDP port Transport protocol Type of service (ToS)
The HASH algorithm is used to provide
queue indexes when packets enter the
queue.
The HASH algorithm is used to provide
queue indexes when packets enter the
queue.
WFQ I ti & Di di
7/27/2019 QoS Principle
75/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential
WFQ Insertion & DiscardingMechanism
Hold-queue out limit (HQO) restricts the total number of packets that can be
placed in all queues.
Congestive discard threshold(CDT) limits the number of packets that can be
placed in each queue.
N is an SN given to the classified packets before the decision that whether the
packets enter the queues or are discarded.
N>CDT?N>CDT?N>HQO?N>HQO?
WorstFinishTime?
WorstFinishTime?
WorstFinishTime?
WorstFinishTime?
EnqueuePacket
EnqueuePacketNth PacketNth Packet
Drop the packet with theworst finish time (old) andenqueue the Nth packet
(new).
Drop the packet with theworst finish time (old) andenqueue the Nth packet
(new).
No No
Yes
Yes Yes
No
No
Yes
New
Old
7/27/2019 QoS Principle
76/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page76
Case Study
WFQ can contain 10 packets at maximum (hold-queue limit =
10).
The early packet discarding (for the invasive packet to
bandwidth) should be enabled when eight packets arrive. And
eight packets is the threshold for discarding packets in case of
congestion.
C St d
7/27/2019 QoS Principle
77/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page77
Case Study:Interface Congestion
HQO reaches its upper threshold 10. Newly arrived packets are discarded as
the TDM system places them at the end.
C St d
7/27/2019 QoS Principle
78/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page78
Case Study:Interface Congestion
HQO reaches its upper threshold 10. Newly arrived packets are not discarded
as the TDM system does not place them at the end. Instead, the packets
placed at the end are discarded.
C St d
7/27/2019 QoS Principle
79/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page79
Case Study:Traffic Congestion
CDT exceeds its upper limit 8. Newly arrived packets are discarded for the TDM
system places them at the end.
C St d
7/27/2019 QoS Principle
80/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page80
Case Study:Traffic Congestion
CDT exceeds its upper limit 8. Newly arrived packets enter the queue as they
are not placed at the end.
7/27/2019 QoS Principle
81/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential
WFQ Discarding Mechanism
The packets that are placed in the empty sub-queue will not
be discarded forever.
The packet priority does not affect the discarding mechanism.
7/27/2019 QoS Principle
82/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page82
WFQ Scheduling
Each packet are marked with the finish time in the TDM system.
WFQ scheduling mechanism sends the packets marked with the earliest
finish time out of the TDM system.
refer to the On the Efficient Implementation of Fair Queuing, written by Keshav and Berkeley in
1994.
7/27/2019 QoS Principle
83/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page83
Weight
Flow with P=001
Flow with P=000
WFQ System (Real-Size Packets)
1
1
2
23
Flow with P=001
Flow with P=000
WFQ System (Virtual-Size Packets)
1
1
2
23
Precedence-1 packets
appear half the realsize.
Hardware FIFO Queue
123 12
34
3
Precedence-1 flow getstwice as muchbandwidth as
Precedence-0 flow.
Virtual Packet Size = Real Packet Size / (IP Precedence + 1)
Mapping Between IP Priority and
7/27/2019 QoS Principle
84/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page84
Mapping Between IP Priority andWeight
1024 (virtual IP Precedence)
32 (virtual IP Precedence)
7
6
5
4
3
2
1
0
IP Precedence
4 (RSVP)
128 (PAK-Priority)
512
585
682
819
1024
1365
2048
4096
Weight
7/27/2019 QoS Principle
85/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page85
WFQ Advantages & Disadvantages
+ Advantages Be simple to configure.
Guarantee the transmission of all traffic.
Preferentially discard the packets that is invasive to bandwidth.
Support devices manufactured by different vendors.
Support all HUAWEI VRP versions.
Disadvantages
Each WFQ class has all disadvantages of FIFO.
Multiple traffic is terminated in a queue.
Cannot configure classification.
Cannot guarantee a certain bandwidth.
Performance is damaged by complex classification and schedulingmechanisms.
Comparison Between Several Queues
7/27/2019 QoS Principle
86/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page86
Comparison Between Several Queues
Weighted Fair Queuing Priority Queuing Custom Queuing
No queue lists
Low-volume trafficgiven priority
Conversationdispatching
Interactive trafficgets priority
Works well on speedsup to 2 Mbps
Enabled by default
4 queues
High-priority queueserviced first
Packet-by-packetdispatching
Critical traffic getsthrough
Designed forlow-bandwidth links
Must configure
16 queues
Round-robin service
Threshold dispatching
Proportional allocationof bandwidth
Designed formedium-speed links
Must configure
7/27/2019 QoS Principle
87/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page87
Disadvantages of Tail-Drop
Simple tail dropping has significant disadvantages:
TCP synchronization
TCP starvation
High delay and jitter
Packet discarding without distinguishing them
Have no better way to provide the feedback of TCP traffic
7/27/2019 QoS Principle
88/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page88
TCP Synchronization
Multiple TCP sessions begin at different time.
The TCP slide window increases.
Tail-drop causes the packet of multiple sessions lost at the same time.
Multiple TCP sessions restart at the same time (synchronization).
Flow A
Flow B
Flow C
Average linkuse
7/27/2019 QoS Principle
89/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page89
TCP Starvation, Delay, and Jitter
Too long queue causes delay.
A large amount of invasive traffic causes other traffic discarded.
Frequent buffer changes cause jitter.
Discard packets without distinguishing them.
Prec.0
Prec.0
Prec.0
Prec.0
Prec.0
Prec.0
Prec.0
Prec.0
Prec.3
Prec.3 Queue
Packet of theinvasive traffic
Prec.3
Packet of thestaving traffic
Delay
If the interface congestion persists,
traffic suffers delay for a long time.
Prec.3
Prec.3
TCP has no
feedback
mechanism
when multiple
packets are
discarded.
Tail-drop is
regardless of
the IP priority.
7/27/2019 QoS Principle
90/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page90
Random Early Detection
Random early detection (RED) discards packets at random before the queueis full.
Packets discarded by RED increase gradually with the queue expansion.
Influence given by RED :
The speed of the TCP session slows down and approaches to the linkbandwidth.
Compared with the maximum queue length, the average queue length isshortened.
The IP priority can be used to preferentially discard the packet that has lowpriority and is invasive to bandwidth.
7/27/2019 QoS Principle
91/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page91
RED Profile
Average
Queue
Size
DropProbability
10%
100%
20 40
MinimumThreshold
MaximumThreshold
MaximumDrop
Probability
No drop Random drop Full drop
7/27/2019 QoS Principle
92/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page92
RED Modes
RED has the following modes:
No drop: It functions when the average queue length is between 0
and the lower threshold.
Random drop: It functions when the average queue length is
between the upper and the lower thresholds.
Full drop/tail drop: It functions when the average queue length is
equal to or bigger than the upper threshold.
RED can prevent congestion and tail-drop.
7/27/2019 QoS Principle
93/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page93
Before RED
The TCP synchronization prevents the value of average link use from
approaching to the link bandwidth.
Tail drops slows down the TCP session start.
Flow A
Flow B
Flow C
Average linkuse
7/27/2019 QoS Principle
94/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page94
After RED
The value of average link use gets close to the link bandwidth.
Random drops reduces the value of slide windows for the TCP session.
Average linkuse
Flow A
Flow B
Flow C
7/27/2019 QoS Principle
95/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page95
WRED
Compared with RED, WRED introduces weight. Various weights
have different discarding policy.
Each discarding policy contains three RED parameters:
Lower threshold
Upper threshold
Upper discarding probability
Weight can be
IP Precedence (8 profiles)
DSCP (64 profiles)
At present, the WRED weight can be divided according to DSCP andthe IP priority. The probability of discarding the packet of low priority
is higher than that of the packet of high priority.
7/27/2019 QoS Principle
96/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page96
Different RED Parameters
WRED profiles can be manually set. WRED has 8 default value sets for IP priority-based WRED.
WRED has 64 default value sets for DSCP-based WRED.
Average
Queue
Size
DropProbability
10%
100%
20 4010
Mapping Between the IP Priority and RED
7/27/2019 QoS Principle
97/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page97
Mapping Between the IP Priority and REDParameters
AverageQueueSize
DropProbability
10%
100%
20 40
RSVP0 1 2 3 4 5 6 7
22 24 26 28 31 33 35 37
IP Precedence
DSCP-based WRED
7/27/2019 QoS Principle
98/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page98
DSCP based WRED
(Expedited Forwarding)
Average
Queue
Size
Drop
Probability
10%
100%
20 40
EF
36
DSCP-based WRED
7/27/2019 QoS Principle
99/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page99
DSCP based WRED
(Assured Forwarding)
Average
Queue
Size
Drop
Probability
10%
100%
20 40
Assured Forwarding High Drop
3224 28
Assured Forwarding Medium Drop
Assured Forwarding Low Drop
WRED M d l
7/27/2019 QoS Principle
100/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page
WRED Model
IP PacketIP Packet WREDWRED
Calculating the
average queuelength
Calculating the
average queuelength
FIFO QueueFIFO Queue
Select the
WRED
profile
Select the
WRED
profile
Current
Queue
Size
IP Precedence
or
DSCP
Minimum Threshold
Maximum Threshold
Queue
Full?
Queue
Full?
No
Yes
Tail DropRandom Drop
WRED P li
7/27/2019 QoS Principle
101/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page
WRED Policy
IPIPPriorityPriority MeaningMeaning
00 High-dropHigh-drop,, bestbest--effort trafficeffort traffic
Low-dropLow-drop,, best-effort trafficbest-effort traffic11
33 Premium traffic in the contractPremium traffic in the contract
22 Premium traffic outside of the contractPremium traffic outside of the contract
44 UnusedUnused
55 VoiceVoice overover IPIP
66 Routing protocol trafficRouting protocol traffic
77 Routing protocol trafficRouting protocol traffic
WRED E l
7/27/2019 QoS Principle
102/103
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page
WRED Examples
P
acketDiscard
Probability
Average
Queue Size
0.1
RSVP1
51
02
02
530
35
37
Priority 2
Priority 0
Priority 3
Priority 1
VoIP
Routing
7/27/2019 QoS Principle
103/103
Thank you
www.huawei.com