博威---云架构决胜云计算

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1741|回复: 0

cisco 3550 switch 配置service-policy做限速

[复制链接]
发表于 2008-2-15 15:54:16 | 显示全部楼层 |阅读模式
cisco 3550 switch 配置service-policy做限速


Switch#sh conf
Using 6798 out of 393216 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
enable secret 5 TV4R9.B.
! 以下是关闭error检测,默认状态为enable。在链路不稳定的状态下,端口频繁UP/DOWN,则端口进入errordisable状态,停止转发数据。
no errdisable detect cause pagp-flap
no errdisable detect cause dtp-flap
no errdisable detect cause link-flap
no errdisable detect cause l2ptguard
no errdisable detect cause gbic-invalid
no errdisable detect cause loopback
ip subnet-zero
ip routing
!
mls qos
!
!配置限速,用户端口和上行口。
class-map match-all lim_1
match access-group name lim_1
class-map match-all lim_2
match access-group name lim_2
!
!
policy-map 1m
class inlimit
police 1024000 128000 exceed-action drop
policy-map 2m
class inlimit
police 2048000 128000 exceed-action drop
policy-map 4m
class inlimit
police 4096000 128000 exceed-action drop
policy-map limit

class lim_1
police 4096000 256000 exceed-action drop

class lim_2
police 4096000 256000 exceed-action drop

!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
interface FastEthernet0/1
deion link_4m
no switchport
ip address 170.00.64.97 255.255.255.248
shutdown
speed 10
service-policy input 4m
!
interface FastEthernet0/2
deion link_4m
no switchport
ip address 211.155.253.141 255.255.255.252
shutdown
duplex full
service-policy input 4m
!
interface FastEthernet0/3
deion link_4m
no switchport
ip address 170.00.63.41 255.255.255.248
shutdown
duplex full
speed 10
service-policy input 4m
!
interface FastEthernet0/4
deion link_2M
no switchport
ip address 170.00.64.105 255.255.255.248
shutdown
service-policy input 2m
!

..........

!
interface FastEthernet0/24
deion to-Uplink
no switchport
ip address 172.29.6.50 255.255.255.252
shutdown
service-policy input limit

!
ip classless
ip route 0.0.0.0 0.0.0.0 xx.xx.xx.xx
ip route
!

ip access-list extended inlimit
permit ip any any
ip access-list extended lim_1
permit ip any 219.238.80.128 0.0.0.127
permit ip 219.238.80.128 0.0.0.127 any
ip access-list extended lim_2
permit ip any 210.75.119.0 0.0.0.127
permit ip 210.75.119.0 0.0.0.127 any
!
!
line con 0
line vty 0 4
password 7 1075E5C
login local
line vty 5
password 7 00E535F
login
line vty 6 15
login
!
end
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|boway Inc. ( 冀ICP备10011147号 )

GMT+8, 2024-11-24 08:40 , Processed in 0.081793 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表