各部门带宽怎么分主次?华为HQoS父子策略语音优先视频其次
本文整理自华为官方发布的典型配置案例,命令与步骤均按原始文档呈现,供现场实施参考。
普通限速只能给某个网段划一条上限,可企业里的真实需求往往是两层的:部门之间要各有各的保证带宽,部门内部语音、视频、下载又要分先后。华为防火墙的 HQoS(基于带宽父子策略的队列调度)就是为这种差分服务设计的:父策略管部门级别的整体带宽,子策略管部门里各业务的调度优先级,语音走 PQ 优先发送,视频和数据按权重与整形比例排后面。下面按官方案例把配置完整走一遍。
场景需求:三个部门各有保证带宽——部门 1 保证 50000kbps(DRR 调度、权重 30),部门 2 保证 30000kbps(DRR、权重 10),部门 3 保证 20000kbps(DRR、权重 10),并能共享端口最大带宽;部门内业务分三档:语音用 PQ 优先保证低延时,视频 DRR 权重 1、整形速率百分比 20%,数据 DRR 权重 20、整形速率百分比 80%。
第一步,配置接口 IP 地址和安全区域。GE0/0/1 为出口(untrust),GE0/0/2 连内网。
<HUAWEI> system-view
[HUAWEI] sysname DeviceA
[DeviceA] interface ge 0/0/1
[DeviceA-GE0/0/1] undo portswitch
[DeviceA-GE0/0/1] ip address 1.1.1.1 24
[DeviceA-GE0/0/1] quit
[DeviceA] firewall zone untrust
[DeviceA-zone-untrust] add interface ge 0/0/1
[DeviceA-zone-untrust] quit
[DeviceA] interface ge 0/0/2
[DeviceA-GE0/0/2] undo portswitch
[DeviceA-GE0/0/2] ip address 10.3.0.1 24
[DeviceA-GE0/0/2] quit
[DeviceA] firewall zone trust
[DeviceA-zone-trust] add interface ge 0/0/2
[DeviceA-zone-trust] quit
第二步,配置安全策略,允许内网用户访问 Internet。官方注明实际配置中建议按组网需要配置精细化的安全策略。
[DeviceA] security-policy
[DeviceA-policy-security] rule name policy_sec1
[DeviceA-policy-security-rule-policy_sec1] source-zone trust
[DeviceA-policy-security-rule-policy_sec1] destination-zone untrust
[DeviceA-policy-security-rule-policy_sec1] action permit
[DeviceA-policy-security-rule-policy_sec1] quit
[DeviceA-policy-security] quit
第三步,为各部门配置带宽通道和带宽策略(HQoS 父策略),并在带宽策略引用带宽通道时绑定物理出接口,对命中流量的出口做整形。以部门 1 为例:
[DeviceA] bandwidth-policy
[DeviceA-policy-bandwidth] profile name profile_department1
[DeviceA-policy-bandwidth-profile-profile_department1] bandwidth guaranteed-bandwidth whole upstream shaping value 50000
[DeviceA-policy-bandwidth-profile-profile_department1] shaping mode drr weight 30
[DeviceA-policy-bandwidth-profile-profile_department1] quit
[DeviceA-policy-bandwidth] rule name policy_department1
[DeviceA-policy-bandwidth-rule-policy_department1] ingress-interface Tunnel1
[DeviceA-policy-bandwidth-rule-policy_department1] action hqos
[DeviceA-policy-bandwidth-rule-policy_department1-hqos] interface ge 0/0/1 bind profile profile_department1
[DeviceA-policy-bandwidth-rule-policy_department1-hqos] quit
[DeviceA-policy-bandwidth-rule-policy_department1] quit
部门 2、部门 3 同样方法配置,保证带宽分别为 30000 和 20000,DRR 权重都是 10,策略名对应为 policy_department2、policy_department3,ingress-interface 分别为 Tunnel2、Tunnel3。
第四步,为部门内各业务配置带宽通道和带宽策略(HQoS 子策略),通过 parent 参数挂到父策略下面。官方案例以 UserVoice、YouKu 和 QQDownLoad 三种应用举例,实际配置时按需求指定应用。语音业务用 PQ 调度:
[DeviceA] bandwidth-policy
[DeviceA-policy-bandwidth] profile name profile_voice
[DeviceA-policy-bandwidth-profile-profile_voice] shaping mode pq
[DeviceA-policy-bandwidth-profile-profile_voice] quit
[DeviceA-policy-bandwidth] rule name policy_voice parent policy_department1
[DeviceA-policy-bandwidth-rule-policy_voice] application app UserVoice
[DeviceA-policy-bandwidth-rule-policy_voice] action qos profile profile_voice
[DeviceA-policy-bandwidth-rule-policy_voice] quit
视频业务,最大带宽按父策略的 20% 整形、DRR 权重 1:
[DeviceA-policy-bandwidth] profile name profile_video
[DeviceA-policy-bandwidth-profile-profile_video] bandwidth maximum-bandwidth whole upstream shaping percentage 20
[DeviceA-policy-bandwidth-profile-profile_video] shaping mode drr weight 1
[DeviceA-policy-bandwidth-profile-profile_video] quit
[DeviceA-policy-bandwidth] rule name policy_video parent policy_department1
[DeviceA-policy-bandwidth-rule-policy_video] application app YouKu
[DeviceA-policy-bandwidth-rule-policy_video] action qos profile profile_video
[DeviceA-policy-bandwidth-rule-policy_video] quit
数据业务,80% 整形、DRR 权重 20:
[DeviceA-policy-bandwidth] profile name profile_others
[DeviceA-policy-bandwidth-profile-profile_others] bandwidth maximum-bandwidth whole upstream shaping percentage 80
[DeviceA-policy-bandwidth-profile-profile_others] shaping mode drr weight 20
[DeviceA-policy-bandwidth-profile-profile_others] quit
[DeviceA-policy-bandwidth] rule name policy_others parent policy_department1
[DeviceA-policy-bandwidth-rule-policy_others] application app QQDownLoad
[DeviceA-policy-bandwidth-rule-policy_others] action qos profile profile_others
[DeviceA-policy-bandwidth-rule-policy_others] quit
[DeviceA-policy-bandwidth]quit
部门 2 和部门 3 的各业务配置,官方注明参考部门 1 的方法即可。
配置完成后怎么验证?一方面在设备上查看带宽策略和通道的配置与命中统计,确认各父策略、子策略都被流量命中;另一方面做实际体验验证:出口打满时打一通网络语音,听是否依旧清晰流畅(PQ 优先生效的标志),再对比视频会议和下载的速度是否符合 20%/80% 的比例关系。逐部门逐业务核一遍,差分服务的层次感就出来了。
部门分级加业务分级两层管带宽,比一刀切限速精细得多。欢迎搜索关注贵州诚鑫致达科技,聊聊中小企业出口带宽的精细化管理。
企业存储选型参考|贵州诚鑫致达
小团队起步上手 NAS,群晖机型参考:DS425+ · DS224+ · DS124。需要选型建议或上门评估,搜「诚鑫致达」即可找到我们。
服务区域|贵州诚鑫致达
贵州群晖NAS、贵阳存储、数据备份、信创云盘或 IT 集成服务,可联系贵州诚鑫致达科技,服务范围覆盖贵州全省各市州。四川成都群晖存储部署、机房建设与数据安全集成服务。