承诺访问速率-CAR (Committed Access Rate)
interface Hssi0/0/0
rate-limit input 15000000 2812500 2812500 conform-action transmit exceed-action drop
rate-limit output 15000000 2812500 2812500 conform-action transmit exceed-action drop
ACL-Based
interface hssi0/0/0
rate-limit output accees-group 101 200000000 24000 32000 conform-action set prec-transmit 5 exceed-action set-prec-transmit 0
rate-limit output access-group 102 10000000 24000 32000 conform-action set-prec-tranmit 5 exceed-action drop
rate-limit output 8000000 16000 24000 conform-action set-prec-transmit 5
exceed-action drop
access-li 101 per tcp any any eq www
access-li 102 per tcp any any eq ftp
policy-map in CAR
如上操作是针对接口设置的CAR,CAR同时也可以作用在policy-map上
(config-pmap-c)#police {CIR Bc Be} conform-action {action}exceed-action
{action}[violate-action {action}]
把rate-limit改成了police,后面增加了一个violate-action,违规操作,也就是超过了Be流量之后的操作 Action的操作命令
(config)# policy-map police
(config-pmap)# class acgroup2
(config-pmap-c)# police 80000 2000 4000 conform-action transmit exceed-action set-qos-transmit 4 violate-action drop
continue 继续执行下一条CAR 语句
drop 丢弃该数据包
set-prec-continue {precedence} 设置IP 优先级并继续执行下一条CAR 语句
set-prec-trasnmit {precedence} 设置IP 优先级并转发该数据包
set-dscp-continue {dscp} 设置IP DSCP 值并继续执行下一条CAR 语句
set-dscp-trasnmit {dscp} 设置IP DSCP 值并转发该数据包
set-qos-continue {group ID} 设置QoS 组ID 并继续执行下一条CAR 语句
set-qos-transmit {group ID} 设置QoS 组ID 并发送该数据包
transmit 转发该数据包