The cascade port of Port 1 connects to an eight-gigabit telecom line;
Ports 2, 3, 4, and 5 limit the maximum upstream and downstream bandwidth of each interface to 2 MB;
The detailed configuration is as follows:
Bytes ----------------------------------------------------------------------------------------
Class-map match-all user1-up
Match access-group 1
Class-map match-all user3-up
Match access-group 3
Class-map match-all user2-up
Match access-group 2
Class-map match-all user4-up
Match access-group 4
Class-map match-all user4-down
Match access-group 104
Class-map match-all user2-down
Match access-group 102
Class-map match-all user3-down
Match access-group 103
Class-map match-all user1-down
Match access-group 101
!
!
Policy-map user1-up
Class user1-up
Police 2000000 1000000 exceed-action drop
Trust dscp
Policy-map user3-up
Class user3-up
Police 2000000 1000000 exceed-action drop
Trust dscp
Policy-map user2-up
Class user2-up
Police 2000000 1000000 exceed-action drop
Trust dscp
Policy-map user4-up
Class user4-up
Police 2000000 1000000 exceed-action drop
Trust dscp
Policy-map user-down
Class user1-down
Police 2000000 1000000 exceed-action drop
Trust dscp
Class user2-down
Police 2000000 1000000 exceed-action drop
Trust dscp
Class user3-down
Police 2000000 1000000 exceed-action drop
Trust dscp
Class user4-down
Police 2000000 1000000 exceed-action drop
Trust dscp
!
Interface FastEthernet0/1
Spanning-tree bpdufilter enable
Service-policy input user-down
!
Interface FastEthernet0/2
Service-policy input user1-up
!
Interface FastEthernet0/3
Service-policy input user2-up
!
Interface FastEthernet0/4
Service-policy input user3-up
!
Interface FastEthernet0/5
Service-policy input user4-up
!
!
Access-list 1 permit *.*.*.*
Access-list 2 permit *.*.*.*
Access-list 3 permit *.*.*.*
Access-list 4 permit *.*.*.*
Access-list 101 permit ip any host *.*.*.*
Access-list 102 permit ip any host *.*.*.*
Access-list 103 permit ip any host *.*.*.*
Access-list 104 permit ip any host *.*.*.*
!
---------------------------------------------------------------------------------
This article is from the "IT life" blog