You are on page 1of 27

ZXMW NR8250 V2.

00 Key Technolo
gy-QoS

Microwave Product Support Department June. 2012


> 内部公开

Intended Audience
Pre-sale /After-sale Engineers for NR8250 V2.00

Course Objective
Master the basic principle of QoS for NR8250 V2.00 and know
how to configure for typical scenarios after learning this course.

© ZTE Corporation. All rights


reserved.
> Internal only

Preface

QoS ( Quality of Service ) is used to evaluate the satisfication a


bility between service provider and customer requirement.

In Internet, QoS is used to evaluate the delivery capability for pac


ket. The evaluation is based on different aspects, because of the
diversity of network service. Generally speaking, the QoS evaluati
on is based on delay, jitter, packet loss rate . For example, the Qo
S requirement for bear network in NGN mentioned in <China Tele
com Soft Switch Network Technology> is as follows: packet loss r
ate ≤1%, jitter ≤20ms, delay ≤100ms for media flow and packet los
s rate ≤0.1%, packet error rate ≤10-4, delay ≤100ms for signaling f
low.

© ZTE Corporation. All rights 3


reserved.
> Internal only

Basic Concept for IP QoS

• IP QoS is one kind of capability for IP network. That is to provide


the required service quality on packet loss rate, delay , jitter and
bandwidth etc in IP network which steps over various network te
chnology( ATM, Ethernet, SDH, MPLS etc)

• IP QoS Objective : Control and use the network resources effici


ently
– Avoid and manage the IP network congestion
– Decrease the loss rate for IP packet
– Regulate and control the IP traffic
– Provide the dedicated bandwidth for the specific user or ser
vice
– Support the real-time service for IP network

© ZTE Corporation. All rights 4


reserved.
> Internal only

IP QoS Model
IntServ Model : Service applies for the specific QoS Service
to network by signaling, network reserves the related resources
to meet this requirement in the scope of traffic parameter
description.

DiffServ Model : When the network congestion occurs,


control and forward traffic differently according to different SLA
in order to solve the congestion problem.

DiffServ Model is adopted in microwave equipment in general.


This course is only to introduce DiffServ Model in details.

© ZTE Corporation. All rights


reserved.
> Internal only

NR8250 V2.00 QoS Flow Chart

Traffic Classifier Traffic Policing Congestion avoidance and management Traffic Shaping

•CAR •Queue Schedule


•Priority Queue
•Ingress Rate Limit Management •Traffic Shaping based on
Mapping
•Ingress Broadcast •Congestion Management priority queue or port
•ACL Flow Classifier
Suppression •Pack aging

Ingress QoS Egress QoS


© ZTE Corporation. All rights 6
reserved.
> Internal only

Priority Queue Mapping

Realize two kinds of priority mapping: 802.1p and DSCP. 8 priority values for
802.1 p which use 3 bit priority field in layer 2 VLAN tag, and 64 priority values for
DSCP which use 8 bit DSCP field in layer 3. The two kinds of priority mapping
methods are mutual exclusion. Only one kind of priority mapping method can be
used at one time.
Different packets are mapped into one of the 8 cos queues and dyed one of the
three different colors after this step. Cos queue is the base of egress scheduling
strategy and traffic shaping. While the dyed color is used to do the further CAR
decision and congestion avoidance control.
This step can be considered as prepared stage, because in the following ACL
stage, if ACL match, we can do the further adjustment for mapped queue and re-dye
the color.
© ZTE Corporation. All rights 7
reserved.
> Internal only

Traffic Policing
The typical traffic policing application is to monitor one ingress traffic,
limit it within the reasonable range and do the punishment for the exceed part
in order to protect network resources and operator benefit. For example, we
can limit the HTTP packet not exceed the 50% of network bandwidth, if the
traffic of one link exceed this limitation, traffic policing can select to drop packet
or reset the packet priority.

One case of traffic policing is CAR( Committed Access Rate), it is widely


used in monitoring ingress traffic in the ISP network. CAR also include flow
classification service for the monitored traffic and implement the predetermined
traffic policing action according to the different evaluation results. These
actions can be
• Forward : forward the packets with evaluation result “complacence”
• Discard : drop the packets with evaluation result “un-complacence”
• Remark and forward : Forward the packets after remarking into other
queue and color for the packets with evaluation result “partial complacence”

© ZTE Corporation. All rights


reserved.
> Internal only

Traffic Policing Case

bps

Rate Limit
Without Traffic Policing

Time

bps

Rate Limit With Traffic Policing

Time

© ZTE Corporation. All rights


