QOS policing知识要点

Policing:
Policing supports marking
Less buffer usage(shaping requires an)
Rate limiting with no buffering(drop)

入向限速是直接丢弃的限速,Shaping只能用于出向限速,而Policing大多数用于入向,偶尔可以用于出向
policing的特点:会将超出的流量直接drop掉,所以接口的流量输出图形是锯齿状,不平滑的。但是工作原理简单,占用系统资源少。

Token Bucket(令牌桶)
衡量Packet大小的工具
突发与否由令牌桶的大小决定

任何数据流符不符合限制的速率,设备本身是用令牌桶来衡量的

Policing令牌桶参数说明:
在Policing令牌桶大小:单独由Be来定义,桶的单位是byte
Bc和Be之间没有任何关系,并且没有任何Tc的说法
添加行为持续性的(shaping的添加行为周期性的),添加速率为1/CIR

Policing Mechanisms:
Committed Access Rate(CAR)
Class-based Policing


Policing令牌桶限速工具
Committed Access Rate(CAR)
r1(config-if)#rate-limit input 256000 48000 96000 conform-action transmit exceed-action drop  (rate-limit = CAR)
Policing限速工具有“借贷”机制,从而会导致后续的正常包变成不正常包
不明文规定(经验值):Bc = 2 * Be

限速访问控制列表:(100以下抓取优先级,100以上抓取MAC地址)
r1(config-if)#rate-limit input access-group rate-limit 13 128000 16000 48000 conform-action transmit exceed-action drop  
r1(config)#access-list rate-limit 1 mask FE(1111 1110)

双桶Policing
class-map CustomerA
 match access-group CustomerAACL
!
policy-map InputFromCustomer
 class CustomerA
  police cir 1000000 pir 2000000
   conform-action set-prec-transmit-4
   exceed-action set-prec-transmit 2
   violate-action drop
!
interface Serial 0/0
 service-policy input InputFromCustomer

QoS edge providioning policy
Admit all traffic under 1 Mbps and color with precedence 4
Recolor traffic between 1 Mbps to 2Mbps with precedence 2
Drop all traffic above 2 Mbps


==============================
单速率配置方法:以下4个配置命令含义一样
police 80000 1000 1000
police cir 80000 1000 1000
police cir 80000 bc 1000 be 1000
police rate 80000 bps burst 1000 bytes peak-burst 1000 bytes

双速率配置方法:
policy-map xxx
class p1
police cir 8000 bc 1500 pir 10000 be 5000
conform-action trasnmit
exceed-action set-prec-transmit 1
violate-action set-prec-transmit 1

r2#show policy-map interface s2/0
.....
cir 8000 bps,bc 1500 bytes
pir 10000 bps,be 1500 bytes
....

posted @ 2020-05-01 11:18  cyrusxx  阅读(449)  评论(0编辑  收藏  举报