QoS之拥塞管理两种配置方法

需求分析

1、voip语音业务为ef快速转发

2、video视频业务为确保转发af31

3、data业务为确保转发af11

4、两边路由入口都进行流量分类与标记(一般入口用复杂流分类mqc做,ds域中间使用简单流分类)

5、QoS拥塞管理配置(两种一种是r1用基于队列的,一种是r2基于mqc的,实现中选择一种就行了)

6、r1上的拥塞管理用基于队伍的拥塞管理ef队列用pq调度,af31和af11用wfq调度(wfq可以配置权重值)

7、r2上的拥塞管理用基于mqc的拥塞管理,voip用llq队列配置最大带宽20M,video确保带宽50M,data确保30M

为什么voip用llq,因为llq用的是流量监管限速,ef用的是流量整形限速,所以llq比ef延迟更低,llq也叫低延迟队列

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

qos queue-profile p1

queue 1 weight 30

queue 3 weight 50

schedule wfq 1 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 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

traffic behavior llq

queue llq bandwidth 20480 cbs 512000

traffic behavior ef

remark dscp ef

traffic behavior af_data

queue af bandwidth 30720

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

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

mqc配置查看

DS域内只配这个一条命令简单流分类即可,可以不带override,带的话就是能对标记好的流量的优先级进行外部和内部优先级修映射改后再发给另一个ds设备(意思就是可以改dscp-dscp的两列的对应关系映射)

r1-GigabitEthernet0/0/0\]trust dscp override \[r2-GigabitEthernet0/0/0\]trust dscp override dscp-dscp内外优先级映射查看0-63 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/d58092dc73b144f399bd97709caa0f77.png) ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/18de236e975645419a458ec1f6a89631.png) r1出口捉包结果捉包查看 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/d3a2090922dd420190243f164a3faeaf.png) 两边三种业务ping后测试发现队列1是video 、3是 data,分别对af31、af11,队列5是voip对应ef,由此R1可以根据此队列进行拥塞管理配置 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/62d973eee7474a7799bf75a4c7bbd068.png) r1上用基于队列方式配,然后进行拥塞管理权重调整,wfq会根据权重值大的分配带宽高低(默认是10) r1上配 qos queue-profile p1 queue 1 weight 30 queue 3 weight 50 schedule wfq 1 to 3 pq 5 int g 0/0/0 qos queue-profile p1 查看权重值调整结果 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/8a6162d0d8e440e9a933627e23adf136.png) r2上用基于mqc的方式配 traffic classifier ef operator or if-match dscp ef traffic classifier af_data operator or if-match dscp af11 traffic classifier af_video operator or if-match dscp af31 traffic behavior llq queue llq bandwidth 20480 cbs 512000 traffic behavior af_data queue af bandwidth 30720 traffic behavior af_video queue af bandwidth 51200 traffic policy p2 classifier ef behavior llq classifier af_video behavior af_video classifier af_data behavior af_data interface GigabitEthernet0/0/0 ip address 10.0.12.2 255.255.255.0 trust dscp override traffic-policy p2 outbound 流策略查看 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/848104aaaee44cfbbc816bba1a4b7e7c.png)

相关推荐
程序猿追几秒前
【鸿蒙PC桌面端实战】从零构建 ArkTS 高性能图像展示器:DevEco Studio 调试与 HDC 命令行验证全流程
华为·harmonyos
运维栈记几秒前
虚拟化网络的根基-网络命名空间
网络·docker·容器
五仁火烧28 分钟前
生产环境中配置了接口3000后,不能启动,改成8080后就可以
linux·网络·安全·vue
橙露40 分钟前
国产PLC与进口PLC全面对比分析:技术、市场与未来趋势
运维·网络
前端世界1 小时前
设备找不到、Ability 启不动?一次讲清 DevEco Studio 调试鸿蒙分布式应用
华为·harmonyos
chilavert3181 小时前
技术演进中的开发沉思-302计算机原理:网络基础
网络·计算机原理
Hellc0071 小时前
Docker网络冲突排查与解决方案:完整指南
网络·docker·容器
眠りたいです2 小时前
Docker核心技术和实现原理第二部分:docker镜像与网络原理
运维·网络·docker·容器
闲人编程2 小时前
消息通知系统实现:构建高可用、可扩展的企业级通知服务
java·服务器·网络·python·消息队列·异步处理·分发器
Xの哲學2 小时前
Linux Platform驱动深度剖析: 从设计思想到实战解析
linux·服务器·网络·算法·边缘计算