最佳答案
一、需求拆解
左侧移动线路 VLAN71:入端口 XGE1/0/2、XGE1/0/3,共享总带宽 2G;
工作日 08:00-18:00:2 口流量优先级 > 3 口,拥塞时优先保障 2 口;其余时间无优先级限制。
右侧电信线路 VLAN73:入端口 XGE1/0/6、XGE1/0/7,共享总带宽 2G;
工作日 08:00-18:00:6 口流量优先级 > 7 口,拥塞时优先保障 6 口;其余时间无优先级限制。
设备型号 S5000-16X-EI 为 Comware V7,采用接口队列调度 + 时间段 ACL 流分类 + CAR 限速实现分时优先级。
核心原理:
时间段区分工作时段 / 非工作时段;
工作时段给高优先级端口报文标记更高本地优先级;
接口出方向 WRR 调度,高优先级队列优先转发;
上下行入口限速 2G,保证共享带宽封顶。
二、完整可直接复制配置
1. 定义时间段(工作日 8:00-18:00)
bash
运行
system-view
# 创建工作时段time-range
time-range work-time 08:00 to 18:00 working-day
2. 定义 ACL,区分两条业务 VLAN 流量
bash
运行
# VLAN71 移动业务流量
acl advanced 4071
rule permit vlan-id 71
# VLAN73 电信业务流量
acl advanced 4073
rule permit vlan-id 73
3. 流分类、流行为、流策略(分时标记优先级)
3.1 移动侧 2 口高优、3 口低优(工作时段生效)
bash
运行
# 流分类:匹配XGE1/0/2入方向VLAN71流量
traffic classifier cls_2_in operator and
if-match acl 4071
if-match interface XGE1/0/2
# 流行为:工作时段标记本地优先级5(高优),其余默认0
traffic behavior beh_2_high
remark local-precedence 5 time-range work-time
# 流分类:匹配XGE1/0/3入方向VLAN71流量
traffic classifier cls_3_in operator and
if-match acl 4071
if-match interface XGE1/0/3
# 流行为:工作时段标记本地优先级1(低优)
traffic behavior beh_3_low
remark local-precedence 1 time-range work-time
# 绑定流策略
traffic policy policy_move
classifier cls_2_in behavior beh_2_high
classifier cls_3_in behavior beh_3_low
3.2 电信侧 6 口高优、7 口低优(工作时段生效)
bash
运行
# XGE1/0/6 高优
traffic classifier cls_6_in operator and
if-match acl 4073
if-match interface XGE1/0/6
traffic behavior beh_6_high
remark local-precedence 5 time-range work-time
# XGE1/0/7 低优
traffic classifier cls_7_in operator and
if-match acl 4073
if-match interface XGE1/0/7
traffic behavior beh_7_low
remark local-precedence 1 time-range work-time
traffic policy policy_tele
classifier cls_6_in behavior beh_6_high
classifier cls_7_in behavior beh_7_low
4. 入端口限速(每组共享 2G 带宽,万兆口限速 2000000kbps)
bash
运行
# 移动侧入端口 2、3,入口限速2G
interface XGE1/0/2
qos carl 1 source-interface XGE1/0/2
qos car carl 1 cir 2000000 cbs 12500000 ebs 0 green pass red discard
port traffic-policy policy_move inbound
quit
interface XGE1/0/3
qos carl 2 source-interface XGE1/0/3
qos car carl 2 cir 2000000 cbs 12500000 ebs 0 green pass red discard
port traffic-policy policy_move inbound
quit
# 电信侧入端口 6、7,入口限速2G
interface XGE1/0/6
qos carl 3 source-interface XGE1/0/6
qos car carl 3 cir 2000000 cbs 12500000 ebs 0 green pass red discard
port traffic-policy policy_tele inbound
quit
interface XGE1/0/7
qos carl 4 source-interface XGE1/0/7
qos car carl 4 cir 2000000 cbs 12500000 ebs 0 green pass red discard
port traffic-policy policy_tele inbound
quit
5. 全局开启 QoS,配置 WRR 队列调度(关键,否则优先级不生效)
S5000-16X-EI 支持 8 个本地优先级队列,WRR 加权调度,高优先级队列权重更大:
bash
运行
# 全局开启QoS
qos enable
# 全局WRR调度,本地优先级5权重50,优先级1权重10,拥塞时优先转发高优流量
qos wrr weight 0 10 10 10 10 50 10 10
# 所有出接口统一使用WRR调度(上联出口XGE1/0/1、XGE1/0/5必须配置)
interface range XGE1/0/1 XGE1/0/5
qos queue wrr
quit
6. 保存配置
bash
运行
save force
三、配置不生效的 4 个核心坑(你之前配置失效原因)
坑 1:只做标记,没配置出接口 WRR 队列调度
仅 remark 本地优先级,出口不开启 WRR,设备所有队列同等转发,优先级完全无效。必须在两个上联出口XGE1/0/1、XGE1/0/5配置qos queue wrr。
坑 2:时间段绑定错误,remark 不加 time-range
如果remark local-precedence 5不带time-range work-time,全天都标记高优,无法实现分时段限制。
坑 3:限速 CAR 配置方向错误
带宽限制必须在入方向 inbound做,服务器流量从 2/3/6/7 进入交换机,入口封顶 2G;如果配置在出口,无法限制内网涌入流量。
坑 4:流策略未绑定接口
port traffic-policy xxx inbound 漏配,报文不会执行优先级标记,QoS 逻辑完全不触发。
四、验证 & 排错命令
bash
运行
# 查看时间段是否生效
display time-range work-time
# 查看流策略绑定接口
display traffic policy interface XGE1/0/2 inbound
# 查看队列调度配置
display qos queue configuration interface XGE1/0/1
# 查看CAR限速统计(超出2G会有red丢弃计数)
display qos car statistics interface XGE1/0/2 inbound
# 查看报文本地优先级标记统计
display traffic classifier statistics
五、逻辑说明
工作时段 8:00-18:00
XGE1/0/2、XGE1/0/6 报文标记本地优先级 5(高权重队列);
XGE1/0/3、XGE1/0/7 报文标记本地优先级 1(低权重队列);
上联出口拥塞时,优先转发 5 队列流量,保障 2/6 口不拥堵。
其余时间
remark 时间段不匹配,报文默认本地优先级 0,WRR 权重均等,无优先级区分。
每组入口 CAR 限速 2000000kbps,实现 2/3 共享 2G、6/7 共享 2G 带宽封顶。
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论