配置终端定位基本示例
组网图形
图1配置终端定位基本服务示例
- 组网需求
- 数据准备
- 配置思路
- 配置注意事项
- 操作步骤
- 配置文件
组网需求
如图1所示,某公司网络中,中心AP直接与RU连接。
管理员希望通过RU收集Wi-Fi终端信息,并提供给定位服务器进行定位计算,使用户可以通过地图、表格或报告等形式获取到该Wi-Fi终端的位置信息。
数据准备
项目 | 数据 |
---|---|
RU管理VLAN | VLAN100 |
STA业务VLAN | VLAN101 |
DHCP服务器 | 中心AP作为RU和STA的DHCP服务器 |
RU地址池 | 10.23.100.3~10.23.100.254/24 |
STA地址池 | 10.23.101.2~10.23.101.254/24 |
AP组 |
|
域管理模板 |
|
SSID模板 |
|
安全模板 |
|
VAP模板 |
|
空口扫描模板 |
|
2G射频模板 |
|
5G射频模板 |
|
定位模板 |
|
配置思路
采用如下的思路配置WLAN终端定位业务:
- 配置WLAN基本业务,保证用户能够通过WLAN网络接入公司内部网络。
- 配置终端定位功能,保证RU可以接收定位服务器的配置信息并将收集到的终端信息发送给定位服务器。
配置注意事项
建议在与RU直连的设备接口上配置端口隔离,如果不配置端口隔离,可能会在VLAN内形成大量不必要的广播报文,导致网络阻塞,影响用户体验。
操作步骤
- 配置定位服务器(略)。
- 配置中心AP,使AP与中心AP之间能够传输CAPWAP报文
# 配置中心AP连接AP的接口GigabitEthernet0/0/1~GigabitEthernet0/0/3加入VLAN100(管理VLAN)。 system-view[HUAWEI] sysname AP[AP] vlan batch 100 101[AP] interface gigabitethernet 0/0/1[AP-GigabitEthernet0/0/1] port link-type trunk[AP-GigabitEthernet0/0/1] port trunk pvid vlan 100[AP-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 101[AP-GigabitEthernet0/0/1] quit[AP] interface gigabitethernet 0/0/2[AP-GigabitEthernet0/0/2] port link-type trunk[AP-GigabitEthernet0/0/2] port trunk pvid vlan 100[AP-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 101[AP-GigabitEthernet0/0/2] quit[AP] interface gigabitethernet 0/0/3[AP-GigabitEthernet0/0/3] port link-type trunk[AP-GigabitEthernet0/0/3] port trunk pvid vlan 100[AP-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 101[AP-GigabitEthernet0/0/3] quit
- 配置中心AP与定位服务器互通
# 配置中心AP连接定位服务器的接口GE0/0/24加入VLAN100。[AP] interface gigabitethernet 0/0/24[AP-GigabitEthernet0/0/24] port link-type trunk[AP-GigabitEthernet0/0/24] port trunk pvid vlan 100[AP-GigabitEthernet0/0/24] port trunk allow-pass vlan 100 101[AP-GigabitEthernet0/0/24] quit
- 配置中心AP作为DHCP服务器,为STA和RU分配IP地址
# 配置基于接口地址池的DHCP服务器,其中,VLANIF100接口为RU提供IP地址,VLANIF101为STA提供IP地址。[AP] dhcp enable[AP] interface vlanif 100[AP-Vlanif100] ip address 10.23.100.1 24[AP-Vlanif100] dhcp select interface[AP-Vlanif100] quit[AP] interface vlanif 101[AP-Vlanif101] ip address 10.23.101.1 24[AP-Vlanif101] dhcp select interface[AP-Vlanif101] quit
- 配置RU上线
# 创建AP组,用于将相同配置的RU都加入同一AP组中。[AP] wlan[AP-wlan-view] ap-group name ap-group1[AP-wlan-ap-group-ap-group1] quit# 创建域管理模板,在域管理模板下配置中心AP的国家码并在AP组下引用域管理模板。[AP-wlan-view] regulatory-domain-profile name domain1[AP-wlan-regulatory-domain-prof-domain1] country-code cn[AP-wlan-regulatory-domain-prof-domain1] quit[AP-wlan-view] ap-group name ap-group1[AP-wlan-ap-group-ap-group1] regulatory-domain-profile domain1Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continu e" /># 创建名为“wlan-security”的安全模板,并配置安全策略。举例中以配置WPA2+PSK+AES的安全策略为例,密码为“a1234567”,实际配置中请根据实际情况,配置符合实际要求的安全策略。[AP-wlan-view] security-profile name wlan-security[AP-wlan-sec-prof-wlan-security] security wpa2 psk pass-phrase a1234567 aes[AP-wlan-sec-prof-wlan-security] quit# 创建名为“wlan-ssid”的SSID模板,并配置SSID名称为“wlan-net”。[AP-wlan-view] ssid-profile name wlan-ssid[AP-wlan-ssid-prof-wlan-ssid] ssid wlan-net[AP-wlan-ssid-prof-wlan-ssid] quit# 创建名为“wlan-vap”的VAP模板,配置业务VLAN,并且引用安全模板和SSID模板。[AP-wlan-view] vap-profile name wlan-vap[AP-wlan-vap-prof-wlan-vap] service-vlan vlan-id 101[AP-wlan-vap-prof-wlan-vap] security-profile wlan-security[AP-wlan-vap-prof-wlan-vap] ssid-profile wlan-ssid[AP-wlan-vap-prof-wlan-vap] quit# 配置AP组引用VAP模板,RU上射频0和射频1都使用VAP模板“wlan-vap”的配置。[AP-wlan-view] ap-group name ap-group1[AP-wlan-ap-group-ap-group1] vap-profile wlan-vap wlan 1 radio 0[AP-wlan-ap-group-ap-group1] vap-profile wlan-vap wlan 1 radio 1[AP-wlan-ap-group-ap-group1] quit
- 配置WLAN空口扫描功能
# 创建名为“wlan-air-scan”的空口扫描模板,并配置空口扫描信道集合。[AP-wlan-view] air-scan-profile name wlan-air-scan[AP-wlan-air-scan-prof-wlan-air-scan] scan-channel-set country-channel[AP-wlan-air-scan-prof-wlan-air-scan] quit# 创建名为“wlan-radio-2g”的2G射频模板,并引用名为“wlan-air-scan”的空口扫描模板。[AP-wlan-view] radio-2g-profile name wlan-radio-2g[AP-wlan-radio-2g-prof-wlan-radio-2g] air-scan-profile wlan-air-scan[AP-wlan-radio-2g-prof-wlan-radio-2g] quit# 创建名为“wlan-radio-5g”的5G射频模板,并引用名为“wlan-air-scan”的空口扫描模板。[AP-wlan-view] radio-5g-profile name wlan-radio-5g[AP-wlan-radio-5g-prof-wlan-radio-5g] air-scan-profile wlan-air-scan[AP-wlan-radio-5g-prof-wlan-radio-5g] quit# 配置AP组引用射频模板。[AP-wlan-view] ap-group name ap-group1[AP-wlan-ap-group-ap-group1] radio-2g-profile wlan-radio-2g radio 0[AP-wlan-ap-group-ap-group1] radio-5g-profile wlan-radio-5g radio 1[AP-wlan-ap-group-ap-group1] quit
- 配置终端定位功能
# 创建名为“wlan-location”的定位模板,使能终端定位功能,并配置定位信息上报的目的地和端口号。[AP-wlan-view] location-profile name wlan-location[AP-wlan-location-prof-wlan-location] private mu-enable[AP-wlan-location-prof-wlan-location] private server ip-address 10.23.100.2 port 32180[AP-wlan-location-prof-wlan-location] quit# 配置AP组引用定位模板。[AP-wlan-view] ap-group name ap-group1[AP-wlan-ap-group-ap-group1] location-profile wlan-location radio all[AP-wlan-ap-group-ap-group1] quit
- 验证配置结果
WLAN业务配置会自动下发给RU,配置完成后,通过执行命令display vap ssid wlan-net查看如下信息,当“Status”项显示为“ON”时,表示RU对应的射频上的VAP已创建成功。[AP-wlan-view] display vap ssid wlan-netWID : WLAN ID------------------------------------------------------------------------------------AP ID AP nameRfID WIDBSSIDStatusAuth type STA SSID ------------------------------------------------------------------------------------1 area_1 01FCB6-9897-C520 ONWPA2-PSK1 wlan-net1 area_1 11FCB6-9897-C530 ONWPA2-PSK0 wlan-net2 area_2 01FCB6-9897-C9C0 ONWPA2-PSK0 wlan-net2 area_2 11FCB6-9897-C9D0 ONWPA2-PSK0 wlan-net3 area_3 01FCB6-9897-CA40 ONWPA2-PSK0 wlan-net4 area_3 11FCB6-9897-CA50 ONWPA2-PSK0 wlan-net------------------------------------------------------------------------------------Total: 6
配置文件
中心AP的配置文件# sysname AP#vlan batch 100 to 101#dhcp enable#interface Vlanif100 ip address 10.23.100.1 255.255.255.0 dhcp select interface#interface Vlanif101 ip address 10.23.101.1 255.255.255.0 dhcp select interface#interface GigabitEthernet0/0/1 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 101#interface GigabitEthernet0/0/2 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 101#interface GigabitEthernet0/0/3 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 101#interface GigabitEthernet0/0/24 port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 101#management-vlan 100#wlan security-profile name wlan-securitysecurity wpa2 psk pass-phrase %^%#_b"h2cpaO$9bZ-;`-_;CN5)k,_\UP3[!AJE6Vtg3%^%# aes ssid-profile name wlan-ssidssid wlan-net vap-profile name wlan-vapservice-vlan vlan-id 101ssid-profile wlan-ssidsecurity-profile wlan-security location-profile name wlan-locationprivate mu-enableprivate server ip-address 10.23.100.2 port 32180 regulatory-domain-profile name domain1 air-scan-profile name wlan-air-scan radio-2g-profile name wlan-radio-2gair-scan-profile wlan-air-scan radio-5g-profile name wlan-radio-5gair-scan-profile wlan-air-scan ap-group name ap-group1regulatory-domain-profile domain1location-profile wlan-location radio allradio 0 radio-2g-profile wlan-radio-2g vap-profile wlan-vap wlan 1radio 1 radio-5g-profile wlan-radio-5g vap-profile wlan-vap wlan 1 ap-id 1 type-id 55 ap-mac fcb6-9897-c520 ap-sn 21500826402SF4900166ap-name area_1ap-group ap-group1 ap-id 2 type-id 55 ap-mac fcb6-9897-c9c0 ap-sn 21500826402SF4900203ap-name area_2ap-group ap-group1 ap-id 3 type-id 55 ap-mac fcb6-9897-ca40 ap-sn 21500826402SF4900207ap-name area_3ap-group ap-group1#return