当前位置:   article > 正文

华为配置终端定位基本实验配置

华为配置终端定位基本实验配置

配置终端定位基本示例

组网图形

图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组

  • 名称:ap-group1

  • 引用模板:域管理模板domain1、VAP模板wlan-vap、2G射频模板wlan-radio-2g、5G射频模板wlan-radio-5g和定位模板wlan-location

域管理模板

  • 名称:domain1
  • 国家码:CN

SSID模板

  • 名称:wlan-ssid

  • SSID名称:wlan-net

安全模板

  • 名称:wlan-security

  • 安全策略:WPA2+PSK+AES

  • 密码:a1234567

VAP模板

  • 名称:wlan-vap

  • 业务VLAN:VLAN101

  • 引用模板:SSID模板wlan-ssid、安全模板wlan-security

空口扫描模板

  • 名称:wlan-air-scan

  • 探测信道集合:国家码信道

2G射频模板

  • 名称:wlan-radio-2g

  • 引用模板:空口扫描模板wlan-air-scan

5G射频模板

  • 名称:wlan-radio-5g

  • 引用模板:空口扫描模板wlan-air-scan

定位模板

  • 名称:wlan-location

  • AP上报信道扫描信息的目的IP/端口号:10.23.100.2/32180

配置思路

采用如下的思路配置WLAN终端定位业务:

  • 配置WLAN基本业务,保证用户能够通过WLAN网络接入公司内部网络。
  • 配置终端定位功能,保证RU可以接收定位服务器的配置信息并将收集到的终端信息发送给定位服务器。

配置注意事项

建议在与RU直连的设备接口上配置端口隔离,如果不配置端口隔离,可能会在VLAN内形成大量不必要的广播报文,导致网络阻塞,影响用户体验。

