当前位置:网站首页>QOS function introduction

QOS function introduction

2022-08-10 15:06:00 I am not a cabbage

一、qos的作用:

Discriminating web services,在没有qos之前,Traffic is follow the principle of first in first out,When there is a jam,Cannot ensure key business communicate.
例如:下图
在这里插入图片描述

Telephone traffic and email traffic,Obvious telephone traffic priority is higher than email traffic,但是如果没有qos的话,Wouldn't differentiate between the two flow types,But to follow the principle of first in first out,Congestion can result in speech delay.

二、qosThe three services of model:

<1>尽力而为服务模型:

This is a single service model,网络尽最大的可能性来发送报文.但对时延、Reliability doesn't provide any guarantee.这个就是通过FIFO队列来实现,The applicable network applications haveFTP、E-mail等.

<2>综合服务模型:

Through the resources reserve protocol security key business communication quality.
优点:可以为某些特定业务提供带宽、延时保证.
缺点:When no flow is sent,Still the exclusive bandwidth.And link all the nodes on the equipment support and allow resources reserve agreement(RSVP)协议.

<3>区分服务模型:

可以满足不同的qos需求,For each business and do not need to notify the network resources.QosIs based on this kind of service model to realize.
大致流程:
(1)At the entrance of network classification,Complete message tag.(ACLOr a message priority to implement the classification)
(2)根据标记,Mapping cost to the service level of the definition of value
(3)According to the different service level to the corresponding buffer queue,According to the queue scheduling mechanism,Implement different forward service.

三、qosThe function of the flow chart

在这里插入图片描述

四、入口方向:

4.1Traffic classification and priority tag:

4.1.1、流量分类

The data packet is divided into multiple priorities or multiple service types.You can set your own traffic classification strategy.
分类方式:
<1>、Based on priority to classify:也就是根据802.1p的Cos值或者IP报文的IP优先级或者DSCPValues to classify.
<2>、基于ACL来分类:通过ACL,根据源/目的Mac地址 源/目的IP地址、源/目的 端口号、Agreement number on the packet flow classification.

4.1.2、优先级标记

In addition to various message itself with priority,还有一个重要概念:本地优先级(LP).Local priority by the message priority or port default priority mapping and to,Said the forwarding of a message within the equipment priority,When used to determine the message from export send queue number,值越大优先级越大.

4.2流量监管:

<1>What is the traffic regulation:通过监督进入网络的流量速率,对超出部分的流量进行“惩罚”,使进入的流量被限制在一个合理的范围之内.
<2>为什么要限速?如果不限速,A large number of users constantly breaking data will only make the network more crowded.
<3>How do you know speeding up?Using the token bucket to evaluate the specifications of the flow.
<4>三部分组成:
Meter:通过令牌桶机制对网络流量进行度量,向Marker输出度量结果.
Marker:根据Meter的度量结果对报文进行染色,报文会被染成green/yellow/red三种颜色.
Action:根据Marker对报文的染色结果,对报文进行一些动作,包括Pass/pass + remark(Modify the internal priority before forwarding)/discard.

<5>限速模式:基于端口(ingress/egress)、基于流
Based on the flow speed of that:Based on the flow regulation throughACL来实现,把分配的police_id与ACl绑定就可以了,然后会对ACLMonitor the matched flow.

4.3The token bucket technology general principles introduced:

The token bucket can be seen as a deposit a certain amount of container.系统按设定的速度向桶中放置令牌.当桶中令牌满时,多出的令牌溢出,桶中令牌不再增加.
When the token bucket was used to assess traffic specifications,是以令牌桶中的令牌数量是否足够满足报文的转发为依据的.如果桶中存在足够的令牌可以用来转发报文,According to flow to comply with or conform to the specifications,Otherwise known as overweight.

Single speed single barrel double color:
在这里插入图片描述
Single speed double barrels three color:
在这里插入图片描述
Double speed double barrels three color:
在这里插入图片描述

4.4Above you can see the single speed double barrel and double speed double barrels take token rules are not the same.

Single speed double barrel is first takeCBucket backE桶
Double speed double barrel is first takePBucket backC桶
概括如下图:
在这里插入图片描述

4.5How to choose the three token bucket?

Only the speed limit,用单速单桶.
限速+Distinguish between sudden quantity,With single speed double bucket.
限速+Distinguish between sudden quantity+To distinguish whether the bandwidth beyond peak,With double speed double bucket.

五、出口方向

5.1流量整形:

Traffic shaping can be divided into:Based on the interface of plastic/Based on the queue plastic.
Peak can be interpreted as cut,Beyond the speed limit does not reject a message,而是缓存起来,Wait until don't jam evenly when sent out,避免不必要的报文丢弃和拥塞.
This is a kind of initiative to adjust the output flow rate of the measures.Plastic flow and flow regulation of the main difference is that, Traffic shaping for traffic regulation need to discard message cache——Usually put them into the buffer or in the queue.当令牌桶有足够的令牌时,再均匀的向外发送这些被缓存的报文.Plastic flow and flow regulation is another difference between,Plastic may increase the delay,The regulation is almost not introducing additional delay.

5.2拥塞避免

拥塞避免是指通过监视网络资源(如队列或内存缓冲区)的使用情况,When congestion occurs or have intensified trend initiative discard message,通过调整网络的流量来解除网络过载的一种流量控制机制.
Tail drop(尾丢弃):Each export is the default queue congestion avoidance technology,在没有超过queue长度的时候,报文会在queue中缓存,And when the packet length more than set threshold after,All the new message will be discarded.
缺点:1、Tail discarded leads toTCP同步
2、Key data could not be distinguish,Indiscriminate discarded.

WRED(加权随机早期检测):Through early selective discarding the part of the message and not inqueueThe real full began to throw away.将数据分类,根据不同的颜色(优先级)Set different discarded strategies.
在这里插入图片描述

5.3拥塞管理(Queue scheduling technology:SP、WRR、WDRR)

What is the premise of scheduling requirement?
The premise is congestion happened,When the interface without crashing,Message is sent out immediately after to the interface,When the packet arrived faster than the speed of interface to send a message,Jam happened.Congestion management will classify these messages,Into different queue.And the queue scheduling will to respectively the different priority message,The high priority message will get priority.

Sp:严格优先级
在这里插入图片描述

RR(轮询调度):
基于报文的公平调度,Each queue scheduling out a message.
优点:Avoid some queue never service
缺点:Could not allocate bandwidth according to the business

WRR(加权轮询调度):
According to the weight of each queue proportion,Each queue scheduling the corresponding weights of message turned into the next queue.
优点:Can ensure that the lower priority queues can obtain certain bandwidth,Avoid shortcomings priority may never get service.
缺点:WRRScheduling according to the number of packets to schedule,Not according to the message bytes.When the average packet length range message,Leads to uneven allocation of bandwidth.Low latency of the key business can't dispatch in time.

DRR(Difference polling scheduling):
Based on the length of packet scheduling,实现原理与RR基本相同.
区别:DRRScheduling is according to the packet length,而RRAccording to the number of message.
优点:修正了RRScheduling could not allocate bandwidth according to the proportion of faults.
缺点:Low latency of the key business can't dispatch in time.

WDRR(Training in rotation scheduling weighted difference):
解决了DRR不能设置权重的不足.DRR调度相当于权值为1的WDRR调度.
For different queue set different weighted value.

Just a way of scheduling have respective shortcomings.So generally grouped using a variety of scheduling, scheduling.

原网站

版权声明
本文为[I am not a cabbage]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/222/202208101435593626.html