需求: 把内网所有连接设备都限速
1. 定义一个类叫All, 然后匹配所有ip
class-map match-all All
match any
上面这个类All包含了所有ip
2. 定义两个policy-map, 一个设置上行速度,一个设置下行速度,下行速度设置20M,上行速度1.5M
设定下行速度
policy-map xian_down
class All
police cir 20000000 bc 2500000
conform-action transmit
exceed-action drop
violate-action drop
设置上行速度
policy-map xian_up
class All
police cir 1500000 bc 187500
conform-action transmit
exceed-action drop
violate-action drop
在接口上使用上面的规则,我的外网接口是g0/0
inter g0/0 # 进入接口g0/0
service-policy input xian_down #配置下行规则
service-policy output xian_up #配置上行规则