此配置只适合分配好VLAN的各项业务,例如:vlan10是视频业务,vlan20是语音业务等。
1.配置流分类
bash
[ar1]traffic classifier c1 operator and
[ar1-classifier-c1]if-match vlan-id 10
[ar1-classifier-c1]q
[ar1]traffic classifier c2 operator and
[ar1-classifier-c2]if-match vlan-id 20
[ar1-classifier-c2]q
2.配置流行为
- 业务对实时性要求比较高,设置大带宽的同时,将DSCP优先级标记为46,保证后续设备优先转发。
- 对实时性要求没语音那么敏感,可以配置大带宽,将DSCP优先级标记为30。
bash
[ar1]traffic behavior b1
[ar1-behavior-b1]car cir 8000 pir 15000 //配置限速带宽
[ar1-behavior-b1]remark dscp 46 //标记报文DSCP为46
[ar1-behavior-b1]statistic enable //用于验证配置结果
[ar1-behavior-b1]q
[ar1]traffic behavior b2
[ar1-behavior-b2]car cir 10000 pir 20000
[ar1-behavior-b2]remark dscp 30
[ar1-behavior-b2]statistic enable
[ar1-behavior-b2]q
3.配置流策略
bash
[ar1]traffic policy p1
[ar1-trafficpolicy-p1]cha
[ar1-trafficpolicy-p1]cl
[ar1-trafficpolicy-p1]classifier c1 be
[ar1-trafficpolicy-p1]classifier c1 behavior b1
[ar1-trafficpolicy-p1]cl
[ar1-trafficpolicy-p1]classifier c2 be
[ar1-trafficpolicy-p1]classifier c2 behavior b2
4.应用至接口
bash
[ar1]int g0/0/0
[ar1-GigabitEthernet0/0/0]traffic-policy p1 inbound
[ar1-GigabitEthernet0/0/0]q