Вы находитесь на странице: 1из 103

For internal use only

QoS Principle

ISSUE 1.0
www.huawei.com

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential


 By taking this course, we can
master the following topics:
 Basic QoS concepts
 Traffic policing & traffic shaping
 Congestion control
 Congestion avoidance

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page1


Chapter 1 Basic QoS Concepts

Chapter 2 Packet Classification & Marking

Chapter 3 Traffic Policing & Shaping

Chapter 4 Congestion Control & Avoidance

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page2


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page3


Bandwidth Limit

IP IP IP IP

512 kbps
256 kbps
10 Mbps
100 Mbps

BWmax = min(10M, 256k, 512k, 100M)=256 kbps


BWavail = BWmax /Flows

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page4


End-to-End Delay

IP IP IP IP

Propagation Propagation Propagation


Delay (P1) Delay (P2) Delay (P3) Propagation
Delay (P4)
Processing and Processing and Processing and
Queuing Delay (Q1) Queuing Delay (Q2) Queuing Delay (Q3)

Delay = P1 + Q1 + P2 + Q2 + P3 + Q3 + P4 = X ms

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page5


Delay

Forwarding

Bandwidth
IP IP IP IP

Processing Delay Queuing Delay


Transit Delay

 Processing delay
 Queuing delay
 Transit delay

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page6


Packet Loss

Forwarding

IP IP IP IP IP

Tail-drop

 Tail-drop occurs when the transmitting queue is overlong. It is the


most 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 case
of router congestion.
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page7
How To Reduce Delay?
TCP Header Compression
RTP Header Compression

cTCP Data

Compress
the Headers

IP TCP Data Fancy


FIFO queuing
Queuing
Compress
the Payload
Priority Queuing (PQ)
Custom Queuing (CQ)
Stacker Modified Deficit Round Robin (MDRR)
Compressed Packet
Predictor Class-Based Weighted Fair Queing (CBWFQ)

• Expand the link bandwidth.


• Forward critical packets preferentially.
• Compress the valid load of the Layer2 frame.
• Compress the header of the IP packet.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page8


How To Reduce the Packet Loss Rate?

Weighted Random Early Detection (WRED)

IP Data Dropper Fancy


FIFO queuing
Queuing

Custom Queuing (CQ)


Modified Deficit Round Robin (MDRR)
Class-Based Weighted Fair Queuing (CBWFQ)

• Expand the link bandwidth.


• Provide adequate bandwidth for delay-sensitive services.

• Use the random discard mechanism to prevent congestion.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page9


Mapping Between Services and QoS Requirements

Throughput Delay Loss Jitter

Interactive Not
(e.g., Telnet) Low Low Low important

Batch (e.g., Not Not


FTP) High important Low important

Fragile (e.g,. Low Low None Not


SNA) important

Voice Low Low and Low Low


predictable

Video High Low and Low Low


predictable

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page10


Different Effects of Various Services

Throughput Delay Loss Jitter

Gold Guaranteed Low Low Low

No No No
Silver Guaranteed guarantee guarantee guarantee

Bronze Guaranteed No No No
limited guarantee guarantee guarantee

Best Effort No No No No
guarantee guarantee guarantee guarantee

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page11


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 the
requirement.
 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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page12


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page13


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page14


IntServ

Local Remote Admission Local


Admission Control Admission
Control Control
Policy Enforcement
Point (PEP)
request request request request

reserve reserve reserve reserve

request

reply
Policy Decision
Point (PDP)

Resource reservation
Admission control

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page15


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)

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page16


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page17


IntServ Application

RSVP

Class of Service
or
Best Effort

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page18


IntServ Application— End-to-End

RSVP

All Routers
• WFQ applied per flow
based on RSVP requests

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page19


IntServ – DiffServ Integration
RSVP RSVP

Precedence
Classifier

WRED
Premium Egress Router
Standard
• RSVP protocol
sent on to destination
Ingress Router • WFQ applied to
• RSVP protocol manage egress flow
Mapped to classes
Passed through to Backbone
egress • WRED applied based
on class
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page20
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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page21


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page22


DiffServ Model Structure
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 traffic
transmitted 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 DiffServ DiffServ
to the PHB attribute. network SLA/TCA network
Inner Inner
Classify services and node Boundary Boundary node
adjust traffic on the edge node node
of network. Boundary
Boundary
- Service classification node
node
. Based on the DS field Traffic
. Based on other features control
- Traffic adjustment
. Measure
. Mark Subscriber Subscriber
. Discard network network
. Shape

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page23


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page24


Packet Header

DSCP Field: 6 bits Unused: 2 bits

Former ToS Byte = New DS Field

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).

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page25


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

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page26


Chapter 1 Basic QoS Concepts

Chapter 2 Packet Classification & Marking

Chapter 3 Traffic Policing & Shaping

