Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15179104
  • 博文数量: 7460
  • 博客积分: 10434
  • 博客等级: 上将
  • 技术积分: 78178
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-02 22:54
文章分类

全部博文(7460)

文章存档

2011年(1)

2009年(669)

2008年(6790)

分类: 系统运维

2008-05-20 15:26:10

1.按用户IP地址进行流分类

 

!

class-map match-any Gold

 match access-group 12

class-map match-any Sliver

 match access-group 13

class-map match-any Copper

 match access-group 14

class-map match-any Diamond

 match access-group 11

 

2. ip precedence 进行流分类

 

class-map match-any ipp1

 match ip precedence 1

class-map match-any ipp3

 match ip precedence 3

class-map match-any ipp2

 match ip precedence 2

class-map match-any ipp7

 match ip precedence 7

!

!

3.定义队列调度策略

policy-map pmYHJ-2M-out-Child

 class ipp7

  priority percent 20

   police cir percent 20

     conform-action transmit

     exceed-action drop

 class ipp3

  bandwidth percent 30

  random-detect

 class ipp2

  bandwidth percent 30

  random-detect

 class ipp1

  bandwidth percent 20

  random-detect

 

policy-map pmYHJ-2M-out

 class class-default

  shape average 2000000         //非固定速率子接口限速为2M

 

 service-policy pmYHJ-2M-out-Child  //

 

 

 

按流分类进行ip precedence 标记

 

policy-map pmYHJ-in

 class Diamond

  set ip precedence 7

 class Gold

  set ip precedence 3

 class Sliver

  set ip precedence 2

 class Copper

  set ip precedence 1

!        

interface FastEthernet0/0

 no ip address

 ip flow ingress

 ip flow egress

 duplex auto

 speed auto

 service-policy output pmYHJ-2M-out

!

interface FastEthernet0/1

 ip address 192.168.12.1 255.255.255.0 secondary

 ip address 192.168.13.1 255.255.255.0 secondary

 ip address 192.168.14.1 255.255.255.0 secondary

 ip address 192.168.11.1 255.255.255.0

 ip flow ingress

 ip flow egress

 duplex auto

 speed auto

 service-policy input pmYHJ-in

!

!

access-list 11 permit 192.168.11.0 0.0.0.255

access-list 12 permit 192.168.12.0 0.0.0.255

access-list 13 permit 192.168.13.0 0.0.0.255

access-list 14 permit 192.168.14.0 0.0.0.255

!

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