WLAN-AC+AP,动态负载均衡用户量,避免某一个AP负载过重
阅读原文时间:2023年08月29日阅读:8

组网图形

    

动态负载均衡简介

  • 负载均衡功能主要功能就是平衡WLAN网络中AP的负载,充分地保证每个STA的带宽。当有一个新的STA加入网络时,动态负载均衡动态将AC将所有上报该STA的AP动态组成一个组,然后根据负载均衡算法判断STA是否允许接入。
  • 与静态负载均衡相比,动态负载均衡解决了静态负载均衡的成员数目有限,均衡组内各成员需要手工配置且必须为同一频段的缺点,可以更好地保证每个客户端的带宽。

组网需求

  • 如图所示,现有网络中AC连接上层网络,并通过汇聚交换机和接入交换机连接并管理AP。
  • 当大量用户通过同一个AP接入Internet进行业务访问时,会造成AP负载过重,降低用户无线上网体验。企业希望各AP射频下的数据流量能够做到相对均衡,以避免某一个AP射频下流量过多而导致负载过重。

配置思路

采用如下的思路配置动态负载均衡:

  • 1.配置AP、AC和上层网络设备之间实现网络互通。

  • 2.在AC上配置基于接口的DHCP服务器为AP分配IP地址,同时配置AC作为DHCP中继,由AC连接的路由器为STA分配IP地址。

  • 3.配置VLAN pool,用于作为业务VLAN。

  • 4.配置AP上线。

    • a.创建AP组,用于将需要进行相同配置的AP都加入到AP组,实现统一配置。
    • b.配置AC的系统参数,包括国家码、AC与AP之间通信的源接口。
    • c.配置AP上线的认证方式并离线导入AP,实现AP正常上线。
  • 5.配置WLAN业务参数,实现STA访问WLAN网络功能。

  • 6.配置动态负载均衡功能,避免某一个AP负载过重。

说明:

当用户新开局时,对于AP的射频信道的设置,用户可根据网络规划手动指定,也可使用射频调优功能自动选择最佳信道。本例中采用射频调优功能自动选择最佳信道。

操作步骤

  • 1.在AC上配置NAC模式为统一模式(缺省值,不需配置)。配置SwitchA和AC,使AP与AC之间能够传输CAPWAP报文

      # 配置SwitchA,将接口GE0/0/1、GE0/0/2和GE0/0/3加入VLAN100(管理VLAN)。

system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 100
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] port trunk pvid vlan 100
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] port trunk pvid vlan 100
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-gigabitethernet0/0/3] port link-type trunk
[SwitchA-gigabitethernet0/0/3] port trunk allow-pass vlan 100
[SwitchA-gigabitethernet0/0/3] quit

  # 配置AC连接SwitchA的接口GE1/0/1加入VLAN100。

[HUAWEI] sysname AC
[AC] vlan batch 100
[AC] interface gigabitethernet 1/0/1
[AC-GigabitEthernet1/0/1] port link-type trunk
[AC-GigabitEthernet1/0/1] port trunk allow-pass vlan 100
[AC-GigabitEthernet1/0/1] quit

  • 2.配置AC与上层网络设备互通

      # 配置VLANIF101(业务VLAN)和VLANIF102。

[AC] vlan batch 101 102
[AC] interface vlanif 101
[AC-Vlanif101] ip address 10.23.101.1 24
[AC-Vlanif101] quit
[AC] interface vlanif 102
[AC-Vlanif102] ip address 10.23.102.2 24
[AC-Vlanif102] quit

  # 配置AC的缺省路由。

[AC] ip route-static 0.0.0.0 0.0.0.0 10.23.102.1 //配置缺省路由指向Router

  # 配置AC连接Router的接口GE1/0/2加入VLAN102。

[AC] interface gigabitethernet 1/0/2
[AC-GigabitEthernet1/0/2] port link-type trunk
[AC-GigabitEthernet1/0/2] port trunk allow-pass vlan 102
[AC-GigabitEthernet1/0/2] quit

  • 3.配置AC给AP分配IP地址,Router给STA分配IP地址。

      # 配置AC通过接口地址池为AP分配IP地址。

[AC] dhcp enable
[AC] interface vlanif 100
[AC-Vlanif100] ip address 10.23.100.1 24
[AC-Vlanif100] dhcp select interface //配置基于接口的地址池
[AC-Vlanif100] quit

  # 配置AC作为DHCP中继并使能DHCP中继探测用户表项功能。

[AC] interface vlanif 101
[AC-Vlanif101] dhcp select relay //配置DHCP中继功能
[AC-Vlanif101] dhcp relay server-ip 10.23.102.1 //配置DHCP中继所代理的DHCP服务器地址为Router上的IP地址10.23.102.1
[AC-Vlanif101] quit

  # 配置Router作为DHCP服务器为STA分配IP地址。