reserved.
> Internal only

Token Bucket
• Characteristic : Token bucket can be considered as one container
which stores token and has particular capacity. Token is injected int
o the bucket at the rate configured by system. When the bucket is f
ull, the exceed token will overflow and token in the bucket is no mor
e added.
Evaluate the traffic by token bucket: the traffic forwarding is based
on the quantity of the token in the bucket. If there is enough token i
n the bucket( one bit need one token), we name it conforming. Othe
rwise we name it un-conforming or excess.

© ZTE Corporation. All rights


reserved.
> Internal only

Traffic Policing and Token Bucket


Token bucket parameter setting include:
Average rate: token inject rate, that is permitted flow average rate. Normally we set it
CIR(Committed Information Rate).
Burst size: the capacity of token bucket, that is the maximum flow size permitted for each
burst. Normally we set it CBS(Committed Burst Size) and CBS is required to larger than
MTU.
Evaluate once one packet come, if there is enough token in the bucket, take the same
number of token to forward, otherwise too much token is consumed and the traffic is out
of limit.

Complex evaluation: in order to evaluate more complex situation and implement more
flexible regulate and control strategy, we can set two token buckets. For example, there
are four parameters in CAR(Committed Access Rate):
CIR ( Committed Information Rate )
PIR ( Peak Information Rate )
CBS ( Committed Burst Size )
PBS ( Peak Burst Size )
It use two token buckets, each bucket has different token inject rate, one is CIR , the
other is PIR. And different bucket size, one is CBS, the other is PBS(CBS<PBS, the two
buckets are named as C bucket and P bucket), represents the different permitted burst
level.
When evaluate, implement the different flow control strategy according to “there is
enough token in the C bucket”, “ there is not enough token in the C bucket, but there is
enough token in the P bucket” and “both of the C and P bucket has no enough token” etc.

© ZTE Corporation. All rights


reserved.
> Internal only

Relationship between CAR and ACL

First, it needs to mention that there exists strong binding relationship between CAR
and ACL. CAR must be associated( illustrated as figure above with red mark)
before creating ACL . Meantime the CAR become effective is depend on ACL. So
we must set CAR before create ACL.

© ZTE Corporation. All rights 12


reserved.
> Internal only

CAR (Committed Access Rate)

Color Mode can be selected as color blindness mode or color sensitive mode. For the data flow
which match the ACL, apply CAR configuration and realize the different bucket color action by
refreshing CIR and PIR. Three operations are supported for the different colored data: forward,
remark(remark egress cos and recolor the required color) and discard.
Take the above picture for an example: The matched data flow have 10mbps(CIR) green packet,
20mbps ( PIR ) -10mbps ( CIR ) =10mbps yellow packet and the rest is red packet after the
above CAR process. Do the following operation according to the different packet color :
• discard the red packet;
• map the yellow packet into the egress CoS: AF4, and recolor the congestion part as yellow.
• forward the green packet. That is maximum 20mbps can pass.

© ZTE Corporation. All rights 13


reserved.
> Internal only

ACL Flow Classification

There are 14 match rules in total. Each rule can set mask and enable status. It needs to
mention that ACL is applied to ingress, so we need to demonstrate ACL is applied to which
ingress port and some ACL match rules are mutual exclusion. For example, MPLS is mutual
exclusion with all the layer 3 match rules. In order to make ACL become effective, we must
make sure that ingress port of data flow must be included in the selected port in ACL and the
selected ACL match rule can match with the related option of data flow(pay attention to the
use of mask).
© ZTE Corporation. All rights 14
reserved.
> Internal only

Ingress Rate Limit

This function is used to provide the flexible ingress rate limit configuration for user.

Note : the unit for rate is kbps, while the unit for burst size is kbits .

© ZTE Corporation. All rights 15


reserved.
> Internal only

Ingress Broadcast Storm Suppression

This function is mainly used to avoid network attack, can do the flow rate limit for
6 kinds of packet(refer to Ctrl Mask in the picture attached above).
Note: In order to use this function, you need to enable the ingress rate limit and
set ctrl percent at the same time. This ctrl percent is related with port ability, not
ingress rate limit value. As the picture illustrated above, port ETHE-1-0-1 is
1000M port , the exceed 100mbps ( 1000mbps*10%=100mbps ) part received
from this port will be discarded.

© ZTE Corporation. All rights 16


reserved.
> Internal only

Egress Queue Scheduling Management