Chapter 4 Congestion Control & Avoidance

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page27


Packet Classification & Marking

ACL , IP priority

 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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page28


Chapter 1 Basic QoS Concepts

Chapter 2 Packet Classification & Marking

Chapter 3 Traffic Policing & Shaping

Chapter 4 Congestion Control & Avoidance

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page29


Traffic Shaping and Policing

Meter

Classifier Marker Dropper


Traffic
Stream

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page30


Application of Traffic Shaping or Policing

High-Speed Low-Speed
Link Link
WAN

No congestion on the Congestion occurs on


egress. links because no
Queues and WRED packet is intelligently
do not work. discarded at layer 2.

256 kbps
Use TDM on a
The access resources
single physical
are limited.
link or lease
FastEthernet

64 kbps
links.

128 kbps
Server
Farm Internet

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page31


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page32


How Does the Router Measure the Traffic Speed?

Bandwidth
Link Bandwidth

Exceeding Traffic

Rate Limit

Conforming Traffic

Time
 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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page33


Token Bucket

700
200

500 bytes Conform Action 500 bytes

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page34


Token Bucket (cont.)

200

300 bytes Exceed Action

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page35


Token Bucket
Be
Link Link BW
Bc of tokens is added
Utilization
every Tc [ms]
Bc Bc Bc Bc Bc Bc Average BW
(CIR)
Tc = Bc / CIR

Tc 2*Tc 3*Tc 4*Tc 5*Tc Time

Bc + Be

 Bc refers to the normal burst traffic.


 Be refers to the excess burst traffic.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page36


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

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page37


GTS

Meter

Shaper
Classifier Marker
Dropper
Traffic
Stream

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page38


GTS Model

Shaping
Forwarder Classifier Yes No
WFQ

No

No Shaping
Classifier Yes Yes
WFQ

No
Yes

Shaping
Classifier Yes No
WFQ
Yes

No
Physical Interface
Queue(s)

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page39


GTS Implementation
Transmit
Transmit Transmit
packets
packets packets based
based on the
based on the on the line
configured
line rate. rate.
traffic.

Shaping Software Hardware


Queue Queue Queue
(FIFO, PQ,
(WFQ) (FIFO)
CQ, WFQ, ...)

If the hardware queue is


empty,skip over it directly.

 Software queue does not work if the configured shaping rate is


much less than the link bandwidth.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page40


GTS
Example #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 size—32,000 the number of bits sent in 125 ms
− Excess burst size: 61,440,000 = 2,048,000 x 30

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page41


GTS
Example #1 (cont.)

WAN

Core

Customer
interface ethernet0/0
qos gts cir 256000 cbs 32000 ebs 61440000
!
interface serial1/0
qos gts cir 256000 cbs 32000 ebs 61440000

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page42


GTS
Example #2

WAN

Core

Customer
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

• Subscribers hope that the WEB traffic does not exceed


64 kbps.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page43


CAR

Meter
Inbound
or
Outbound
Classifier Marker Dropper

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page44


CAR Can Be Configured Both on the Egress and Ingress.

Meter

Classifier Marker Dropper


Inbound

Forwarding

Outbound

Meter

Classifier Marker Dropper Queuing

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page45


CAR Implementation

Transmit Transmit Transmit


packets packets packets
based on the based on the based on the
configured line rate. line rate.
traffic.

Software Hardware
CAR Queue Queue
(FIFO, PQ,
(FIFO)
CQ, WFQ, ...)

If the hardware queue is


empty,skip over it directly.

 Software queue does not work if the configured CAR value is


much less than the link bandwidth.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page46


CAR Mechanism
drop
transmit
Class 1? CAR
continue

drop
transmit
Output Queue
Class 2? CAR or
Forward
continue

drop
transmit
Class n? CAR

• The CAR mechanism has three behaviors:


– Transmit
– Continue
– Drop

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page47


CAR Mechanism

Meter

Yes Forward
Yes / No
Conforms? Transmit? or
Enqueue
No

Go to
Mark? Yes
Continue? Next
CAR Command
Yes No
Set IP Precedence? Set IP Precedence

Yes
Yes Drop?
Set DSCP? Set DSCP

Yes
Set MPLS Experimental? Set MPLS Experimental

Yes
Set QoS group? Set QoS Group

• Marking depends on the configured conform and


exceed parameters.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page48


CAR: Limiting
Example #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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page49


CAR: Limiting
Example #1 (cont.)
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

Customer

Internet

NAP
Customer ISP

Customer

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page50


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page51


CAR: Limiting and Marking
Example #2 (cont.)

2 Mbps
Internet

Customer NAP
ISP

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
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page52
Chapter 1 Basic QoS Concepts

Chapter 2 Packet Classification & Marking

Chapter 3 Traffic Policing & Shaping

