QoS之拥塞避免配置方法
需求分析
1、voip语音业务为ef快速转发
2、video视频业务为确保转发af31
3、data业务为确保转发af11
4、两边路由入口都进行流量分类与标记(一般入口用复杂流分类mqc做,ds域中间使用简单流分类)
QoS拥塞管理
1、QoS拥塞管理配置(两种一种是r1用基于队列的,一种是r2基于mqc的,实现中选择一种就行了)
2、r1上的拥塞管理用基于队伍的拥塞管理ef队列用pq调度,af31和af11用wfq调度(wfq可以配置权重值)
3、r2上的拥塞管理用基于mqc的拥塞管理,voip用llq队列配置最大带宽20M,video确保带宽50M,data确保30M
为什么voip用llq,因为llq用的是流量监管限速,ef用的是流量整形限速,所以llq比ef延迟更低,llq也叫低延迟队列
QoS拥塞避免
1、voip和video使用默认的尾丢弃(尽量少丢包,减少卡顿,用尾丢弃)
2、data使用wred技术,设置最大丢弃概率为30%,流量低门限为60%,流量高门限为90%(wred是提前丢弃报文,增加了丢包率)
R1
acl number 3000
rule 5 permit ip source 192.168.1.0 0.0.0.255
acl number 3001
rule 5 permit ip source 192.168.2.0 0.0.0.255
acl number 3002
rule 5 permit ip source 192.168.3.0 0.0.0.255
drop-profile data //拥塞避免创建丢弃模板
wred dscp
dscp af11 low-limit 60 high-limit 90 discard-percentage 30
qos queue-profile p1
queue 1 weight 30
queue 3 weight 50
schedule wfq 1 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 acl 3002
traffic behavior ef
remark dscp ef
traffic behavior af11
remark dscp af11
traffic behavior af31
remark dscp af31
traffic policy p1
classifier video behavior af31
classifier voip behavior ef
classifier data behavior af11
interface GigabitEthernet0/0/0
ip address 10.0.12.1 255.255.255.0
trust dscp override
qos queue-profile p1 //队伍调度法
interface GigabitEthernet0/0/1
ip address 10.0.11.1 255.255.255.0
traffic-policy p1 inbound
ospf 1
default-route-advertise
area 0.0.0.0
network 10.0.11.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 10.0.12.2
r2
acl number 3000
rule 5 permit ip source 172.16.1.0 0.0.0.255
acl number 3001
rule 5 permit ip source 172.16.2.0 0.0.0.255
acl number 3002
rule 5 permit ip source 172.16.3.0 0.0.0.255
traffic classifier video operator or
if-match acl 3001
traffic classifier ef operator or
if-match dscp ef
traffic classifier af_data operator or
if-match dscp af11
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 acl 3002
drop-profile data //拥塞避免创建丢弃模版
wred dscp
dscp default low-limit 60 high-limit 90 discard-percentage 30
traffic behavior llq
queue llq bandwidth 20480 cbs 512000
traffic behavior ef
remark dscp ef
traffic behavior af_data
queue af bandwidth 30720
drop-profile data //拥塞避免引用丢弃模版
traffic behavior af_video
queue af bandwidth 51200
traffic behavior af11
remark dscp af11
traffic behavior af31
remark dscp af31
traffic policy p2
classifier ef behavior llq
classifier af_video behavior af_video
classifier af_data behavior af_data
traffic policy p1
classifier video behavior af31
classifier voip behavior ef
classifier data behavior af11
interface GigabitEthernet0/0/0
ip address 10.0.12.2 255.255.255.0
trust dscp override
traffic-policy p2 outbound //DS域内出接口调用
interface GigabitEthernet0/0/1
ip address 10.0.22.1 255.255.255.0
traffic-policy p1 inbound
ospf 1
default-route-advertise
area 0.0.0.0
network 10.0.22.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 10.0.12.1
sw1
vlan batch 10 to 11 20 30
dhcp enable
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
dhcp select interface
interface Vlanif11
ip address 10.0.11.2 255.255.255.0
interface Vlanif20
ip address 192.168.2.1 255.255.255.0
dhcp select interface
interface Vlanif30
ip address 192.168.3.1 255.255.255.0
dhcp select interface
interface MEth0/0/1
interface GigabitEthernet0/0/1
port link-type access
port default vlan 11
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
interface GigabitEthernet0/0/4
port link-type access
port default vlan 30
ospf 1
import-route direct
area 0.0.0.0
network 10.0.11.2 0.0.0.0
sw2
vlan batch 10 20 22 30
dhcp enable
interface Vlanif10
ip address 172.16.1.1 255.255.255.0
dhcp select interface
interface Vlanif20
ip address 172.16.2.1 255.255.255.0
dhcp select interface
interface Vlanif22
ip address 10.0.22.2 255.255.255.0
interface Vlanif30
ip address 172.16.3.1 255.255.255.0
dhcp select interface
interface MEth0/0/1
interface GigabitEthernet0/0/1
port link-type access
port default vlan 22
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
interface GigabitEthernet0/0/4
port link-type access
port default vlan 30
ospf 1
import-route direct
area 0.0.0.0
network 10.0.22.2 0.0.0.0
流策略查看
丢弃模版查看