配置蓝牙终端定位示例
组网图形
图1 配置蓝牙终端定位示例组网图
操作步骤
- 配置AC和定位服务器通信 # 配置Router,创建VLAN102,加入接口GE1/0/0,配置VLANIF102接口和AC互通。
<span style="color:#333333"><span style="background-color:#dddddd"><Router> <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b191016524190923">system-view</strong> [Router] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b347023258190923">vlan 102</strong> [Router-vlan102] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1439372694190923">quit</strong> [Router] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b447971466190923">interface gigabitethernet 1/0/0</strong> [Router-GigabitEthernet1/0/0] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1935121937190923">port trunk allow-pass vlan 102</strong> [Router-GigabitEthernet1/0/0] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1489412603190923">quit</strong> [Router] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1656049436190923">interface vlanif 102</strong> [Router-Vlanif102] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1416658579190923">ip address 10.23.102.1 24</strong></span></span>
# 配置AC,创建VLAN102,加入接口GE0/0/2,配置VLANIF102接口和Router互通。<span style="color:#333333"><span style="background-color:#dddddd"><AC> <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b26419010190923">system-view</strong> [AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1209299162190923">vlan 102</strong> [AC-vlan102] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b2004018172190923">quit</strong> [AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1156981544190923">interface gigabitethernet 0/0/2</strong> [AC-GigabitEthernet0/0/2] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b704003148190923">port trunk allow-pass vlan 102</strong> [AC-GigabitEthernet0/0/2] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1011159129190923">quit</strong> [AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b984608724190923">interface vlanif 102</strong> [AC-Vlanif102] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b287892828190923">ip address 10.23.102.2 24</strong> [AC-Vlanif102] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b125798053190923">quit</strong></span></span>
# 在AC上创建一条到定位服务器的静态路由,下一跳指向Router。<span style="color:#333333"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b701234983190923">ip route-static 10.23.103.1 32 10.23.102.1</strong></span></span>
# 在AC上执行ping操作,目的地址是定位服务器,可以ping通表示网络正常互通。<span style="color:#333333"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b649554249190923">ping 10.23.103.1</strong>PING 10.23.102.2: 56 data bytes, press CTRL_C to break <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912517_b1285908568190923"> Reply from 10.23.103.1: bytes=56 Sequence=1 ttl=255 time=1 ms</strong></span></span>
- 配置AC设备与定位服务器通信
# 配置AC的SNMP协议版本。
<span style="color:#333333"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912529_b1376051217190923">snmp-agent sys-info version v2c</strong></span></span>
# 配置读团体名为public123,写团体名为private123。
<span style="color:#333333"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912529_b1761148086190923">snmp-agent community read public123</strong> [AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_zh-cn_task_0176912529_b2051267976190923">snmp-agent community write private123</strong></span></span>
- 在AC上查看WLAN网络的基本配置
检查项
命令
数据
查看AP所属的AP组
display ap all
AP组:ap-group1
AP name:AP1,AP2,AP3,...
- 如果AP组和单个AP下都有配置,则单个AP下的配置优先生效。
- 对于新创建的模板,用户配置完成后,需要将此模板引用到AP或者AP组,才能最终生效。
- 配置蓝牙终端定位功能 # 创建名为“wlan-ble”的BLE模板,开启蓝牙监控功能,可以接收周边的蓝牙基站信息,配置蓝牙Tag定位信息上报的目的地和端口号。
<span style="color:#333333"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b100877862190923">wlan</strong> [AC-wlan-view] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b899486623190923">ble-profile name wlan-ble</strong> [AC-wlan-ble-prof-wlan-ble] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b1249915766190923">sniffer enable ibeacon-mode</strong> [AC-wlan-ble-prof-wlan-ble] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b355392715229">report enable</strong> [AC-wlan-ble-prof-wlan-ble] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b91661713523">report-to-server ip-address 10.23.102.1 port 10001 via-ac ac-port 32180</strong> [AC-wlan-ble-prof-wlan-ble] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b1395296037190923">quit</strong></span></span>
# 将AP覆盖范围内的BLE基站添加到监控列表中。<span style="color:#333333"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b1216030726190923">ble monitoring-list mac 1234-1234-1000 to 1234-1234-1002</strong></span></span>
# 配置AP组引用BLE模板。<span style="color:#333333"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b1738802338190923">ap-group name ap-group1</strong> [AC-wlan-ap-group-ap-group1] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b1799520574190923">ble-profile wlan-ble</strong> [AC-wlan-ap-group-ap-group1] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b244514921190923">quit</strong></span></span>
- 配置定位服务器
联系厂商获取相应文档后参考操作,本文档不描述具体操作步骤。
- 验证配置结果
# AP获取到BLE基站信息后,通过执行命令display wlan ble site-info { all | mac-address mac-address },可以查看AP获取到的BLE基站信息。
<span style="color:#333333"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0180396989__zh-cn_task_0176912533_b987943675190923">display wlan ble site-info all</strong> ------------------------------------------------------------------------------------------------------------------------------------ --------------- Index MAC Host AP ID Host AP name RSSI Power Type DetachedFlag Aging-Timeout(m) Broadcast count Advertisement d ata ------------------------------------------------------------------------------------------------------------------------------------ --------------- 0 0000-0101-0202 0 area_1 -30 50% ibeacon N 57 10 02-02-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-fa 1 0000-0101-0303 0 area_1 -31 51% ibeacon N 57 12 01-02-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-fa 2 0000-0101-0505 0 area_1 -33 55% ibeacon N 57 22 03-02-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-fa ------------------------------------------------------------------------------------------------------------------------------------ --------------- Total: 3</span></span>
# 用户的蓝牙终端接入WLAN网络并开启蓝牙功能后,安装第三方的APP,APP上可以显示自己在地图上的位置,同时收到附近的导购信息。
配置文件
-
<span style="color:#333333"><span style="background-color:#dddddd"># vlan batch 100 to 102 # interface Vlanif102ip address 10.23.102.2 255.255.255.0 # interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 101 to 102 # ip route-static 10.23.103.1 255.255.255.255 10.23.102.1 #snmp-agent local-engineid 800007DB030200000000E0snmp-agent community read %^%#sP6,%Hno.$v[Lf#fiyP(eKm4)vNP*Q"mA~'$XjP4r}XXU4f%'&y>D`/1.5\Clr]I5mUJ46!a7'9p#*o2%^%#snmp-agent community write %^%#/.U;L9&iwS.dF15y]J"N\XU='K:YkWj/O.)=6W$3q{M1J4.<X"\h{a:p)c\;TBL\=qn=u+7YR~L/#`V>%^%#snmp-agent sys-info version v2csnmp-agent # wlanble-profile name wlan-blesniffer enable ibeacon-modereport-to-server ip-address 10.23.102.1 port 10001 via-ac ac-port 32180report enableble monitoring-list mac 1234-1234-1000ble monitoring-list mac 1234-1234-1001ble monitoring-list mac 1234-1234-1002ap-group name ap-group1ble-profile wlan-ble # return</span></span>