操作步骤
  1. 配置定位服务器(略)。
  2. 配置中心AP,使AP与中心AP之间能够传输CAPWAP报文

    1. # 配置中心AP连接AP的接口GigabitEthernet0/0/1GigabitEthernet0/0/3加入VLAN100(管理VLAN)。
    2. <HUAWEI> system-view
    3. [HUAWEI] sysname AP
    4. [AP] vlan batch 100 101
    5. [AP] interface gigabitethernet 0/0/1
    6. [AP-GigabitEthernet0/0/1] port link-type trunk
    7. [AP-GigabitEthernet0/0/1] port trunk pvid vlan 100
    8. [AP-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 101
    9. [AP-GigabitEthernet0/0/1] quit
    10. [AP] interface gigabitethernet 0/0/2
    11. [AP-GigabitEthernet0/0/2] port link-type trunk
    12. [AP-GigabitEthernet0/0/2] port trunk pvid vlan 100
    13. [AP-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 101
    14. [AP-GigabitEthernet0/0/2] quit
    15. [AP] interface gigabitethernet 0/0/3
    16. [AP-GigabitEthernet0/0/3] port link-type trunk
    17. [AP-GigabitEthernet0/0/3] port trunk pvid vlan 100
    18. [AP-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 101
    19. [AP-GigabitEthernet0/0/3] quit

  3. 配置中心AP与定位服务器互通

    1. # 配置中心AP连接定位服务器的接口GE0/0/24加入VLAN100
    2. [AP] interface gigabitethernet 0/0/24
    3. [AP-GigabitEthernet0/0/24] port link-type trunk
    4. [AP-GigabitEthernet0/0/24] port trunk pvid vlan 100
    5. [AP-GigabitEthernet0/0/24] port trunk allow-pass vlan 100 101
    6. [AP-GigabitEthernet0/0/24] quit

  4. 配置中心AP作为DHCP服务器,为STA和RU分配IP地址

    1. # 配置基于接口地址池的DHCP服务器,其中,VLANIF100接口为RU提供IP地址,VLANIF101STA提供IP地址。
    2. [AP] dhcp enable
    3. [AP] interface vlanif 100
    4. [AP-Vlanif100] ip address 10.23.100.1 24
    5. [AP-Vlanif100] dhcp select interface
    6. [AP-Vlanif100] quit
    7. [AP] interface vlanif 101
    8. [AP-Vlanif101] ip address 10.23.101.1 24
    9. [AP-Vlanif101] dhcp select interface
    10. [AP-Vlanif101] quit

  5. 配置RU上线

    1. # 创建AP组,用于将相同配置的RU都加入同一AP组中。
    2. [AP] wlan
    3. [AP-wlan-view] ap-group name ap-group1
    4. [AP-wlan-ap-group-ap-group1] quit
    5. # 创建域管理模板,在域管理模板下配置中心AP的国家码并在AP组下引用域管理模板。
    6. [AP-wlan-view] regulatory-domain-profile name domain1
    7. [AP-wlan-regulatory-domain-prof-domain1] country-code cn
    8. [AP-wlan-regulatory-domain-prof-domain1] quit
    9. [AP-wlan-view] ap-group name ap-group1
    10. [AP-wlan-ap-group-ap-group1] regulatory-domain-profile domain1
    11. 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
    12. [AP-wlan-ap-group-ap-group1] quit
    13. [AP-wlan-view] quit
    14. # 配置中心AP的管理VLAN
    15. [AP] management-vlan 100
    16. # 在中心AP上离线导入RU,并将RU加入AP组“ap-group1”中。根据RU的部署位置为RU配置名称,便于从名称上就能够了解RU的部署位置。例如MAC地址为fcb6-9897-c520的RU部署在1号区域,命名此RU为area_1。​​​​​​​
    17. ap auth-mode命令缺省情况下为MAC认证,如果之前没有修改其缺省配置,可以不用执行ap auth-mode mac-auth。
    18. 举例中使用的RUR240D,具有射频0和射频1两个射频。
    19. [AP] wlan
    20. [AP-wlan-view] ap auth-mode mac-auth
    21. [AP-wlan-view] ap-id 1 ap-mac fcb6-9897-c520
    22. [AP-wlan-ap-1] ap-name area_1
    23. [AP-wlan-ap-1] ap-group ap-group1
    24. 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
    25. [AP-wlan-ap-1] quit
    26. [AP-wlan-view] ap-id 2 ap-mac fcb6-9897-c9c0
    27. [AP-wlan-ap-2] ap-name area_2
    28. [AP-wlan-ap-2] ap-group ap-group1
    29. 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
    30. [AP-wlan-ap-2] quit
    31. [AP-wlan-view] ap-id 3 ap-mac fcb6-9897-ca40
    32. [AP-wlan-ap-3] ap-name area_3
    33. [AP-wlan-ap-3] ap-group ap-group1
    34. 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
    35. [AP-wlan-ap-3] quit
    36. # 将RU上电后,当执行命令display ap all查看到RU的“State”字段为“nor”时,表示RU正常上线。
    37. [AP-wlan-view] display ap all
    38. Total AP information:
    39. nor : normal [3]
    40. ----------------------------------------------------------------------------------------
    41. ID MAC Name Group IP Type State STA Uptime
    42. ----------------------------------------------------------------------------------------
    43. 1 fcb6-9897-c520 area_1 ap-group1 10.23.100.254 R240D nor 0 25S
    44. 2 fcb6-9897-c9c0 area_2 ap-group1 10.23.100.253 R240D nor 0 20S
    45. 3 fcb6-9897-ca40 area_3 ap-group1 10.23.100.252 R240D nor 0 10S
    46. ----------------------------------------------------------------------------------------
    47. Total: 3

  6. 配置WLAN业务参数

    1. # 创建名为“wlan-security”的安全模板,并配置安全策略。
    2. 举例中以配置WPA2+PSK+AES的安全策略为例,密码为“a1234567”,实际配置中请根据实际情况,配置符合实际要求的安全策略。
    3. [AP-wlan-view] security-profile name wlan-security
    4. [AP-wlan-sec-prof-wlan-security] security wpa2 psk pass-phrase a1234567 aes
    5. [AP-wlan-sec-prof-wlan-security] quit
    6. # 创建名为“wlan-ssid”的SSID模板,并配置SSID名称为“wlan-net”。
    7. [AP-wlan-view] ssid-profile name wlan-ssid
    8. [AP-wlan-ssid-prof-wlan-ssid] ssid wlan-net
    9. [AP-wlan-ssid-prof-wlan-ssid] quit
    10. # 创建名为“wlan-vap”的VAP模板,配置业务VLAN,并且引用安全模板和SSID模板。
    11. [AP-wlan-view] vap-profile name wlan-vap
    12. [AP-wlan-vap-prof-wlan-vap] service-vlan vlan-id 101
    13. [AP-wlan-vap-prof-wlan-vap] security-profile wlan-security
    14. [AP-wlan-vap-prof-wlan-vap] ssid-profile wlan-ssid
    15. [AP-wlan-vap-prof-wlan-vap] quit
    16. # 配置AP组引用VAP模板,RU上射频0和射频1都使用VAP模板“wlan-vap”的配置。
    17. [AP-wlan-view] ap-group name ap-group1
    18. [AP-wlan-ap-group-ap-group1] vap-profile wlan-vap wlan 1 radio 0
    19. [AP-wlan-ap-group-ap-group1] vap-profile wlan-vap wlan 1 radio 1
    20. [AP-wlan-ap-group-ap-group1] quit

  7. 配置WLAN空口扫描功能

    1. # 创建名为“wlan-air-scan”的空口扫描模板,并配置空口扫描信道集合。
    2. [AP-wlan-view] air-scan-profile name wlan-air-scan
    3. [AP-wlan-air-scan-prof-wlan-air-scan] scan-channel-set country-channel
    4. [AP-wlan-air-scan-prof-wlan-air-scan] quit
    5. # 创建名为“wlan-radio-2g”的2G射频模板,并引用名为“wlan-air-scan”的空口扫描模板。
    6. [AP-wlan-view] radio-2g-profile name wlan-radio-2g
    7. [AP-wlan-radio-2g-prof-wlan-radio-2g] air-scan-profile wlan-air-scan
    8. [AP-wlan-radio-2g-prof-wlan-radio-2g] quit
    9. # 创建名为“wlan-radio-5g”的5G射频模板,并引用名为“wlan-air-scan”的空口扫描模板。
    10. [AP-wlan-view] radio-5g-profile name wlan-radio-5g
    11. [AP-wlan-radio-5g-prof-wlan-radio-5g] air-scan-profile wlan-air-scan
    12. [AP-wlan-radio-5g-prof-wlan-radio-5g] quit
    13. # 配置AP组引用射频模板。
    14. [AP-wlan-view] ap-group name ap-group1
    15. [AP-wlan-ap-group-ap-group1] radio-2g-profile wlan-radio-2g radio 0
    16. [AP-wlan-ap-group-ap-group1] radio-5g-profile wlan-radio-5g radio 1
    17. [AP-wlan-ap-group-ap-group1] quit

  8. 配置终端定位功能

    1. # 创建名为“wlan-location”的定位模板,使能终端定位功能,并配置定位信息上报的目的地和端口号。
    2. [AP-wlan-view] location-profile name wlan-location
    3. [AP-wlan-location-prof-wlan-location] private mu-enable
    4. [AP-wlan-location-prof-wlan-location] private server ip-address 10.23.100.2 port 32180
    5. [AP-wlan-location-prof-wlan-location] quit
    6. # 配置AP组引用定位模板。
    7. [AP-wlan-view] ap-group name ap-group1
    8. [AP-wlan-ap-group-ap-group1] location-profile wlan-location radio all
    9. [AP-wlan-ap-group-ap-group1] quit

  9. 验证配置结果

    1. WLAN业务配置会自动下发给RU,配置完成后,通过执行命令display vap ssid wlan-net查看如下信息,当“Status”项显示为“ON”时,表示RU对应的射频上的VAP已创建成功。
    2. [AP-wlan-view] display vap ssid wlan-net
    3. WID : WLAN ID
    4. ------------------------------------------------------------------------------------
    5. AP ID AP name RfID WID BSSID Status Auth type STA SSID
    6. ------------------------------------------------------------------------------------
    7. 1 area_1 0 1 FCB6-9897-C520 ON WPA2-PSK 1 wlan-net
    8. 1 area_1 1 1 FCB6-9897-C530 ON WPA2-PSK 0 wlan-net
    9. 2 area_2 0 1 FCB6-9897-C9C0 ON WPA2-PSK 0 wlan-net
    10. 2 area_2 1 1 FCB6-9897-C9D0 ON WPA2-PSK 0 wlan-net
    11. 3 area_3 0 1 FCB6-9897-CA40 ON WPA2-PSK 0 wlan-net
    12. 4 area_3 1 1 FCB6-9897-CA50 ON WPA2-PSK 0 wlan-net
    13. ------------------------------------------------------------------------------------
    14. Total: 6

配置文件
  1. 中心AP的配置文件
  2. #
  3. sysname AP
  4. #
  5. vlan batch 100 to 101
  6. #
  7. dhcp enable
  8. #
  9. interface Vlanif100
  10. ip address 10.23.100.1 255.255.255.0
  11. dhcp select interface
  12. #
  13. interface Vlanif101
  14. ip address 10.23.101.1 255.255.255.0
  15. dhcp select interface
  16. #
  17. interface GigabitEthernet0/0/1
  18. port link-type trunk
  19. port trunk pvid vlan 100
  20. port trunk allow-pass vlan 100 101
  21. #
  22. interface GigabitEthernet0/0/2
  23. port link-type trunk
  24. port trunk pvid vlan 100
  25. port trunk allow-pass vlan 100 101
  26. #
  27. interface GigabitEthernet0/0/3
  28. port link-type trunk
  29. port trunk pvid vlan 100
  30. port trunk allow-pass vlan 100 101
  31. #
  32. interface GigabitEthernet0/0/24
  33. port link-type trunk
  34. port trunk pvid vlan 100
  35. port trunk allow-pass vlan 100 101
  36. #
  37. management-vlan 100
  38. #
  39. wlan
  40. security-profile name wlan-security
  41. security wpa2 psk pass-phrase %^%#_b"h2cpaO$9bZ-;`-_;CN5)k,_\UP3[!AJE6Vtg3%^%# aes
  42. ssid-profile name wlan-ssid
  43. ssid wlan-net
  44. vap-profile name wlan-vap
  45. service-vlan vlan-id 101
  46. ssid-profile wlan-ssid
  47. security-profile wlan-security
  48. location-profile name wlan-location
  49. private mu-enable
  50. private server ip-address 10.23.100.2 port 32180
  51. regulatory-domain-profile name domain1
  52. air-scan-profile name wlan-air-scan
  53. radio-2g-profile name wlan-radio-2g
  54. air-scan-profile wlan-air-scan
  55. radio-5g-profile name wlan-radio-5g
  56. air-scan-profile wlan-air-scan
  57. ap-group name ap-group1
  58. regulatory-domain-profile domain1
  59. location-profile wlan-location radio all
  60. radio 0
  61. radio-2g-profile wlan-radio-2g
  62. vap-profile wlan-vap wlan 1
  63. radio 1
  64. radio-5g-profile wlan-radio-5g
  65. vap-profile wlan-vap wlan 1
  66. ap-id 1 type-id 55 ap-mac fcb6-9897-c520 ap-sn 21500826402SF4900166
  67. ap-name area_1
  68. ap-group ap-group1
  69. ap-id 2 type-id 55 ap-mac fcb6-9897-c9c0 ap-sn 21500826402SF4900203
  70. ap-name area_2
  71. ap-group ap-group1
  72. ap-id 3 type-id 55 ap-mac fcb6-9897-ca40 ap-sn 21500826402SF4900207
  73. ap-name area_3
  74. ap-group ap-group1
  75. #
  76. return

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/276199
推荐阅读
相关标签
  

闽ICP备14008679号