应用场景
无线限速的主要功能在于限制无线用户的带宽占用,以达到带宽合理的目的。在实际应用场景中,可以通过带宽控制避免个别用户过多的抢占带宽,影响其他用户正常网络使用。
例如在校园网应用中,个别用户会使用P2P协议进行下载,通过限速就能够避免该用户过多占用带宽而导致其他用户无法正常上网。同时还可以通过带宽控制,优先保障高级用户的带宽使用。
以银行场景为例,在银行可以划分不同的WLAN,一个给内部员工使用,一个给银行客户使用,根据优先级配置不同的限速值,从而可以确保在带宽拥塞的场景中,内部员工通过无线工作不受到影响。
功能简介:
无线限速根据带宽控制的范围可以划分为:
基于wlan限速:基于wlan限速指的是限速范围是以wlan为单位。Wlan限速有三种策略:
1. Wlan-based total-user:可以配置指定wlan的上下行总带宽,当该策略生效时,在AC上属于该wlan范围内的所有用户的总带宽不能超过配置的额定速率。
2. Wlan-based per-user:可以配置指定wlan的所有用户各自的上下行带宽,当该策略生效时,所有AP上的关联了该wlan的所有用户,每个用户的带宽都不能超过配置的额定速率。
3. Wlan-based per-ap:可以配置指定wlan对于各个AP而言的上下行总带宽,当该策略生效时,以AP为单位,每个AP上的关联了该wlan的所有用户的总带宽不能超过配置的额定速率。
基于ap限速:基于ap限速指的是限速范围是以ap为单位。ap限速有两种策略:
1. ap-based total-user:可以配置指定ap的上下行总带宽,当该策略生效时,ap上关联的所有用户的总带宽不能超过配置的额定速率。
2. ap-based per-user:可以配置指定ap的所有用户各自上下行带宽,当该策略生效时,ap上关联的所有用户,每个用户的带宽都不能超过配置的额定速率。
基于用户限速:基于用户是对个别用户可以指定一个额定的速率,与wlan-based和ap-based的peruser不同,该额定速率只对该用户生效。
同时为了方便网管的使用,限速还具备自适应的带宽控制:
智能限速:当配置了wlan-based per-ap或者ap-based total-user限速时,可以开启该限速的智能限速限速功能,当智能限速功能开启时,其范围下的所有用户会自动根据用户的数量配置额定的速率(该速率均分掉wlan-based perap或者ap-based total-user的总限速)。
目前web界面只支持基于SSID做上下行限速,后续会完善其他限速方式。
CLI配置如下:
一、组网需求
限速可适用于无线的集中转发,本地转发以及胖AP的场景中,对用户的上下行带宽进行控制。
二、组网拓扑
三、配置要点
1)在AC上配置WLAN1的每个用户的限速为上下行平均速率为100KB,突发速率为200KB;
2)在AC上配置WLAN2的perap上下行平均限速为1000KB,突发速率为1000KB;
3)在AC上配置STA3的上下行平均限速为300KB,突发速率为400KB。
4)在AC上配置AP的总带宽上下行平均限速为2000KB,突发速率为2000KB。
四、配置步骤
AC上配置
1、在AC上配置WLAN1的每个用户的限速为上下行平均流量为100KB。
Ruijie#configure terminal
Ruijie(config)#wlan-config 1
Ruijie(config-wlan)# wlan-based per-user-limit up-streams average-data-rate 100 burst-data-rate 200 ----->配置上行
Ruijie(config-wlan)# wlan-based per-user-limit down-streams average-data-rate 100 burst-data-rate 200 ----->配置下行
Ruijie(config-wlan)#end
2、在AC上配置WLAN2的perap上下行限速为1000KB。
Ruijie#configure terminal
Ruijie(config)#wlan-config 1
Ruijie(config-wlan)# wlan-based per-ap-limit up-streams average-data-rate 1000 burst-data-rate 1000
Ruijie(config-wlan)# wlan-based per-ap-limit down-streams average-data-rate 1000 burst-data-rate 1000
Ruijie(config-wlan)#end
3、在AC上配置STA3的上下行平均限速为300KB,突发速率为400KB。
Ruijie#configure terminal
Ruijie(config)#ac-controller
Ruijie(config-ac)#netuser 3333.3333.3333 inbound average-data-rate 300 burst-data-rate 400 ----->假设STA的mac地址为3333.3333.3333,配置上行
Ruijie(config-ac)#netuser 3333.3333.3333 outbound average-data-rate 300 burst-data-rate 400 ----->配置下行
Ruijie(config-ac)#end
4、在AC上配置AP1的总带宽上下行平均限速为2000KB,突发速率为2000KB。
Ruijie#configure terminal
Ruijie(config)#ap-config AP1
Ruijie(config-ap)#ap-based total-user-limit up-streams average-data-rate 2000 burst-data-rate 2000
Ruijie(config-ap)#ap-based total-user-limit down-streams average-data-rate 2000 burst-data-rate 2000
Ruijie(config-ap)#end
5、保存配置
Ruijie#write -----> 确认配置正确,保存配置
五、注意事项
1、wlan-based per-user限速和ap-based per-user限速以及netuser限速,都是针对sta的,如果对同个方向都配置了限速,那么生效的优先级如下:
1)netuser限速生效,如果没有配置,选取2)
2)wlan-based peruser限速生效,如果没有配置选取3)
3)ap-based peruser限速生效
例如以上面的拓扑为例,如下配置,同时配置了AP1的ap-based peruser上行限速,WLAN1的wlan-based上行限速,以及STA1(假设mac地址为1111.1111.1111)的netuser上行限速,则STA1只以netuser的上行限速,平均速率300KB,突发速率300KB为准。
Ruijie#configure terminal
Ruijie(config)#wlan-config 1
Ruijie(config-wlan)# wlan-based per-user-limit up-streams average-data-rate 100 burst-data-rate 100 ----->配置上行
Ruijie(config-wlan)#exit
Ruijie(config)#ap-based AP1
Ruijie(config-ap)#ap-based per-user-limit up-streams average-data-rate 200 burst-data-rate 200
Ruijie(config-ap)#exit
Ruijie(config)#ac-controller
Ruijie(config-ac)#netuser 1111.1111.1111 inbound average-data-rate 300 burst-data-rate 300 ----->配置上行
Ruijie(config-ap)#exit
2、wlan-based total-user限速和ap-based total-user限速以及netuser限速,作用的范围不同,可以各自生效。
六、功能验证
以步骤四的配置为例,在实际应用中,进行文件下载,STA1和STA2各自的平均速率不会超过100KBps,STA3的平均速率不会超过300KBps。STA3和STA4加起来的总带宽不会超过1000KBps。