1、爲什麼要×××和管制
1)速度不匹配
2)過載
---------->限速
2、shaping和policing區別
shaping:對超額的流量進行緩存。僅用於出口
policing:對超額的流量進行丟棄,可以應用到入口和出口
shaping隊列--->軟件隊列---->硬件隊列
3、術語
1)BC 正常突發量 byte
2)CIR 承諾信息速度 bps
3)AR 訪問速率
4)BE 超額突發流量
5)TC 125ms
4、shaping--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定義流量
3)GTS 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
5、shaping--FRTS
1)主要功能:針對VC做TS
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
6、shaping--CB-Shaping
使用MQC:class-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來查看效果
7、policy--->CAR
rate-limit input 64000 8000 8000 conform-action transmit exceed-action drop
cir bc be
正常突發流量:轉發
超額突發流量:drop
8、policy--->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