Chapter 4 Congestion Control & Avoidance

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page53


Congestion Control

Inbound

Outbound

 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)

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page54


FIFO Queuing

Forwarded Packets

FIFO Queuing System Hardware


Queuing System
All in one FIFO
Tail-drop Queue 1 Hardware Q Interface
queue Scheduler

FIFO

FIFO uses one queue.

If the queue is full, the newly


arrived packet is discarded.
All packets are classified
into a class.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page55


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page56


PQ

Forwarded Packets

Priority Queuing System

High? Tail-drop Queue 1

Hardware
Medium? Tail-drop Queue 2 Queuing System
Pre-emptive
Scheduler Hardware Q Interface

Normal? Tail-drop Queue 3

Low? Tail-drop Queue 4

 PQ uses 4 FIFO queues.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page57


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

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page58


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

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page59


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page60


PQ Scheduling

Packet in No
HIGH
queue?

Packet in No
Yes
MEDIUM
queue?

Packet in No
Yes
NORMAL
queue?

Packet in No
Yes
LOW
queue?

Yes
Dispatch packet
and start checking the Hardware Q
HIGH queue again

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page61


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page62


CQ

Forwarded Packets

Custom Queuing System

Class 1? Tail Drop Queue 1

Hardware
Class 2? Tail Drop Queue 2 Queuing System
Round-
Robin Hardware Q Interface
Scheduler

Class 16? Tail Drop Queue 16

 CQ uses 16 FIFO queues for subscriber queues.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page63


CQ Flowchart
Forwarded Packets
Custom queuing has Queue
Custom Queuing System 0 for system and link-level
messages that use pre-
emptive scheduling.
Class 0? Tail Drop Queue 0

Class 1? Tail Drop Queue 1 Hardware


Queuing System
Pre-emptive
Scheduler Hardware Q Inter-face
Class 2? Tail Drop Queue 2
Round-
Robin
Scheduler

Queue 1 is the lowest


custom queue that is
Class 16? Tail Drop Queue 16 serviced by the round-
robin scheduler.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page64


CQ Flowchart
Forwarded Packets

Custom Queuing System Custom queues can be


configured to use the
Class 0? Tail Drop Queue 0 pre-emptive scheduler.

Class 1? Tail Drop Queue 1 Hardware


Queuing System
Pre-emptive
Scheduler Hardware Q Inter-face
Class 2? Tail Drop Queue 2

Queue 2 is now the


Round- lowest custom queue
Robin that is serviced by the
Scheduler round-robin
scheduler.

Class 16? Tail Drop Queue 16

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page65


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page66


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page67


CQ Scheduling

No

Is Queue N
Packet in No Next Queue Yes
over the
Queue N? (increase N)
threshold?

Yes

Dispatch
Packet Hardware Q

 CQ uses the round-robin scheduling.


 Each queue uses the round-robin scheduling to transmit packets
according to the pre-configured threshold.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page68


CQ Scheduling

1500 1499 1500

Threshold (byte-count) = 3000

Up to 4499 bytes can be forwarded in


one round in the worst case.

 The threshold parameter byte-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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page69


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page70


WFQ
Forwarded Packets

Weighted Fair Queuing System

Flow 1? WFQ drop Queue 1

Hardware
Flow 2? WFQ drop Queue 2 Queuing System
WFQ
Scheduler Hardware Q Interface

Flow N? WFQ drop Queue N

 Weighted Fair Queuing (WFQ) uses the traffic FIFO queue.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page71


WFQ Tool

 Parameter
− Classification mechanism
− Weighted fairness
 Each queue uses the improved tail-drop.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page72


WFQ Classification
WFQ classification uses the
following parameters:
IP TCP Payload • Source IP address
• Destination IP address
• Source TCP/UDP port
• Destination TCP/UDP port
Src. Dest. Protocol ToS Src. Dest.
Addr. Addr. Port Port
• Transport protocol
• Type of service (ToS)

Hash Algorithm The HASH algorithm is used to provide


queue indexes when packets enter the
queue.

#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 this
parameter enables the packets of the same traffic to be
terminated in different queues.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page73


WFQ Insertion & Discarding Mechanism
No No Enqueue
Nth Packet N>HQO? N>CDT?
Packet

Yes Yes

Worst Worst
Yes No
Finish Finish
Time? Time?

No Yes
Old
Drop the packet with
the worst finish time
(old) and enqueue the
Nth packet (new).

New

 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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page75


Case Study:
Interface Congestion

HQO reaches its upper threshold 10. Newly arrived packets are discarded as
the TDM system places them at the end.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page76


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page77


Case Study:
Traffic Congestion

CDT exceeds its upper limit 8. Newly arrived packets are discarded for the TDM
system places them at the end.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page78


Case Study:
Traffic Congestion

