华为中型园区无线网络组网方案及配置教程(下)

七、配置VLAN pool,用于作为业务VLAN
在WLAN无线网络环境中,由于无线用户接入方式和接入位置较为灵活,经常会出现用户在某个地点(例如办公区入口或体育场馆入口)集中接入到同一个无线网络中,然后漫游到其它AP覆盖的无线网络环境下。如果每个SSID中只有一个业务VLAN为无线用户提供无线网络服务,很容易产生接入用户数多的区域IP地址资源不足、而其它区域IP地址资源浪费的现象。通过将VLAN pool配置为无线用户的业务VLAN,实现一个SSID能够同时支持多个业务VLAN。新接入的用户会被动态地分配到VLAN pool中的各个VLAN中,减少了单个VLAN下的用户数,缩小了广播域;同时每个VLAN尽量均匀地分配IP地址,减少了IP地址的浪费。

新建VLAN pool,并将VLAN101和VLAN102加入其中,配置VLAN pool中的VLAN分配算法为“hash”。
[AC] vlan pool sta-pool
[AC-vlan-pool-sta-pool] vlan 101 102
[AC-vlan-pool-sta-pool] assignment hash
[AC-vlan-pool-sta-pool] quit

注:本例VLAN pool中的VLAN分配算法配置为“hash”。分配算法缺省情况下为“hash”,如果之前没有修改其缺省配置,可以不用执行命令assignment hash。

本例VLAN pool仅以加入VLAN101和VLAN102两个VLAN为例,实际可以配置多个VLAN加入VLAN pool,配置方法与VLAN101和VLAN102一致,也需要在AC上创建对应的VLANIF接口、配置IP地址和接口地址池。

八、配置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. Continue?[Y/N]:y
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] quit

配置AC的源接口。
[AC] capwap source interface vlanif 100

在AC上离线导入AP,并将AP加入AP组“ap-group1”中。假设AP的MAC地址为60de-4476-e360和60de-4474-9640,并且根据AP的部署位置为AP配置名称,便于从名称上就能够了解AP的部署位置。例如MAC地址为60de-4476-e360的AP部署在1号区域,命名此AP为area_1。
注:ap auth-mode命令缺省情况下为MAC认证,如果之前没有修改其缺省配置,可以不用执行ap auth-mode mac-auth命令。
举例中使用的AP为AP5030DN,具有射频0和射频1两个射频。AP5030DN的射频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
Warning: This operation may cause AP reset. Continue? [Y/N]:y
[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 configurations of the radio, Whether to continue? [Y/N]:y
[AC-wlan-ap-0] quit
[AC-wlan-view] ap-id 1 ap-mac 60de-4474-9640
[AC-wlan-ap-1] ap-name area_2
Warning: This operation may cause AP reset. Continue? [Y/N]:y
[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 configurations 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]
Extra information:P : insufficient power supply
ID MAC Name Group IP Type State STA Uptime ExtraInfo
0 60de-4476-e360 area_1 ap-group1 10.23.100.254 AP5030DN nor 0 5M:2S –
1 60de-4474-9640 area_2 ap-group1 10.23.100.253 AP5030DN nor 0 5M:4S –

Total: 2

九、配置WLAN业务参数
创建名为“wlan-security”的安全模板,并配置安全策略。
举例中以配置WPA2+PSK+AES的安全策略为例,密码为“a1234567”,实际配置中请根据实际情况,配置符合实际要求的安全策略。
[AC-wlan-view] security-profile name wlan-security
[AC-wlan-sec-prof-wlan-security] security wpa2 psk pass-phrase a1234567 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
[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-pool sta-pool
[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 all
[AC-wlan-ap-group-ap-group1] quit

十、配置AP射频的信道和功率
注:射频的信道和功率自动调优功能默认开启,如果不关闭此功能则会导致手动配置不生效。举例中AP射频的信道和功率仅为示例,实际配置中请根据AP的国家码和网规结果进行配置。
关闭AP射频0的信道和功率自动调优功能,并配置AP射频0的信道和功率。
[AC-wlan-view] ap-id 0
[AC-wlan-ap-0] radio 0
[AC-wlan-radio-0/0] calibrate auto-channel-select disable
[AC-wlan-radio-0/0] calibrate auto-txpower-select disable
[AC-wlan-radio-0/0] channel 20mhz 6
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-radio-0/0] eirp 127
[AC-wlan-radio-0/0] quit

关闭AP射频1的信道和功率自动调优功能,并配置AP射频1的信道和功率。
[AC-wlan-ap-0] radio 1
[AC-wlan-radio-0/1] calibrate auto-channel-select disable
[AC-wlan-radio-0/1] calibrate auto-txpower-select disable
[AC-wlan-radio-0/1] channel 20mhz 149
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-radio-0/1] eirp 127
[AC-wlan-radio-0/1] quit
[AC-wlan-ap-0] quit

十一、验证配置结果
配置完成后,通过执行命令display vap ssid wlan-net查看如下信息,当“Status”项显示为“ON”时,表示AP对应的射频上的VAP已创建成功。
[AC-wlan-view] display vap ssid wlan-net
WID : WLAN ID
AP ID AP name RfID WID BSSID Status Auth type STA SSID
0 area_1 0 1 60DE-4476-E360 ON WPA2-PSK 0 wlan-net
0 area_1 1 1 60DE-4476-E370 ON WPA2-PSK 0 wlan-net
1 area_2 0 1 60DE-4474-9640 ON WPA2-PSK 0 wlan-net
1 area_2 1 1 60DE-4474-9650 ON WPA2-PSK 0 wlan-net

Total: 4

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
Rx/Tx: link receive rate/link transmit rate(Mbps)
STA MAC AP ID Ap name Rf/WLAN Band Type Rx/Tx RSSI VLAN IP address
e019-1dc7-1e08 0 area_1 1/1 5G 11n 38/64 -68 102 10.23.102.254
14cf-9202-13dc 1 area_2 0/1 2.4G 11n 3/34 -68 101 10.23.101.254
Total: 2 2.4G: 1 5G: 1
[AC-wlan-view] quit
[AC] quit

十二、保存配置
通过命令行配置的数据是临时性的。如果不保存,交换机重启后这些配置都会丢失。
如果要使当前配置在交换机重启后仍然有效,需要将当前配置保存为配置文件。
以AC为例:
<AC>save
The current configuration will be written to flash:/vrpcfg.zip.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 0..
Save the configuration successfully.

ICP备案号:晋ICP备18007549号-1
站长微信:15534641008