Cisco switch port speed limit (1)

Source: Internet
Author: User
Tags cisco switch

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:

 
 
  1. 3550#conf t  
  2.  
  3. Enter configuration commands, one per line. End with CNTL/Z.  
  4.  
  5. 3550(config)#access-list 15 permit 10.66.0.0 0.0.255.255 

Ii. Create a class-map

 
 
  1. 3550#conf t  
  2.  
  3. Enter configuration commands, one per line. End with CNTL/Z.  
  4.  
  5. 3550(config)#class-map dkxs  
  6.  
  7. 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:

 
 
  1. 3550#conf t  
  2.  
  3. Enter configuration commands, one per line. End with CNTL/Z.  
  4.  
  5. 3550(config)#policy-map 80k  
  6.  
  7. 3550(config-pmap)#class dkxs  
  8.  
  9. 3550(config-pmap-c)# police 80000 8000 exceed-action drop  
  10.  
  11. 3550#conf t  
  12.  
  13. Enter configuration commands, one per line. End with CNTL/Z.  
  14.  
  15. 3550(config)#policy-map 1m  
  16.  
  17. 3550(config-pmap)#class dkxs  
  18.  
  19. 3550(config-pmap-c)# police 1000000 100000 exceed-action drop  
  20.  
  21. 3550#conf t  
  22.  
  23. Enter configuration commands, one per line. End with CNTL/Z.  
  24.  
  25. 3550(config)#policy-map 5m  
  26.  
  27. 3550(config-pmap)#class dkxs  
  28.  
  29. 3550(config-pmap-c)# police 5000000 500000 exceed-action drop  
  30.  
  31. 3550#conf t  
  32.  
  33. Enter configuration commands, one per line. End with CNTL/Z.  
  34.  
  35. 3550(config)#policy-map 10m  
  36.  
  37. 3550(config-pmap)#class dkxs  
  38.  
  39. 3550(config-pmap-c)# police 10000000 1000000 exceed-action drop 

Iv. View configuration information

 
 
  1. 3550#show run  
  2.  
  3. policy-map 5m  
  4.  
  5. class dkxs  
  6.  
  7. police 5000000 500000 exceed-action drop  
  8.  
  9. policy-map 1m  
  10.  
  11. class dkxs  
  12.  
  13. police 1000000 100000 exceed-action drop  
  14.  
  15. policy-map 80k  
  16.  
  17. class dkxs  
  18.  
  19. police 80000 8000 exceed-action drop  
  20.  
  21. policy-map 10m  
  22.  
  23. class dkxs  
  24.  
  25. police 10000000 1000000 exceed-action drop 


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.