CDT exceeds its upper limit 8. Newly arrived packets enter the queue as they
are not placed at the end.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page79


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page81


Weight
WFQ System (Real-Size Packets)
Flow with P=001 2 1

Flow with P=000 3 2 1

Virtual Packet Size = Real Packet Size / (IP Precedence + 1) Precedence-1


packets appear
half the real size.
WFQ System (Virtual-Size Packets)
Flow with P=001 4 3 2 1
Precedence-1 flow
gets twice as much
Flow with P=000 3 2 1 bandwidth as
Precedence-0 flow.

Hardware FIFO Queue


3 3 2 2 1 1

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page82


Mapping Between IP Priority and Weight

IP Precedence Weight


0 4096

1 2048
2 1365

3 1024

4 819

5 682

6 585

7 512

32 (virtual IP Precedence) 128 (PAK-Priority)

1024 (virtual IP Precedence) 4 (RSVP)

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page83


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 scheduling
mechanisms.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page84


Comparison Between Several Queues

Weighted Fair Queuing Priority Queuing Custom Queuing

No queue lists 4 queues 16 queues

Low-volume traffic High-priority queue Round-robin service


given priority serviced first
Conversation Packet-by-packet Threshold dispatching
dispatching dispatching
Interactive traffic Critical traffic gets Proportional allocation
gets priority through of bandwidth
Works well on speeds Designed for Designed for
up to 2 Mbps low-bandwidth links medium-speed links
Enabled by default Must configure Must configure

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page85


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

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page86


TCP Synchronization

Average link Flow A


use
Flow B

Flow C

 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).

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page87


TCP Starvation, Delay, and Jitter

Packet of the Packet of the


staving traffic invasive traffic

Prec. Prec. Prec. Prec. Prec. Prec. Prec. Prec.


3 3 3 0 3 0 0 0 Queue

TCP has no Delay


feedback
mechanism Tail-drop is
regardless of If the interface congestion persists,
when multiple
the IP priority. traffic suffers delay for a long time.
packets are
discarded.

 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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page88


Random Early Detection

 Random early detection (RED) discards packets at random before the queue
is 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 link
bandwidth.
− Compared with the maximum queue length, the average queue length is
shortened.
 The IP priority can be used to preferentially discard the packet that has low
priority and is invasive to bandwidth.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page89


RED Profile

Drop
No drop Random drop Full drop
Probability
100%

Maximum
Drop
Probability

10%

20 40 Average
Queue
Size
Minimum Maximum
Threshold Threshold

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page90


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.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page91


Before RED

Average link Flow A


use
Flow B

Flow C

 The TCP synchronization prevents the value of average link use from
approaching to the link bandwidth.
 Tail drops slows down the TCP session start.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page92


After RED

Average link
use
Flow A

Flow B

Flow C

 The value of average link use gets close to the link bandwidth.
 Random drops reduces the value of slide windows for the TCP session.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page93


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 and
the IP priority. The probability of discarding the packet of low priority
is higher than that of the packet of high priority.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page94


Different RED Parameters

Drop
Probability
100%

10%

10 20 40 Average
Queue
 WRED profiles can be manually set. Size

 WRED has 8 default value sets for IP priority-based WRED.


 WRED has 64 default value sets for DSCP-based WRED.

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page95


Mapping Between the IP Priority and RED Parameters

Drop
Probability

100%

10%

IP Precedence 0 1 2 3 4 5 6 7 RSVP Average


20 22 24 26 28 31 33 35 37 40 Queue
Size

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page96


DSCP-based WRED
(Expedited Forwarding)
Drop
Probability

100%

10% EF

Average
20 36 40 Queue
Size

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page97


DSCP-based WRED
(Assured Forwarding)
Drop
Probability

100%

Assured Forwarding Low Drop


Assured Forwarding Medium Drop

Assured Forwarding High Drop

10%

Average
20 24 28 32 40 Queue
Size

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page98


WRED Model
Calculating the
average queue
length Current
Queue
Size

Queue No
IP Packet WRED Full?
FIFO Queue

IP Precedence
Yes
or
DSCP

Select the
WRED
Random Drop Tail Drop
profile
Minimum Threshold
Maximum Threshold

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page99


WRED Policy

IP Priority Meaning
0 High-drop, best-effort traffic
1 Low-drop, best-effort traffic
2 Premium traffic outside of the contract

3 Premium traffic in the contract

4 Unused
5 Voice over IP

6 Routing protocol traffic


7 Routing protocol traffic

HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page100


WRED Examples
Packet Discard
Probability

VoIP
Priority 3

Routing
0.1
Priority 1

Priority 2

Priority 0
Average
Queue Size RSVP
10

15

20

25

30

35

37
HUAWEI TECHNOLOGIES CO., LTD. HUAWEI Confidential page101
Thank you
www.huawei.com

Вам также может понравиться