1、两边两个方向做相同的配置:入口复杂流分类用mqc方式配置,ds内设备入口配简单流分类。
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
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
qos queue-profile qp1
queue 1 weight 30
queue 3 weight 50
schedule wfq 0 to 3 pq 5
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
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
traffic classifier AF_data operator or
if-match dscp af11
traffic classifier video operator or
if-match acl 3001
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
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 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
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