1、为什么要×××和管制

1)速度不匹配

2过载

---------->限速

2shapingpolicing区别

shaping:对超额的流量进行缓存。仅用于出口

policing对超额的流量进行丢弃可以应用到入口和出口

shaping队列--->软件队列---->硬件队列

3、术语

1BC 正常突发量    byte

2CIR 承诺信息速度 bps

3AR  访问速率

4BE  超额突发流量

5TC  125ms

4shaping--GTS

1

Router(config-if)#traffic-shape rate 64000

Router#sh traffic-shape

Interface   Se1/0

       Access Target    Byte   Sustain   Excess    Interval  Increment Adapt

VC     List   Rate      Limit  bits/int  bits/int  (ms)      (bytes)  

Active

-             64000     2000   8000      8000      125       1000      -  

              cir       bc+be  bc         be        tc        bc  

2)也可以针对某种流量限速,使用ACL定义流量

3GTS over FR

FECN:在去往目标路径上由FRSW打上

BECN在返回源路径上由FRSW打上

DE:合法丢弃位,用于匹配数据

interface Serial1/0

 encapsulation frame-relay

 traffic-shape rate 128000 7936 7936 1000

以上是针对TCP流量有ACK才可以设置BECN,但UDP流量没有ACK,但可以在接收方设置

让接收方接收到FECN置位的数据,回送一个Q922测试帧,

 traffic-shape fecn-adapt

Router(config-if)#traffic-shape adaptive 32000

当收到BECN,最多降到3200,默认降到3/4

5shaping--FRTS

1主要功能针对VCTS

2配置

(1)R2(config-if)#frame-relay traffic-shaping   启用FRTS

R2#sh traffic-shape

Interface   Se1/0

       Access Target    Byte   Sustain   Excess    Interval  Increment Adapt

VC     List   Rate      Limit  bits/int  bits/int  (ms)      (bytes)  

Active

203           56000     875    7000      0         125       875       -  

(2)

R2(config)#map-class frame-relay frts

R2(config-map-class)#frame-relay traffic-rate 64000  全局定义

R2(config-if)#frame-relay interface-dlci 203

R2(config-fr-dlci)# class frts   VC下调用

R2#sh traffic-shape

(3)

Interface   Se1/0

       Access Target    Byte   Sustain   Excess    Interval  Increment Adapt

VC     List   Rate      Limit  bits/int  bits/int  (ms)      (bytes)  

Active

203           64000     1000   64000     0         125       1000      - 

R2(config-map-class)#frame-relay adaptive-shaping becn

R2#sh traffic-shape

Interface   Se1/0

       Access Target    Byte   Sustain   Excess    Interval  Increment Adapt

VC     List   Rate      Limit  bits/int  bits/int  (ms)      (bytes)  

Active

203           64000     1000   64000     0         125       1000      BECN

R2(config-map-class)#frame-relay mincir 32000

(4)

FRTS中:shaping队列可以是PQ/CQ/WFQ

软件队列:  Queueing strategy: fifo

6shaping--CB-Shaping

使用MQCclass-map--->policy-map--->service policy

class-map match-all frts

policy-map frts

  class frts

   shape average 64000  CIR速率

   shape adaptive 32000 不能降到这个速率之下

   shape fecn-adapt     启用发送Q922测试

R3(config-if)#service-policy output frts

R3#sh policy-map int s1/1

切记:不要用R3#sh traffic-shape

凡是使用MQC配置,都是使用sh policy-map来查看效果

7policy--->CAR

 rate-limit input 64000 8000 8000 conform-action transmit exceed-action drop

                   cir  bc    be

正常突发流量转发

超额突发流量drop

8policy--->CB-Policing

R3(config)#class-map policy

R3(config-cmap)#exi

R3(config)#policy-map policy

R3(config-pmap)#class policy

R3(config-pmap-c)#police 64000 8000 8000 conform-action transmit ex drop

R3#show policy-map int f0/0

 

***********************

R3(config-if)#$input 64000 8000  8000 conform-action transmit exceed-action ?

  continue                          scan other rate limits