The speed limit method of Cisco equipment

1. Use the rate-limit of IP CEF to limit the rate directly on the device interface, which is very convenient, fast and efficient:

ip cef —————————————— Enable the CEF function globally to support speed limit.
interface fastethnet 0/0
ip address 192.168.110.1 255.255.255.0
rate-limit input 2048000 51200 51200 conform-action transmit exceed-action drop
rate-limit output 2048000 51200 51200 conform-action transmit exceed-action drop ———— Rate limited Configure
rate-limit traffic, traffic shaping, divided into two directions.
The speed limit units here are bite/s, 2Mbps, 51.2KB, 51.2KB, forwarding that meets the speed limit, and discarding the excess.


2. Use Qos policy-map to limit the rate:
end
conf t
access-list 2 permit any —————— Configure the network segment and port for the rate limit. In fact, this is useless. We only have one interface traffic limit.

class-map 2M
match access-group 2—————— Configure class-map to match ACL, policy routing can also be used in this way

end
conf t
policy-map 2M
class 2M
police 21000000 17940 17940 conform-action transmit exceed-action drop —————Configure policy-map and call class-map, configure the speed
limit in the same way as the above speed limit: Commit bandwidth , Burst, extra burst, compliance action, beyond action
end
write

conf t
interface fastethnet 0/0
service-policy input 2M
service-policy output 2M --------------It can be applied to the interface.

Guess you like

Origin blog.csdn.net/Connor_xie/article/details/101672558