干了15年弱电,今天跟兄弟们聊聊华为中大型园区无线组网的那些配置要点。咱们直接切入正题,不扯虚的。
先看看网络架构图,这张图大伙儿应该不陌生,我这些年干过的项目,十有八九都是这个路子。中大型园区嘛,设备多、用户杂,组网方案得稳得住才行。
**一、VLAN pool配置:别让IP地址“撑死”或“饿死”**
在无线网络里,用户接入灵活得很,经常一堆人挤在某个区域(比如办公区入口或者体育馆门口)同时连网,然后又在不同AP之间来回漫游。你说要是每个SSID底下就一个业务VLAN,那麻烦就大了——用户扎堆的地方IP地址不够用,别的地方IP又闲着,资源分配跟闹着玩似的。
解决办法就是搞个VLAN pool,把它配成无线用户的业务VLAN。这样一来,一个SSID能同时支持多个业务VLAN,新接进来的用户自动分到不同的VLAN里。好处是明摆着的:单个VLAN下的用户数少了,广播域缩了,IP地址分配也更均匀,浪费自然就少了。
配置命令也不复杂,咱直接上:
```
[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
```
这里分配算法我习惯用“hash”,缺省就是它,没改过的话不用再敲一遍“assignment hash”命令。VLAN pool里加两个VLAN只是举个例子,实际项目里可以根据用户量多配几个。记得在AC上给每个VLAN对应的VLANIF接口配好IP地址和接口地址池,这个不能忘。
**二、AP上线配置:给每台AP起个好名字**
AP上线这块,先创建AP组,把配置一样的AP都塞进去:
```
[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit
```
然后配域管理模板,设国家码(咱国内肯定是“cn”),再在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的源接口,我吃过这亏——上次忘配了,折腾半天AP就是上不了线,后来才想起来是源接口没设,气得拍桌子:
```
[AC] capwap source interface vlanif 100
```
离线导入AP的时候,我建议按部署位置给AP起名,比如“area_1”、“area_2”,这样后期维护一看名字就知道在哪,省得翻说明书。命令如下:
```
[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”查看状态,如果“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业务参数配置:安全策略别图省事**
业务参数这块,安全模板、SSID模板、VAP模板一个都不能少。安全模板我一般配WPA2+PSK+AES,密码设个强点的,别搞“123456”糊弄事。命令如下:
```
[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
```
SSID模板设好名称:
```
[AC-wlan-view] ssid-profile name wlan-ssid
[AC-wlan-ssid-prof-wlan-ssid] ssid wlan-net
[AC-wlan-ssid-prof-wlan-ssid] quit
```
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] ...
```
**四、实际施工经验:别让细节坑了你**
说到实际经验,我得跟兄弟们唠叨几句。第一,AP位置别瞎放。有一次在园区食堂,我把AP装在墙角,结果信号全被金属货架挡住了,用户端着饭碗到处找信号。后来学乖了,装之前先拿手机测测信号覆盖,尤其是那些钢架结构、玻璃幕墙多的地方,AP得错开布置。
第二,VLAN pool里的VLAN数量别太少,也别太多。我见过一个项目,客户非要配20个VLAN,结果管理起来乱成一锅粥,IP分配也搞得不均匀。一般根据用户数来,500人以内配3-5个VLAN就够了,再多就添乱。
第三,AP名字别起“AP1”、“AP2”这种,维护的时候根本分不清在哪儿。我后来统一按“楼栋-楼层-区域”命名,比如“A1-3F-Office”,找问题一目了然,省得翻图纸。
**五、省钱技巧:能省则省,但别省在关键处**
干这行十几年,我也总结了些省钱的门道。比如AP不用非得买最新款,前一代的型号经常有清仓价,性能完全够用,只要支持802.11ac或者Wi-Fi 6就行。还有,交换机端口别全用光口,电口便宜多了,除非传输距离超100米,否则千兆电口完全够用。
但有些钱不能省:电源线一定要用好点的,别贪便宜买杂牌,我见过AP因为电源质量差导致频繁掉线,客户投诉电话打不停。另外,网线至少超五类,别用四类线凑合,否则信号衰减到你哭。
好了,今天就聊到这儿。这些配置要点和实战经验,都是我在工地上摸爬滚打总结出来的,希望能帮到兄弟们。有啥问题随时交流,咱们下回再聊别的。
**一、VLAN pool配置:别让IP地址“撑死”或“饿死”**
在无线网络里,用户接入灵活得很,经常一堆人挤在某个区域(比如办公区入口或者体育馆门口)同时连网,然后又在不同AP之间来回漫游。你说要是每个SSID底下就一个业务VLAN,那麻烦就大了——用户扎堆的地方IP地址不够用,别的地方IP又闲着,资源分配跟闹着玩似的。
解决办法就是搞个VLAN pool,把它配成无线用户的业务VLAN。这样一来,一个SSID能同时支持多个业务VLAN,新接进来的用户自动分到不同的VLAN里。好处是明摆着的:单个VLAN下的用户数少了,广播域缩了,IP地址分配也更均匀,浪费自然就少了。
配置命令也不复杂,咱直接上:
```
[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
```
这里分配算法我习惯用“hash”,缺省就是它,没改过的话不用再敲一遍“assignment hash”命令。VLAN pool里加两个VLAN只是举个例子,实际项目里可以根据用户量多配几个。记得在AC上给每个VLAN对应的VLANIF接口配好IP地址和接口地址池,这个不能忘。
**二、AP上线配置:给每台AP起个好名字**
AP上线这块,先创建AP组,把配置一样的AP都塞进去:
```
[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit
```
然后配域管理模板,设国家码(咱国内肯定是“cn”),再在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的源接口,我吃过这亏——上次忘配了,折腾半天AP就是上不了线,后来才想起来是源接口没设,气得拍桌子:
```
[AC] capwap source interface vlanif 100
```
离线导入AP的时候,我建议按部署位置给AP起名,比如“area_1”、“area_2”,这样后期维护一看名字就知道在哪,省得翻说明书。命令如下:
```
[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”查看状态,如果“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业务参数配置:安全策略别图省事**
业务参数这块,安全模板、SSID模板、VAP模板一个都不能少。安全模板我一般配WPA2+PSK+AES,密码设个强点的,别搞“123456”糊弄事。命令如下:
```
[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
```
SSID模板设好名称:
```
[AC-wlan-view] ssid-profile name wlan-ssid
[AC-wlan-ssid-prof-wlan-ssid] ssid wlan-net
[AC-wlan-ssid-prof-wlan-ssid] quit
```
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] ...
```
**四、实际施工经验:别让细节坑了你**
说到实际经验,我得跟兄弟们唠叨几句。第一,AP位置别瞎放。有一次在园区食堂,我把AP装在墙角,结果信号全被金属货架挡住了,用户端着饭碗到处找信号。后来学乖了,装之前先拿手机测测信号覆盖,尤其是那些钢架结构、玻璃幕墙多的地方,AP得错开布置。
第二,VLAN pool里的VLAN数量别太少,也别太多。我见过一个项目,客户非要配20个VLAN,结果管理起来乱成一锅粥,IP分配也搞得不均匀。一般根据用户数来,500人以内配3-5个VLAN就够了,再多就添乱。
第三,AP名字别起“AP1”、“AP2”这种,维护的时候根本分不清在哪儿。我后来统一按“楼栋-楼层-区域”命名,比如“A1-3F-Office”,找问题一目了然,省得翻图纸。
**五、省钱技巧:能省则省,但别省在关键处**
干这行十几年,我也总结了些省钱的门道。比如AP不用非得买最新款,前一代的型号经常有清仓价,性能完全够用,只要支持802.11ac或者Wi-Fi 6就行。还有,交换机端口别全用光口,电口便宜多了,除非传输距离超100米,否则千兆电口完全够用。
但有些钱不能省:电源线一定要用好点的,别贪便宜买杂牌,我见过AP因为电源质量差导致频繁掉线,客户投诉电话打不停。另外,网线至少超五类,别用四类线凑合,否则信号衰减到你哭。
好了,今天就聊到这儿。这些配置要点和实战经验,都是我在工地上摸爬滚打总结出来的,希望能帮到兄弟们。有啥问题随时交流,咱们下回再聊别的。