本文摘录于互联网

目录树:
流量相关概念
正常流量定义
网络定义的cir、bc、be
网络流量控制机制
流量整形和流量监管特点
流量整形内容:
一、 GTS
1、 基于接口
int s0
  traffic-shape rate 256000  //出口流量以256Kbit/s进行整形
  tafffic-shape adaptive 64000  //收到BECN后CIR被降低为64kbit/s

show traffic s0
show traffic queue
2、 基于流的GTS
Acess-list 101 
traffic-shape group 101 xx xx xx
3、 CB shaping
class-map myclass
 match any
policy-map mypolicy
 class myclass
 shape average 256000 16384 0  //以配置的CIR 256Kbit/s发送通信,而不传送任何过量的突发位。bc=16384
     shape adaptive 64000   ////收到BECN后CIR被降低为64kbit/s
int s0
 service-policy output mypolicy

show interface shape
二、 FRTS
1、 FRTS
基于接口的GTS
Encapsulation fram-relay
Frame-relay adp 2000 定义BECN,拥塞的时候最小的流量为这个,适合TCP
当为UDP的时候
Traffic-shap fecn-adptive 发送一个测试帧。

:
2、 DE位
access-list 100 permit ip host 1.1.1.1 host 2.2.2.2
frame-relay de-list 3 protocol ip list 100
interface Serial1/0
ip address 12.0.0.1 255.255.255.0
    encapsulation frame-relay
 serial restart-delay 0
 no fair-queue
 frame-relay traffic-shaping
 frame-relay de-group 3 102
验证:show frame-relay pvc 102

3、 CBFRTS(基于PVC或者DLCI号)
   map-class frame-relay shape
frame-relay cir 2048000
fram bc 256000
fram min 1024000
fram adaptive   interface-congestion 30

int s0/0
frame-relay traffic-shape  
frame-relay interface-dlci 107
class shape
 
如果对所有的PVC做
fram-relay class shape 

流量监管内容:
一、 CAR
1、 基于接口的CAR
CAR(承诺访问速率):

CAR提供了两项功能:限制速率和设置优先级。CAR语句要求同时设置速率限制和IP优先级
它根据报文的ToS或CoS值(对于IP报文是指IP优先级或者DSCP等等)IP报文的五元组(指源地址目的地址协议端口号)等信息进行报文分类,完成报文的标记和流量监管。 

使用QOS组

int s0/0
 rate-limit access-group 1 input 45000000 22500 22500 conform-action set-qos-transmit 3 exceed-action  drop
 rate-limit input 45000000 22500 22500 conform-action set-qos-transmit 0 exceed-action  drop

access-list 1 permit 10.10.10.0 0.0.0.255

2、 基于流量的CAR【access-list】【甚至可以基于MAC】
int s0
 rate-limit input access-group 1 input 45000000 22500 22500 conform-action set-prec-transmit 5 exceed-action set-prece-transmit 5
 rate-limit input 45000000 22500 22500 conform-action set-prec-transmit 4 exceed-action set-prece-transmit 4
access-list 1 permit 10.10.10.0 0.0.0.255

show  interface  rate-limit  
二、Cbpolicy【CB shape】
1、基于class-map
Class-map match-all class
  Match ip add 
Policy-map TT
 Policy xxxx

最后思考是否发现所有的东西都可以在MQC中做呢?