Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1292371
  • 博文数量: 464
  • 博客积分: 9399
  • 博客等级: 中将
  • 技术积分: 6364
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-19 09:15
文章分类

全部博文(464)

文章存档

2014年(12)

2013年(123)

2012年(173)

2011年(156)

我的朋友

分类:

2012-06-21 13:41:58

前段时间一直有朋友在问我可不可以做到限制内部某些机子的下行速率,我很自然的答了句:可以做限速的。其实限速肯定是可以的,但是需要考虑一个具体的问题
一般接入路由器都作了地址转换,但是了解到路由器的操作步骤会发现如下的执行步骤:
check input rate limits ------->nat outside to inside------->check output rate limits
所以针对内部部分主机做限速策略,由于必须在ACL里面指定inside local 地址,所以应该在内网接口上应用service-policy output xxx,而不是在外网接口上的
service-policy input xxx!

下面是一个具体的例子:
Router#sh run
Building configuration...

Current configuration : 1026 bytes
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
!
subnet-zero
!
!
no ip domain lookup
!
!
class-map match-all test-class
match access-group 100
!
!
policy-map speed
class test-class
police cir 80000 bc 32000
conform-action transmit
exceed-action drop
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.1.111 255.255.255.0
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 172.16.1.1 255.255.255.0
ip nat inside
duplex auto
speed auto
service-policy output speed
!
ip nat inside source list 1 interface FastEthernet0/0 overload
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.1
no ip http server
!
!
access-list 1 permit any
access-list 100 deny ip any host 172.16.1.100
access-list 100 permit ip any any
!
line con 0
line aux 0
line vty 0 4
!
!
end

Router#
最后的效果,可以达到限制内网除172.16.1.100的其他主机的下行速率在10KBps附近


CCIE Security 2009 IOS防火墙合集


阅读(633) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~