Professional Documents
Culture Documents
00 Key Technolo
gy-QoS
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.
Preface
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.
Traffic Classifier Traffic Policing Congestion avoidance and management Traffic Shaping
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.
bps
Rate Limit
Without Traffic Policing
Time
bps
Time
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.
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.
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.
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.
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
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 .
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.
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).
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.
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.
Time
bps
Time
Note: the unit of rate is kbps and the unit of burst is kbits.
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.
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.