1、两边两个方向做相同的配置:入口复杂流分类用mqc方式配置,ds内设备入口配简单流分类。
流量监管可以 同时应用 在接口出入都可以,整形只能在接口出方向上用。
监管可以对报文重标记,整形不支持重标记。
监管针对超出的流量采用直接丢弃的方式,整形针对 超出的流量不直接丢,而是放入缓存中后续发送,如果缓存占满后执行tail-drop,丢弃方式可以改为wred
监管比较适合用于对延时高的业务,整形比较适合用于对可靠性要求高的业务,但不适合对延时要求高的业务。
2、两边两个方法做拥塞管理配置,拥塞管理配置思路:
拥塞管理的两种配置方法(全部用一种也可以,这里学习就用了两种做实验):
AR1上用基于队列r的方法拥塞管理配置:
在AR1的出口使用基于队列拥塞管理,AR2的出口配置基于mqc的拥塞管理。
AR1上承载业务会根据标记进入不同的端口队列:语音流量进入EF队列,视频流量进入
AF3队列,数据流量进入AF1队列。
设置EF队列使用PQ调度,AF3、AF1队列用WFQ调度。
qos queue-profile qp1
schedule wfq 0 to 3 pq 5
queue 3 weight 50
queue 1 weight 30
查看
dis qos queue-profile qp1
在出接口上应用
int g0/0/0
qos queue-profile qp1
在AR2上用mqc进行拥塞管理配置(LLQ比EF优先级高):
语音流量用LLQ队列配置最大可用带宽20M,视频流量使用AF_video队列配置最小
确保带宽50M,数据流量使用AF_data队列配置最小可确保带宽30M。
配置语音流量dscp值为ef
traffic classifier ef
if-match dscp ef
quit
视频流量dscp值为af31
traffic classifier AF_video
if-match dscp af31
quit
数量流量dscp值为af11
traffic classifier AF_data
if-match dscp af11
quit
流行为LLQ带宽最大20M
traffic behavior LLQ
queue llq bandwidth 20480
quit
为video视频最小保证50M
traffic behavior AF_video
queue af bandwidth 51200
quit
为video数据最小保证30M
traffic behavior AF_data
queue af bandwidth 30720
quit
定义流策略,将流分类ef和流行为LLQ关联,将流分类AF和流行为AF关联。
traffic policy p2
classifier EF behavior LLQ
classifier AF_video behavior AF_video
classifier AF_data behavior AF_data
quit
出接口上应用
int g0/0/0
traffic-policy p2 outbound
查看流策略
dis traffic policy user-defined p2
拥塞避免配置:
语音和视频采用尾丢弃,其它对丢包率要求不高的用wred
先配置模版:
drop-profile data
wred dscp
dscp default low-limit 60 high-limit 90 discard-percentage 30
配置基于队列的wred调用data模版
qos queue-profile qp1
queue 1 drop-profile data
基于MQC方式配置避免
AR2上就用mqc配置尾丢弃
配置看下边
配置流量监管
基于接口的流量监管
interface GigabitEthernet0/0/0
qos car inbound cir 102400
#qos car inbound sou…也可以 基于IP的流量监管或acl都可以
基于mqc方式流量监管
traffic classifier car
if-match any
traffic behavior car
car cir 102400
traffic policy car
classifier car behavior car
interface GigabitEthernet0/0/0
traffic-policy car inbound
流量整形
基于队列形式
qos queue-profile qp1 建立队列模版
queue 1 gts cir 30720 cbs 768000
queue 3 gts cir 51200 cbs 1280000
queue 5 gts cir 20480 cbs 512000
interface GigabitEthernet0/0/0 接口调用
qos queue-profile qp1
基于接口的流量整形
interface GigabitEthernet0/0/0
qos gts cir 102400 cbs 2560000
基于MQC的方式:
看下面配置
lsw1配置
vlan batch 11 100 200 300
interface Vlanif11
ip address 10.0.0.6 255.255.255.252
interface Vlanif100
ip address 192.168.1.1 255.255.255.0
interface Vlanif200
ip address 192.168.2.1 255.255.255.0
interface Vlanif300
ip address 192.168.3.1 255.255.255.0
interface MEth0/0/1
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
interface GigabitEthernet0/0/2
port link-type access
port default vlan 200
interface GigabitEthernet0/0/3
port link-type access
port default vlan 11
interface GigabitEthernet0/0/4
port link-type access
port default vlan 300
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
AR1
acl number 3000
description voip
rule 5 permit ip source 192.168.1.0 0.0.0.255
acl number 3001
description video
rule 5 permit ip source 192.168.2.0 0.0.0.255
drop-profile data
wred dscp
dscp af11 low-limit 60 high-limit 90 discard-percentage 30
qos queue-profile qp1
queue 1 gts cir 30720 cbs 768000
queue 3 gts cir 51200 cbs 1280000
queue 5 gts cir 20480 cbs 512000
queue 1 weight 30
queue 3 weight 50
schedule wfq 0 to 3 pq 5
queue 1 drop-profile data
traffic classifier video operator or
if-match acl 3001
traffic classifier voip operator or
if-match acl 3000
traffic classifier data operator or
if-match any
traffic behavior ef
remark dscp ef
traffic behavior af11
remark dscp af11
traffic behavior af31
remark dscp af31
traffic policy p1
classifier voip behavior ef
classifier video behavior af31
classifier data behavior af11
interface GigabitEthernet0/0/0
ip address 10.0.0.1 255.255.255.252
trust dscp override
qos queue-profile qp1
qos car inbound cir 102400 cbs 19251200 pbs 32051200 green pass yellow pass red
discard
interface GigabitEthernet0/0/1
ip address 10.0.0.5 255.255.255.252
traffic-policy p1 inbound
interface GigabitEthernet0/0/2
interface NULL0
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
lsw2
vlan batch 12 100 200 300
interface Vlanif12
ip address 10.0.0.10 255.255.255.252
interface Vlanif100
ip address 172.16.1.1 255.255.255.0
interface Vlanif200
ip address 172.16.2.1 255.255.255.0
interface Vlanif300
ip address 172.16.3.1 255.255.255.0
interface MEth0/0/1
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
interface GigabitEthernet0/0/2
port link-type access
port default vlan 200
interface GigabitEthernet0/0/3
port link-type access
port default vlan 300
interface GigabitEthernet0/0/4
port link-type access
port default vlan 12
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
AR2
acl number 3000
description voip
rule 5 permit ip source 172.16.1.0 0.0.0.255
acl number 3001
description video
rule 5 permit ip source 172.16.2.0 0.0.0.255
drop-profile data
wred dscp
dscp default low-limit 60 high-limit 90 discard-percentage 30
traffic classifier AF_data operator or
if-match dscp af11
traffic classifier video operator or
if-match acl 3001
traffic classifier car operator or
if-match any
traffic classifier ef operator or
if-match dscp ef
traffic classifier voip operator or
if-match acl 3000
traffic classifier AF_video operator or
if-match dscp af31
traffic classifier data operator or
if-match any
traffic behavior AF_data
queue af bandwidth 30720
drop-profile data
traffic behavior car
car cir 102400 cbs 19251200 pbs 32051200 green pass yellow pass red discard
traffic behavior ef
remark dscp ef
traffic behavior AF_video
queue af bandwidth 51200
traffic behavior af11
remark dscp af11
traffic behavior af31
remark dscp af31
traffic behavior LLQ
queue llq bandwidth 20480 cbs 512000
traffic policy car
classifier car behavior car
traffic policy p2
classifier AF_video behavior AF_video
classifier AF_data behavior AF_data
traffic policy p1
classifier voip behavior ef
classifier video behavior af31
classifier data behavior af11
interface GigabitEthernet0/0/0
ip address 10.0.0.2 255.255.255.252
trust dscp override
qos gts cir 102400 cbs 2560000
traffic-policy car inbound
traffic-policy p2 outbound
interface GigabitEthernet0/0/1
ip address 10.0.0.9 255.255.255.252
traffic-policy p1 inbound
interface GigabitEthernet0/0/2
interface NULL0
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
mqc信息查看
dis traffic classifier user-defined
dis traffic-policy applied-record
内外优先级表对应关系查看:
dis qos map-table dscp-dscp