配置AC内漫游示例
配置流程
WLAN不同的特性和功能需要在不同类型的模板下进行配置和维护,这些模板统称为WLAN模板,如域管理模板、射频模板、VAP模板、AP系统模板、AP有线口模板、WIDS模板、WDS模板。当用户在配置WLAN业务功能时,需要在对应功能的WLAN模板中进行参数配置,配置完成后,须将此模板引用到AP组或AP中,配置下发到AP,进而配置的功能在AP上生效。由于模板之间是存在各相互引用关系的,因此在用户配置过程中,需要提前了解各个模板之间存在的逻辑关系。模板的逻辑关系和基本配置流程请参见WLAN业务配置流程。
组网需求
某小型企业为员工提供WLAN网络业务,由于场所面积不大,可以通过一台AC对AP进行管理。同时为了区分部门进行管理,不同部门的员工在不同的子网。企业希望员工在企业内部移动办公的同时网络业务不中断。
如图6-6所示,AC为企业员工提供业务服务,AC分别连接AP_1和AP_2。
配置思路
- 配置网络互通,使AP与AC之间能够传输CAPWAP报文。
- 配置AC作为DHCP服务器,为STA和AP分配IP地址。
- 配置WLAN基本业务,保证用户能够连接到无线网络。
数据规划
配置项 |
数据 |
---|---|
DHCP服务器 | AC作为DHCP服务器为STA和AP分配IP地址 |
AP的IP地址池 | 10.10.10.2~10.10.10.254/24 |
STA的IP地址池 | 10.10.11.2~10.10.11.254/24 10.10.12.2~10.10.12.254/24 |
AC的源接口IP地址 | VLANIF100:10.10.10.1/24 |
AP组 |
|
|
|
域管理模板 |
|
SSID模板 |
|
安全模板 |
|
VAP模板 |
|
|
配置注意事项
- 业务数据转发方式采用直接转发时,建议在直连AP的交换机接口上配置组播报文抑制。
- 业务数据转发方式采用隧道转发时,建议在AC的流量模板下配置组播报文抑制。
- 管理VLAN和业务VLAN不能配置为同一VLAN。
在配置多个VAP模板,且多个VAP模板共用同一个service-vlan的场景下,如果配置数据转发方式为tunnel模式,则需要启动service-vlan间的Proxy ARP功能。
操作步骤
- 配置AP与AC之间网络互通
# 将接口Eth2/0/0和Eth2/0/1加入VLAN100(管理VLAN)、VLAN101和VLAN102(业务VLAN)。
建议在AC连接AP的接口Eth2/0/0和Eth2/0/1上配置端口隔离,如果不配置端口隔离,可能会在VLAN内存在不必要的广播报文,或者导致不同AP间的WLAN用户二层互通的问题。
<Huawei> system-view [Huawei] sysname AC [AC] vlan batch 100 to 102 [AC] interface ethernet 2/0/0 [AC-Ethernet2/0/0] port link-type trunk [AC-Ethernet2/0/0] port trunk pvid vlan 100 [AC-Ethernet2/0/0] port trunk allow-pass vlan 100 to 102 [AC-Ethernet2/0/0] port-isolate enable [AC-Ethernet2/0/0] quit [AC] interface ethernet 2/0/1 [AC-Ethernet2/0/1] port link-type trunk [AC-Ethernet2/0/1] port trunk pvid vlan 100 [AC-Ethernet2/0/1] port trunk allow-pass vlan 100 to 102 [AC-Ethernet2/0/1] port-isolate enable [AC-Ethernet2/0/1] quit
- 配置AC作为DHCP服务器,为AP和STA分配IP地址
[AC] dhcp enable [AC] interface vlanif 100 [AC-Vlanif100] ip address 10.10.10.1 255.255.255.0 [AC-Vlanif100] dhcp select interface [AC-Vlanif100] quit [AC] interface vlanif 101 [AC-Vlanif101] ip address 10.10.11.1 255.255.255.0 [AC-Vlanif101] dhcp select interface [AC-Vlanif101] quit [AC] interface vlanif 102 [AC-Vlanif102] ip address 10.10.12.1 255.255.255.0 [AC-Vlanif102] dhcp select interface [AC-Vlanif102] quit
- 配置AP上线
# 创建AP组“ap-group1”和“ap-group2”。
[AC] wlan ac [AC-wlan-view] ap-group name ap-group1 Info: This operation may take a few seconds. Please wait for a moment.done. [AC-wlan-ap-group-ap-group1] quit [AC-wlan-view] ap-group name ap-group2 Info: This operation may take a few seconds. Please wait for a moment.done. [AC-wlan-ap-group-ap-group2] quit
# 创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板。
[AC-wlan-view] regulatory-domain-profile name domain [AC-wlan-regulate-domain-domain] country-code cn Info: The current country code is same with the input country code. [AC-wlan-regulate-domain-domain] quit [AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] regulatory-domain-profile domain 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] ap-group name ap-group2 [AC-wlan-ap-group-ap-group2] regulatory-domain-profile domain 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-group2] quit [AC-wlan-view] quit
# 配置AC的源接口。
[AC] capwap source interface vlanif 100
# 在AC上离线导入AP,并将AP_1和AP_2分别加入AP组“ap-group1”和“ap-group2”中。假设AP_1和AP_2的类型为AP6010DN-AGN,其MAC地址分别为60de-4476-e360和dcd2-fc04-b500。ap auth-mode命令缺省情况下为MAC认证,如果之前没有修改其缺省配置,可以不用执行ap auth-mode mac-auth。
[AC] wlan ac [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 ap1 [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 Info: This operation may take a few seconds. Please wait for a moment.. done. [AC-wlan-ap-0] quit [AC-wlan-view] ap-id 1 ap-mac dcd2-fc04-b500 [AC-wlan-ap-1] ap-name ap2 [AC-wlan-ap-1] ap-group ap-group2 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 Info: This operation may take a few seconds. Please wait for a moment.. done. [AC-wlan-ap-1] quit
# 将AP上电后,当执行命令display ap all查看到AP的“State”字段为“nor”时,表示AP正常上线。
[AC-wlan-view] display ap all Info: This operation may take a few seconds. Please wait for a moment.done. Total AP information: nor : normal [2] ------------------------------------------------------------------------------------------- ID MAC Name Group IP Type State STA Uptime ------------------------------------------------------------------------------------------- 0 60de-4476-e360 ap1 ap-group1 10.10.10.253 AP6010DN-AGN nor 0 28S 1 dcd2-fc04-b500 ap2 ap-group2 10.10.10.254 AP6010DN-AGN nor 0 11S ------------------------------------------------------------------------------------------- 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 Warning: This action may cause service interruption. Continue?[Y/N]y Info: This operation may take a few seconds, please wait.done. [AC-wlan-ssid-prof-wlan-ssid] quit
# 分别创建名为“wlan-vap1”和“wlan-vap2”的VAP模板,配置业务VLAN,并引用安全模板“wlan-security”和SSID模板“wlan-ssid”。
[AC-wlan-view] vap-profile name wlan-vap1 [AC-wlan-vap-prof-wlan-vap1] service-vlan vlan-id 101 Info: This operation may take a few seconds, please wait.done. [AC-wlan-vap-prof-wlan-vap1] security-profile wlan-security Info: This operation may take a few seconds, please wait..done. [AC-wlan-vap-prof-wlan-vap1] ssid-profile wlan-ssid Info: This operation may take a few seconds, please wait..done. [AC-wlan-vap-prof-wlan-vap1] quit [AC-wlan-view] vap-profile name wlan-vap2 [AC-wlan-vap-prof-wlan-vap2] service-vlan vlan-id 102 Info: This operation may take a few seconds, please wait.done. [AC-wlan-vap-prof-wlan-vap2] security-profile wlan-security Info: This operation may take a few seconds, please wait..done. [AC-wlan-vap-prof-wlan-vap2] ssid-profile wlan-ssid Info: This operation may take a few seconds, please wait..done. [AC-wlan-vap-prof-wlan-vap2] quit
# 配置AP组“ap-group1”和“ap-group2”分别引用VAP模板“wlan-vap1”和“wlan-vap2”,AP上射频0和射频1都使用VAP模板的配置。
[AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] vap-profile wlan-vap1 wlan 1 radio all Info: This operation may take a few seconds, please wait..done. [AC-wlan-ap-group-ap-group1] quit [AC-wlan-view] ap-group name ap-group2 [AC-wlan-ap-group-ap-group2] vap-profile wlan-vap2 wlan 1 radio all Info: This operation may take a few seconds, please wait..done. [AC-wlan-ap-group-ap-group2] quit
# 提交配置。
[AC-wlan-view] commit all Warning: Committing configuration may cause service interruption, continue?[Y/N]:y
- 验证配置结果
# WLAN业务配置会自动下发给AP,配置完成后,执行命令display vap ssid wlan-net查看VAP信息,当“Status”显示为“ON”时,表示AP对应射频上的VAP已创建成功。
[AC-wlan-view] display vap ssid wlan-net Info: This operation may take a few seconds, please wait. WID : WLAN ID -------------------------------------------------------------------------- AP ID AP name RfID WID BSSID Status Auth type STA SSID -------------------------------------------------------------------------- 0 ap1 0 1 60DE-4476-E360 ON WPA2-PSK 0 wlan-net 0 ap1 1 1 60DE-4476-E370 ON WPA2-PSK 0 wlan-net 1 ap2 0 1 DCD2-FC04-B500 ON WPA2-PSK 0 wlan-net 1 ap2 1 1 DCD2-FC04-B510 ON WPA2-PSK 0 wlan-net -------------------------------------------------------------------------- Total: 4
# STA在AP_1的覆盖范围内搜索到SSID为“wlan-net”的无线网络,输入密码“a1234567”并正常关联后,在AC上执行命令display station ssid wlan-net,查看STA的接入信息,可以看到STA关联到了AP_1,STA的MAC地址为“cc3a-61cf-6344”。[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 ------------------------------------------------------------------------------------------ cc3a-61cf-6344 0 ap1 0/1 2.4G - -/- - 101 10.10.11.254 ------------------------------------------------------------------------------------------ Total: 1 2.4G: 1 5G: 0
# 当STA从AP_1的覆盖范围移动到AP_2的覆盖范围时,在AC上执行命令display station ssid wlan-net,查看STA的接入信息,可以看到STA关联到了AP_2。[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 ------------------------------------------------------------------------------------------ cc3a-61cf-6344 1 ap2 0/1 2.4G 11n 59/45 -32 102 10.10.12.254 ------------------------------------------------------------------------------------------ Total: 1 2.4G: 1 5G: 0
# 在AC上执行命令display station roam-track sta-mac cc3a-61cf-6344,可以查看该STA的漫游轨迹。[AC-wlan-view] display station roam-track sta-mac cc3a-61cf-6344 Access SSID:wlan-net Rx/Tx: link receive rate/link transmit rate(Mbps) ------------------------------------------------------------------------------ L2/L3 AC IP AP name Radio ID BSSID TIME In/Out RSSI Out Rx/Tx ------------------------------------------------------------------------------ -- 10.10.10.1 ap1 1 60de-4476-e360 2015/02/07 17:48:30 -57/-58 46/65 L3 10.10.10.1 ap2 1 dcd2-fc04-b500 2015/02/07 17:54:50 -58/- -/- ------------------------------------------------------------------------------ Number: 1
配置文件
AC的配置文件
# sysname AC # vlan batch 100 to 102 # dhcp enable # interface Vlanif100 ip address 10.10.10.1 255.255.255.0 dhcp select interface # interface Vlanif101 ip address 10.10.11.1 255.255.255.0 dhcp select interface # interface Vlanif102 ip address 10.10.12.1 255.255.255.0 dhcp select interface # interface Ethernet2/0/0 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 to 102 port-isolate enable group 1 # interface Ethernet2/0/1 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 to 102 port-isolate enable group 1 # capwap source interface vlanif100 # wlan ac security-profile name wlan-security security wpa2 psk pass-phrase %^%#]:krYrz_r<ee}|Cq@9V(W{ZD$"\-R-HD_y.4#U4,%^%# aes ssid-profile name wlan-ssid ssid wlan-net vap-profile name wlan-vap1 service-vlan vlan-id 101 ssid-profile wlan-ssid security-profile wlan-security vap-profile name wlan-vap2 service-vlan vlan-id 102 ssid-profile wlan-ssid security-profile wlan-security regulatory-domain-profile name domain ap-group name ap-group1 regulatory-domain-profile domain radio 0 vap-profile wlan-vap1 wlan 1 radio 1 vap-profile wlan-vap1 wlan 1 radio 2 vap-profile wlan-vap1 wlan 1 ap-group name ap-group2 regulatory-domain-profile domain radio 0 vap-profile wlan-vap2 wlan 1 radio 1 vap-profile wlan-vap2 wlan 1 radio 2 vap-profile wlan-vap2 wlan 1 ap-id 0 type-id 19 ap-mac 60de-4476-e360 ap-sn 210235554710CB000042 ap-name ap1 ap-group ap-group1 ap-id 1 type-id 19 ap-mac dcd2-fc04-b500 ap-sn 210235554710CB000078 ap-name ap2 ap-group ap-group2 # return