百兆带宽被视频和下载吃光防火墙带宽管理限闲杂流量保核心业务
「网又卡了」——这句话在企业里被抱怨最多的时候,往往不是带宽真的不够,而是被吃光了:有人在工位看高清视频,有人挂着下载和网盘同步,邮件发不出去、ERP 页面转圈。出口带宽 100M,关键业务占不到两成,剩下全被闲杂流量拿走。加带宽是花钱的办法,更先该做的是在防火墙上把这两类流量分开管理:闲杂的封顶,核心的托底。
下面这套组网与命令来自华为防火墙官方典型配置案例。场景设定:企业在运营商处购买了 100M 带宽,Email、ERP 属于关键业务流量,P2P、在线视频属于非关键业务流量;目标是任何时间内 P2P、在线视频最大带宽不超过 30Mbps,工作时间内 Email、ERP 可获得的最小带宽不少于 60Mbps。接口与基础配置先把外网口带宽值报给设备:
[DeviceA] interface ge0/0/2
[DeviceA-GE0/0/2] undo portswitch
[DeviceA-GE0/0/2] ip address 1.1.1.1 24
[DeviceA-GE0/0/2] bandwidth egress 100000
[DeviceA-GE0/0/2] quit
[DeviceA] firewall zone untrust
[DeviceA-zone-untrust] add interface ge0/0/2
[DeviceA-zone-untrust] quit
GE0/0/1(10.3.0.1/24,trust 域)接内网,安全策略放行内网用户上网,此处不再展开。接着定义工作时间段,给核心业务的托底策略用:
[DeviceA] time-range work_time 09:00 to 18:00 working-day
第一步,给 P2P、在线视频建带宽通道封顶(整体上、下行各 30000kbps),再建带宽策略引用它。官方示例以 BT、优酷两种应用为例,实际按需增删应用即可:
[DeviceA] bandwidth-policy
[DeviceA-policy-bandwidth] profile name profile_p2p
[DeviceA-policy-bandwidth-profile-profile_p2p] bandwidth maximum-bandwidth whole upstream 30000
[DeviceA-policy-bandwidth-profile-profile_p2p] bandwidth maximum-bandwidth whole downstream 30000
[DeviceA-policy-bandwidth-profile-profile_p2p] quit
[DeviceA-policy-bandwidth] rule name policy_p2p
[DeviceA-policy-bandwidth-rule-policy_p2p] source-zone trust
[DeviceA-policy-bandwidth-rule-policy_p2p] destination-zone untrust
[DeviceA-policy-bandwidth-rule-policy_p2p] application app BT
[DeviceA-policy-bandwidth-rule-policy_p2p] application app YouKu
[DeviceA-policy-bandwidth-rule-policy_p2p] action qos profile profile_p2p
[DeviceA-policy-bandwidth-rule-policy_p2p] quit
第二步,给 Email、ERP 建托底通道(上、下行各 60000kbps),策略里引用时间段,只在上班时间生效。官方示例以 LotusNotes、OWA 两种应用为例:
[DeviceA-policy-bandwidth] profile name profile_email
[DeviceA-policy-bandwidth-profile-profile_email] bandwidth guaranteed-bandwidth whole upstream 60000
[DeviceA-policy-bandwidth-profile-profile_email] bandwidth guaranteed-bandwidth whole downstream 60000
[DeviceA-policy-bandwidth-profile-profile_email] quit
[DeviceA-policy-bandwidth] rule name policy_email
[DeviceA-policy-bandwidth-rule-policy_email] source-zone trust
[DeviceA-policy-bandwidth-rule-policy_email] destination-zone untrust
[DeviceA-policy-bandwidth-rule-policy_email] application app LotusNotes
[DeviceA-policy-bandwidth-rule-policy_email] application app OWA
[DeviceA-policy-bandwidth-rule-policy_email] time-range work_time
[DeviceA-policy-bandwidth-rule-policy_email] action qos profile profile_email
[DeviceA-policy-bandwidth-rule-policy_email] quit
两个概念别混:maximum-bandwidth 是上限,超出的报文直接丢弃;guaranteed-bandwidth 是下限,链路拥挤时这部分带宽留给匹配的业务。上限通道不限时间段,托底通道挂上班时间,下班后视频流量可以放开些,这个节奏正好贴合办公场景。
验证方法:制造一批 P2P、视频流量,观察 Email、ERP 是否正常转发;再执行 display bandwidth-policy statistic bandwidth whole upstream rule policy_p2p,输出里 Rcv-Rate 是限流前每秒接收的报文字节数,Pass-Rate 是限流后的,两个数字的差距就是被拦下的闲杂流量。跑几天后再看,关键业务的投诉通常会先消失——问题从来不在带宽小,而在没人给它排队。
给中小企业做出口优化时,贵州诚鑫致达科技习惯先跑一周流量统计再定这两条策略,封顶值和托底值都拿真实数据说话,避免拍脑袋误伤业务。
企业存储选型参考|贵州诚鑫致达
做中小企业全能主力存储,群晖机型参考:DS1823xs+ · DS2422+ · DS923+。需要选型建议或上门评估,搜「诚鑫致达」即可找到我们。