Introduction
As the core network switch of our company, the CISCO3550 has been running stably for many years, and its functions can also meet our needs. However, its port speed limit function is not as easy to implement as some other switches, fortunately, the implementation method has been found recently. After the configuration is complete, it is verified with the iperf software. The result shows that this method is effective. The specific implementation steps are as follows.
1. Create an ACL
Because this is a layer-3 Switch, although the speed limit is imposed on the port, we also need to consider the network address passed through this port. In this example, we choose to limit the speed of the 22nd port of the CISCO3550 switch, the port belongs to VLAN66 and the IP address segment is 10.66/16. Therefore, you must create an ACL as follows:
- 3550#conf t
-
- Enter configuration commands, one per line. End with CNTL/Z.
-
- 3550(config)#access-list 15 permit 10.66.0.0 0.0.255.255
Ii. Create a class-map
- 3550#conf t
-
- Enter configuration commands, one per line. End with CNTL/Z.
-
- 3550(config)#class-map dkxs
-
- 3550(config-cmap)#match access-group 15
The main purpose of this step is to create a class-map, which references the previously created ACL 15, so that we can operate port 22 in the future.
3. Create policy-map
For testing purposes, we have created multiple policy-maps and set different limited bandwidths, such as 80 k, 1 m, 5 m, and 10 m, as shown below:
- 3550#conf t
-
- Enter configuration commands, one per line. End with CNTL/Z.
-
- 3550(config)#policy-map 80k
-
- 3550(config-pmap)#class dkxs
-
- 3550(config-pmap-c)# police 80000 8000 exceed-action drop
-
- 3550#conf t
-
- Enter configuration commands, one per line. End with CNTL/Z.
-
- 3550(config)#policy-map 1m
-
- 3550(config-pmap)#class dkxs
-
- 3550(config-pmap-c)# police 1000000 100000 exceed-action drop
-
- 3550#conf t
-
- Enter configuration commands, one per line. End with CNTL/Z.
-
- 3550(config)#policy-map 5m
-
- 3550(config-pmap)#class dkxs
-
- 3550(config-pmap-c)# police 5000000 500000 exceed-action drop
-
- 3550#conf t
-
- Enter configuration commands, one per line. End with CNTL/Z.
-
- 3550(config)#policy-map 10m
-
- 3550(config-pmap)#class dkxs
-
- 3550(config-pmap-c)# police 10000000 1000000 exceed-action drop
Iv. View configuration information
- 3550#show run
-
- policy-map 5m
-
- class dkxs
-
- police 5000000 500000 exceed-action drop
-
- policy-map 1m
-
- class dkxs
-
- police 1000000 100000 exceed-action drop
-
- policy-map 80k
-
- class dkxs
-
- police 80000 8000 exceed-action drop
-
- policy-map 10m
-
- class dkxs
-
- police 10000000 1000000 exceed-action drop