关于思科交换机限速的问题
设备型号:
WS-C3750X-24,12.2(58)SE2,C3750E-UNIVERSALK9-M)
WS-C2960S-48TS-L,12.2(55)SE7,C2960S-UNIVERSALK9-M)
描述情况:
1、C3750X-24作为外网出口,互联ISP。
2、C2960S-48TS-L上联是C3750X-24,下联是Server(Gig 1/0/15);C2960S-48TS-L(Gig 1/0/46、Gig 1/0/47、Gig 1/0/48)与C3750X-24(Gig 2/0/17、Gig 1/0/17、Gig 1/0/18)之间做的是Trunk以及二层的Port-channel。
3、服务器的网关在C3750X-24上。
目的是:
限制服务器(61.147.x.x)的上行速度,为200M。
在C2960S-48TS-L上做配置:
access-list 1 permit 61.147.x.x
class-map match-all A
match access-group 1
policy-map A
class A
police 200000000 1000000 exceed-action drop
trust dscp
interface GigabitEthernet1/0/15
service-policy input A
2960S#show policy-mapinterface g1/0/15 input
GigabitEthernet1/0/15
Service-policy input: A
Class-map: A (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 1
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
0 packets, 0 bytes
5 minute rate 0 bps
C2960S-A6-5#show ipaccess-lists
Standard IP access list 1
10permit 61.147.x.x
这样做没成功,2960S#show policy-map interface g1/0/15 input、show ip access-lists都没看到匹配的数据包。
或者在C3750X-24上做配置:
access-list 1 permit 61.147.x.x
class-map match-all A
match access-group 1
policy-map A
class A
police 200000000 1000000 exceed-action drop
trust dscp
interface GigabitEthernet1/0/17
service-policy input A
interface GigabitEthernet2/0/17
service-policy input A
interface GigabitEthernet1/0/18
service-policy input A
Core3750X-Stack#show policy-mapinterface g1/0/17 input
GigabitEthernet1/0/17
Service-policy input: A
Class-map: A (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 1
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Core3750X-Stack#showpolicy-map interface g1/0/18 input
GigabitEthernet1/0/18
Service-policy input: A
Class-map: A (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 1
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Core3750X-Stack#showpolicy-map interface g2/0/17 input
GigabitEthernet2/0/17
Service-policy input: A
Class-map: A (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 1
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Core3750X-Stack#show ipaccess-lists 1
Standard IP access list 1
10permit 61.147.x.x
这样做也没成功,3750X#show policy-map interface g1/0/17 input、show policy-map interface g1/0/18 input、show policy-map interface g2/0/17 input、
show ip access-lists也都没看到匹配的数据包。
没成功的原因:
1、是不是交换机系统版本的问题
2、是不是配置的问题
3、是不是配置的方法不对