Queue cos mapping or ACL queue remapping will play a role in this module. Five kinds of
scheduling policies are supported: SP, WRR, DRR, SP+WRR, SP+DRR for 8 cos
queue(BE, AF1, AF2, AF3, AF4, EF, CS6, CS7).

© ZTE Corporation. All rights 17


reserved.
> Internal only

Egress Queue Scheduling Policy


 SP : Strict Priority, low priority queue can be scheduled only after finishing the high priority
queue schedule. That is to say, CS6 can be scheduled only after finishing CS7 schedule. If EF
wants to be scheduled, it must wait until CS7,CS6 finish the schedule, the rest can be done in
the same manner.

 WRR : Weighted Round Robin, distribute the different weight(1~127) to each queue,
schedule every queue one by one from the high priority queue CS7. The weight of the queue
will be reduced 1 each time when one packet scheduled from every queue. The schedule will
be stopped once the weight of the queue is zero. The weight of every queue will be refreshed
into the configured value, when the weight of all the queues reduced to zero or there is no
packets need to be scheduled for weight non-zero queue. Schedule by this means again and
again.

 DRR : Deficit Round Robin, the difference between DRR and WRR is that: the weight of
WRR represents packet number, but the weight of DRR represents bytes number x the DRR
weight bytes grading. Schedule one packet in DRR is not just reduce 1 from the weight value, it
should be like this: DRR bytes weight – length of the packet = The rest of DRR bytes weight.
That is to say different packet length consumes different weight.

 SP+WRR and SP+DRR : the combination of the above schedule policy, first schedule SP
queue according to the SP schedule policy then schedule WRR or DRR queue according to the
corresponding schedule policy.

© ZTE Corporation. All rights 18


reserved.
> Internal only

Example for Egress Queue Scheduling

First schedule AF3->AF2->AF1->BE according to SP and then schedule CS7 , CS6 ,


EF , AF4 by the ratio 4:3:2:1.

© ZTE Corporation. All rights 19


reserved.
> Internal only

Congestion Management

Two kinds of CM policies are supported by the system: Tail Drop and Simple Random
Early Drop.
TD is the system default configuration. Packet will be dropped no matter which queue
and which color it belongs to when surpass the buffer capability, because the buffer
capability of the chip is limited.
© ZTE Corporation. All rights 20
reserved.
> Internal only

Congestion Management

SRED is used to provide more flexible configuration, discard threshold and discard
rate can be configured for each color on each queue(discard threshold and discard rate is
the same for yellow and red, while the green is independent).

As the picture illustrated above, the red and yellow packet will be discarded 100%(8
kinds of discard rate can be selected) when BE queue length surpass 50% of the chip
buffer capability. The green packet will be discarded at the rate of 12.5% when BE queue
length surpass 70% of the chip buffer capability.
© ZTE Corporation. All rights 21
reserved.
> Internal only

Packet Aging

Some particular service is sensitive for delay in the real network, just like voice service,
so our system provides packet aging function. This function is for the whole system not
like other functions are for the port only. Different aging time can be configured for
different queues.
The scope is 125ms~7162ms. Keep time from the packet enters into the system, the
packet will be dropped when the aging time expire and the packet still hasn’t been
switched out from egress.

© ZTE Corporation. All rights 22


reserved.
> Internal only

Traffic Shaping Principle


bps

Rate Limit Without Traffic Shaping

Time

bps

Rate Limit With Traffic Shaping


( maybe increase delay )

Time

© ZTE Corporation. All rights


reserved.
> Internal only

Traffic Shaping Based on Port

Note: the unit of rate is kbps and the unit of burst is kbits.

© ZTE Corporation. All rights 24


reserved.
> Internal only

Traffic Shaping Based on Queue

Min rate and Max rate can be configured for each queue if we open the traffic
shaping based on queue, and the unit is kbps.

© ZTE Corporation. All rights 25


reserved.
> Internal only

Traffic Shaping Complement Comment

Rate limit based on queue can effect schedule policy, first it needs to satisfy
the min rate limit for each queue, then the rate between min rate limit and max rate
limit. In other word, assume that one port open the function of rate limit based on
queue and adopt SP schedule policy. If we configure the min rate limit of the BE
queue very big, first guarantee the min rate limit of other queues then BE queue.
Other queues surpass part(rate bigger than min rate limit) can’t be guaranteed
before the guarantee of min rate limit for BE queue.

Rate limit based on queue and rate limit based on port can coexist at the same
time. But we need to configure them respectively and function become effective
sequence is rate limit based on queue first, then rate limit based on port.

© ZTE Corporation. All rights 26


reserved.
www.zte.com.cn

You might also like