system-view
[Huawei] sysname Router
[Router] dhcp enable
[Router] ip pool sta //配置地址池为STA分配IP地址
[Router-ip-pool-sta] gateway-list 10.23.101.1
[Router-ip-pool-sta] network 10.23.101.0 mask 24
[Router-ip-pool-sta] quit
[Router] vlan batch 102
[Router] interface vlanif 102
[Router-Vlanif102] ip address 10.23.102.1 24
[Router-Vlanif102] dhcp select global //配置全局的地址池
[Router-Vlanif102] quit
[Router] interface gigabitethernet 2/0/0
[Router-GigabitEthernet2/0/0] port link-type trunk
[Router-GigabitEthernet2/0/0] port trunk allow-pass vlan 102
[Router-GigabitEthernet2/0/0] quit
[Router] ip route-static 10.23.101.0 24 10.23.102.2 //配置Router到达10.23.101.0/24网段的路由

  • 4.配置AP上线

      # 创建AP组,用于将相同配置的AP都加入同一AP组中。

[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit

  # 创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板。

[AC-wlan-view] regulatory-domain-profile name domain1
[AC-wlan-regulate-domain-domain1] country-code cn
[AC-wlan-regulate-domain-domain1] quit
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] regulatory-domain-profile domain1
Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continu
e?[Y/N]:y
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] quit

  # 配置AC的源接口

[AC] capwap source interface vlanif 100

  # 在AC上离线导入AP,并将area_1和area_2加入AP组“ap-group1”中。假设AP的MAC地址为60de-4476-e360,并且根据AP的部署位置为AP配置名称,便于从名称上就能够了解AP的部署位置。例如MAC地址为60de-4476-e360的AP部署在1号区域,命名此AP为area_1。

说明:
ap auth-mode命令缺省情况下为MAC认证,如果之前没有修改其缺省配置,可以不用执行ap auth-mode mac-auth。
举例中使用的AP为AP6010DN-AGN,具有射频0和射频1两个射频。AP6010DN-AGN的射频0为2.4GHz射频,射频1为5GHz射频。

[AC] wlan
[AC-wlan-view] ap auth-mode mac-auth
[AC-wlan-view] ap-id 0 ap-mac 60de-4476-e360
[AC-wlan-ap-0] ap-name area_1
[AC-wlan-ap-0] ap-group ap-group1
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configuration
s of the radio, Whether to continue? [Y/N]:y
[AC-wlan-ap-0] quit
[AC-wlan-view] ap-id 1 ap-mac dcd2-fc04-b500
[AC-wlan-ap-1] ap-name area_2
[AC-wlan-ap-1] ap-group ap-group1
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configuration
s of the radio, Whether to continue? [Y/N]:y
[AC-wlan-ap-1] quit

  # 将AP上电后,当执行命令display ap all查看到AP的“State”字段为“nor”时,表示AP正常上线。

[AC-wlan-view] display ap all
Total AP information:

nor : normal [2]

ID MAC Name Group IP Type State STA Uptime

0 60de-4476-e360 area_1 ap-group1 10.23.101.253 AP6010DN-AGN nor 0 5M:2S

1 dcd2-fc04-b500 area_2 ap-group1 10.23.101.254 AP6010DN-AGN nor 0 5M:4S

Total: 2

  • 5.配置WLAN业务参数

      # 创建名为“wlan-security”的安全模板,并配置安全策略。

[AC-wlan-view] security-profile name wlan-security
[AC-wlan-sec-prof-wlan-security] security wpa2 psk pass-phrase a1234567 aes //配置安全策略为WPA2+PSK+AES
[AC-wlan-sec-prof-wlan-security] quit

   # 创建名为“wlan-ssid”的SSID模板,并配置SSID名称为“wlan-net”。

[AC-wlan-view] ssid-profile name wlan-ssid
[AC-wlan-ssid-prof-wlan-ssid] ssid wlan-net //配置SSID名称为wlan-net
[AC-wlan-ssid-prof-wlan-ssid] quit

  # 创建名为“wlan-vap”的VAP模板,配置业务数据转发模式、业务VLAN,并且引用安全模板和SSID模板。

[AC-wlan-view] vap-profile name wlan-vap
[AC-wlan-vap-prof-wlan-vap] forward-mode tunnel //配置业务转发模式为隧道转发
[AC-wlan-vap-prof-wlan-vap] service-vlan vlan-id 101 //缺省情况下VLAN ID为1,修改VLAN ID为101
[AC-wlan-vap-prof-wlan-vap] security-profile wlan-security
[AC-wlan-vap-prof-wlan-vap] ssid-profile wlan-ssid
[AC-wlan-vap-prof-wlan-vap] quit

  # 配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板“wlan-vap”的配置。

[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] vap-profile wlan-vap wlan 1 radio 0
[AC-wlan-ap-group-ap-group1] vap-profile wlan-vap wlan 1 radio 1
[AC-wlan-ap-group-ap-group1] quit

  • 6.配置动态负载均衡功能

      # 创建RRM模板“loadbalance-dynamic”,在RRM模板“loadbalance-dynamic”使能动态负载均衡功能,并指定动态负载均衡的起始门限为15个,差值门限为25%。

[AC-wlan-view] rrm-profile name loadbalance-dynamic
[AC-wlan-rrm-prof-loadbalance-dynamic] sta-load-balance dynamic enable
[AC-wlan-rrm-prof-loadbalance-dynamic] sta-load-balance dynamic start-threshold 15
[AC-wlan-rrm-prof-loadbalance-dynamic] sta-load-balance dynamic gap-threshold 25
[AC-wlan-rrm-prof-loadbalance-dynamic] quit

  # 创建2G射频模板“radio2g”,并在该模板下引用RRM模板“loadbalance-dynamic”。

[AC-wlan-view] radio-2g-profile name radio2g
[AC-wlan-radio-2g-prof-radio2g] rrm-profile loadbalance-dynamic
[AC-wlan-radio-2g-prof-radio2g] quit

  # 创建5G射频模板“radio5g”,并在该模板下引用RRM模板“loadbalance-dynamic”。

[AC-wlan-view] radio-5g-profile name radio5g
[AC-wlan-radio-5g-prof-radio5g] rrm-profile loadbalance-dynamic
[AC-wlan-radio-5g-prof-radio5g] quit

  # 在名为“ap-group1”的AP组下引用5G射频模板“radio5g”和2G射频模板“radio2g”。

[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] radio-5g-profile radio5g
[AC-wlan-ap-group-ap-group1] radio-2g-profile radio2g
[AC-wlan-ap-group-ap-group1] quit

  • 7.提交配置

[AC-wlan-view] commit all
Warning: Committing configuration may cause service interruption, continue?[Y/N]:y

  • 8.验证配置结果

      STA搜索到名为“wlan-net”的无线网络,输入密码“a1234567”并正常关联后,在AC上执行命令display station ssid wlan-net,可以查看到用户已经接入到无线网络“wlan-net”中。

[AC-wlan-view] display station ssid wlan-net
Rf/WLAN: Radio ID/WLAN ID

STA MAC AP ID Ap name Rf/WLAN Band Type Rx/Tx RSSI VLAN IP address

e019-1dc7-1e08 0 area_1 0/1 2.4G 11n 65/38 -29 101 10.23.101.253

b878-2eb4-2689 1 area_2 0/1 2.4G 11n 78/43 -33 101 10.23.101.254

Total: 2 2.4G: 2 5G: 0

  在AC上执行命令display rrm-profile name loadbalance-dynamic,可以查看到动态负载均衡的相关信息。

[AC-wlan-view] display rrm-profile name loadbalance-dynamic

Auto channel select : enable
Auto transmit power select : enable
PER threshold for trigger channel/power select(%) : 60
Airtime fairness schedule : disable
Dynamic adjust EDCA parameter : disable
UAC check client's SNR : disable
UAC client's SNR threshold(dB) : 20
UAC check client number : disable
UAC client number access threshold : 64
UAC client number roam threshold : 64
UAC check channel utilization : disable
UAC channel utilization access threshold : 80
UAC channel utilization roam threshold : 80
UAC hide SSID : disable
Band steer deny threshold : 2
Band balance start threshold : 10
Band balance gap threshold(%) : 20
Client's band expire based on continuous probe counts : 35
Station load balance : enable
Station load balance start threshold : 15
Station load balance gap threshold(%) : 25
Station load balance deny threshold : 3
Smart-roam : disable
Smart-roam check SNR : enable
Smart-roam standing SNR threshold(dB) : 20
Smart-roam SNR quick-kickoff-threshold(dB) : 15
Smart-roam check rate : disable
AMC policy : auto-balance
Smart-roam rate threshold(%) : 20
Smart-roam rate quick-kickoff-threshold(%) : 20
Smart-roam high level SNR margin(dB) : 15
Smart-roam low level SNR margin(dB) : 6
Smart-roam SNR check interval(s) : 3

Smart-roam unable roam client expire time(m) : 120

  在AC上执行命令display station load-balance sta-mac e019-1dc7-1e08查看参与动态负载均衡的AP射频。

[AC-wlan-view] display station load-balance sta-mac e019-1dc7-1e08

Station load balance status: balance

AP name Radio ID

area_1 1
area_1 0
area_2 1

area_2 0

Total: 2

  新用户想连接到AP area_1时,AC会根据AP的上报情况执行动态负载均衡算法,让新用户接入负载相对较小的AP。