配置小型网络WLAN基本业务示例
小型WLAN网络简介
本文介绍的WLAN网络是指利用频率为2.4GHz或5GHz的射频信号作为传输介质的无线局域网,相对于有线网络的铺设成本高,不便于网络调整和扩展、位置固定,移动性差等缺点,WLAN网络以其低廉的铺设成本、便捷的网络调整和扩展、灵活的可移动性获得了越来越广泛的应用。
小型WLAN网络定位为中小型企业包括独立的小型园区网,也包括只在分支机构部署WLAN的场景。由于规模较小,小型WLAN网络通常只需要使用少量的网络设备部署一个简单的WLAN网络,为小范围内的用户提供WLAN网络服务。
配置注意事项
-
WLAN举例通用配置注意事项请参考WLAN通用注意事项,更多部署和配置建议请参考无线网络部署和配置建议。
-
从V200R011C10版本开始,WLAN配置会自动下发,不需要再执行命令commit all提交配置。
-
隧道转发模式下,管理VLAN和业务VLAN不能配置为同一VLAN。直接转发模式下,管理VLAN和业务VLAN建议也不要配置为同一VLAN。
-
数据转发方式为直接转发时,建议在直接连接AP的设备接口上配置端口隔离,如果不配置端口隔离,可能会在VLAN内存在不必要的广播报文,或者导致不同AP间的WLAN用户二层互通的问题。
- 纯组播报文由于协议要求在无线空口没有ACK机制保障,且无线空口链路不稳定,为了纯组播报文能够稳定发送,通常会以低速报文形式发送。如果网络侧有大量异常组播流量涌入,则会造成无线空口拥堵。为了减小大量低速组播报文对无线网络造成的冲击,建议配置组播报文抑制功能。配置前请确认是否有组播业务,如果有,请谨慎配置限速值。
- 业务数据转发方式采用直接转发时,建议在直连AP的交换机接口上配置组播报文抑制。
- 业务数据转发方式采用隧道转发时,建议在AC的流量模板下配置组播报文抑制。
-
适用的产品和版本请参见WLAN AP版本配套和形态速查表。
组网需求
某企业分支机构规模较小,为了保证工作人员可以随时随地的访问公司网络,通过部署小型WLAN网络实现移动办公。
如图1所示,AC通过PoE交换机与AP连接,PoE交换机为AP供电。通过在AC上配置WLAN业务的相关内容,下发给AP生成WLAN网络供用户接入。
数据规划
配置项 | 数据 |
---|---|
DHCP服务器 | AC作为DHCP服务器为STA和AP分配IP地址 |
AP的IP地址池 | 10.23.100.2~10.23.100.254/24 |
STA的IP地址池 | 10.23.101.2~10.23.101.254/24 |
AC的源接口IP地址 | VLANIF100:10.23.100.1/24 |
AP组 |
|
域管理模板 |
|
SSID模板 |
|
安全模板 |
|
VAP模板 |
|
配置思路
采用如下的思路配置小型网络的WLAN基本业务:
- 配置AP、AC、SwitchA和上层网络设备之间实现二层互通。
- 配置AC作为DHCP服务器为STA和AP分配IP地址。
- 配置AP上线。
- 创建AP组,用于将需要进行相同配置的AP都加入到AP组,实现统一配置。
- 配置AC的系统参数,包括国家码、AC与AP之间通信的源接口。
- 配置AP上线的认证方式并离线导入AP,实现AP正常上线。
- 配置WLAN业务参数,实现STA访问WLAN网络功能。
操作步骤
- 在AC上配置NAC模式为统一模式(缺省值,不需配置)。配置SwitchA和AC,使AP与AC之间能够传输CAPWAP报文
# 配置SwitchA连接AP的接口GE0/0/1加入VLAN100(管理VLAN),SwitchA连接AC的接口GE0/0/2加入VLAN100。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd"><HUAWEI> <strong id="ZH-CN_TASK_0177091646__b929982454183204">system-view</strong> [HUAWEI] <strong id="ZH-CN_TASK_0177091646__b1697366065183204">sysname SwitchA</strong> [SwitchA] <strong id="ZH-CN_TASK_0177091646__b917492441183204">vlan batch 100</strong> [SwitchA] <strong id="ZH-CN_TASK_0177091646__b1059380556183204">interface gigabitethernet 0/0/1</strong> [SwitchA-GigabitEthernet0/0/1] <strong id="ZH-CN_TASK_0177091646__b737732446183204">port link-type trunk</strong> [SwitchA-GigabitEthernet0/0/1] <strong id="ZH-CN_TASK_0177091646__b1188760944183204">port trunk pvid vlan 100</strong> [SwitchA-GigabitEthernet0/0/1] <strong id="ZH-CN_TASK_0177091646__b223320800183204">port trunk allow-pass vlan 100</strong> [SwitchA-GigabitEthernet0/0/1] <strong id="ZH-CN_TASK_0177091646__b79140305183204">undo port trunk allow-pass vlan 1</strong> [SwitchA-GigabitEthernet0/0/1] <strong id="ZH-CN_TASK_0177091646__b1413341020183204">stp edged-port enable</strong> [SwitchA-GigabitEthernet0/0/1] <strong id="ZH-CN_TASK_0177091646__b1693413048183204">port-isolate enable</strong> [SwitchA-GigabitEthernet0/0/1] <strong id="ZH-CN_TASK_0177091646__b1596253087183204">quit</strong> [SwitchA] <strong id="ZH-CN_TASK_0177091646__b230750135183204">interface gigabitethernet 0/0/2</strong> [SwitchA-GigabitEthernet0/0/2] <strong id="ZH-CN_TASK_0177091646__b221668445183204">port link-type trunk</strong> [SwitchA-GigabitEthernet0/0/2] <strong id="ZH-CN_TASK_0177091646__b1728073653183204">port trunk allow-pass vlan 100</strong> [SwitchA-GigabitEthernet0/0/2] <strong id="ZH-CN_TASK_0177091646__b755512766183204">undo port trunk allow-pass vlan 1</strong> [SwitchA-GigabitEthernet0/0/2] <strong id="ZH-CN_TASK_0177091646__b2095709416183204">quit</strong></span></span></span>
# 配置AC连接SwitchA的接口GE1/0/1加入VLAN100。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd"><HUAWEI> <strong id="ZH-CN_TASK_0177091646__b196496103183204">system-view</strong> [HUAWEI] <strong id="ZH-CN_TASK_0177091646__b2056359595183204">sysname AC</strong> [AC] <strong id="ZH-CN_TASK_0177091646__b706142097183204">vlan batch 100 101</strong> [AC] <strong id="ZH-CN_TASK_0177091646__b1544387359183204">interface gigabitethernet 1/0/1</strong> [AC-GigabitEthernet1/0/1] <strong id="ZH-CN_TASK_0177091646__b1268430126183204">port link-type trunk</strong> [AC-GigabitEthernet1/0/1] <strong id="ZH-CN_TASK_0177091646__b170488122183204">port trunk allow-pass vlan 100</strong> [AC-GigabitEthernet1/0/1] <strong id="ZH-CN_TASK_0177091646__b1652550665183204">undo port trunk allow-pass vlan 1</strong> [AC-GigabitEthernet1/0/1] <strong id="ZH-CN_TASK_0177091646__b1021543206183204">quit</strong></span></span></span>
- 配置AC与上层网络设备互通
根据实际组网情况在AC上行口配置业务VLAN透传,和上行网络设备互通。
# 配置AC上行接口GE1/0/2加入VLAN101(业务VLAN)。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0177091646__b1106365191183204">interface gigabitethernet 1/0/2</strong> [AC-GigabitEthernet1/0/2] <strong id="ZH-CN_TASK_0177091646__b1725850229183204">port link-type trunk</strong> [AC-GigabitEthernet1/0/2] <strong id="ZH-CN_TASK_0177091646__b1484962644183204">port trunk allow-pass vlan 101</strong> [AC-GigabitEthernet1/0/2] <strong id="ZH-CN_TASK_0177091646__b1082655005183204">undo port trunk allow-pass vlan 1</strong> [AC-GigabitEthernet1/0/2] <strong id="ZH-CN_TASK_0177091646__b181050598183204">quit</strong></span></span></span>
- 配置AC作为DHCP服务器,为STA和AP分配IP地址
# 配置基于接口地址池的DHCP服务器,其中,VLANIF100接口为AP提供IP地址,VLANIF101为STA提供IP地址。
DNS服务器地址请根据实际需要配置。常用配置方法如下:- 接口地址池场景,需要在VLANIF接口视图下执行命令dhcp server dns-list ip-address &<1-8>。
- 全局地址池场景,需要在IP地址池视图下执行命令dns-list ip-address &<1-8>。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0177091646__b1640778002183204">dhcp enable</strong> //使能DHCP功能 [AC] <strong id="ZH-CN_TASK_0177091646__b564680392183204">interface vlanif 100</strong> [AC-Vlanif100] <strong id="ZH-CN_TASK_0177091646__b1147567293183204">ip address 10.23.100.1 24</strong> [AC-Vlanif100] <strong id="ZH-CN_TASK_0177091646__b360234151183204">dhcp select interface</strong> //配置基于接口的地址池 [AC-Vlanif100] <strong id="ZH-CN_TASK_0177091646__b1268197400183204">quit</strong> [AC] <strong id="ZH-CN_TASK_0177091646__b72807065183204">interface vlanif 101</strong> [AC-Vlanif101] <strong id="ZH-CN_TASK_0177091646__b1733877710183204">ip address 10.23.101.1 24</strong> [AC-Vlanif101] <strong id="ZH-CN_TASK_0177091646__b1527583255183204">dhcp select interface</strong> [AC-Vlanif101] <strong id="ZH-CN_TASK_0177091646__b1232682676183204">quit</strong></span></span></span>
- 配置AP上线
# 创建AP组,用于将相同配置的AP都加入同一AP组中。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0177091646__b1546100065183204">wlan</strong> [AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1632274006183204">ap-group name ap-group1</strong> [AC-wlan-ap-group-ap-group1] <strong id="ZH-CN_TASK_0177091646__b460007316183204">quit</strong></span></span></span>
# 创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1368109955183204">regulatory-domain-profile name domain1</strong> [AC-wlan-regulate-domain-domain1] <strong id="ZH-CN_TASK_0177091646__b432582983183204">country-code cn</strong> [AC-wlan-regulate-domain-domain1] <strong id="ZH-CN_TASK_0177091646__b1727490310183204">quit</strong> [AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b593452446183204">ap-group name ap-group1</strong> [AC-wlan-ap-group-ap-group1] <strong id="ZH-CN_TASK_0177091646__b1432931136183204">regulatory-domain-profile domain1</strong> Warning: This configuration change will clear the channel and power configurations of radios, and may restart APs. Continue?[Y/N]:<strong id="ZH-CN_TASK_0177091646__zh-cn_task_0175818418_b17491131153716">y</strong> [AC-wlan-ap-group-ap-group1] <strong id="ZH-CN_TASK_0177091646__b1564659466183204">quit</strong> [AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b2002396725183204">quit</strong></span></span></span>
# 配置AC的源接口。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0177091646__b1664673755183204">capwap source interface vlanif 100</strong></span></span></span>
# 在AC上离线导入AP,并将AP加入AP组“ap-group1”中。假设AP的MAC地址为00e0-fc11-1111,并且根据AP的部署位置为AP配置名称,便于从名称上就能够了解AP的部署位置。例如MAC地址为00e0-fc11-1111的AP部署在1号区域,命名此AP为area_1。ap auth-mode命令缺省情况下为MAC认证,如果之前没有修改其缺省配置,可以不用执行ap auth-mode mac-auth。
举例中使用的AP具有射频0和射频1两个射频。射频0为2.4GHz射频,射频1为5GHz射频。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC] <strong id="ZH-CN_TASK_0177091646__b1122328914183204">wlan</strong> [AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1442618822183204">ap auth-mode mac-auth</strong> [AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1722130033183204">ap-id 0 ap-mac 00e0-fc11-1111</strong> [AC-wlan-ap-0] <strong id="ZH-CN_TASK_0177091646__b959298563183204">ap-name area_1</strong> [AC-wlan-ap-0] <strong id="ZH-CN_TASK_0177091646__b1668267046183204">ap-group ap-group1</strong> 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]:<strong id="ZH-CN_TASK_0177091646__zh-cn_task_0175818418_b1651706244190906">y</strong> [AC-wlan-ap-0] <strong id="ZH-CN_TASK_0177091646__b779923605183204">quit</strong></span></span></span>
# 将AP上电后,当执行命令display ap all查看到AP的“State”字段为“nor”时,表示AP正常上线。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b762693767183204">display ap all</strong></span></span></span>
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">Total AP information: nor : normal [1] Extrainfo : Extra information P : insufficient power supply -------------------------------------------------------------------------------------------------- ID MAC Name Group IP Type State STA Uptime ExtraInfo -------------------------------------------------------------------------------------------------- 0 00e0-fc11-1111 area_1 ap-group1 10.23.100.254 AP5030DN <strong id="ZH-CN_TASK_0177091646__b16655192243311">nor</strong> 0 10S - -------------------------------------------------------------------------------------------------- Total: 1</span></span></span>
- 配置WLAN业务参数 # 创建名为“wlan-security”的安全模板,并配置安全策略。
举例中以配置WPA2+PSK+AES的安全策略为例,密码为“YsHsjx_202206”,实际配置中请根据实际情况,配置符合实际要求的安全策略。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b253915014183204">security-profile name wlan-security</strong> [AC-wlan-sec-prof-wlan-security] <strong id="ZH-CN_TASK_0177091646__b2069371877183204">security wpa2 psk pass-phrase YsHsjx_202206 aes</strong> //配置安全策略为WPA2+PSK+AES [AC-wlan-sec-prof-wlan-security] <strong id="ZH-CN_TASK_0177091646__b855027190183204">quit</strong></span></span></span>
# 创建名为“wlan-ssid”的SSID模板,并配置SSID名称为“wlan-net”。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1876542772183204">ssid-profile name wlan-ssid</strong> [AC-wlan-ssid-prof-wlan-ssid] <strong id="ZH-CN_TASK_0177091646__b1824976221183204">ssid wlan-net</strong> //配置SSID名称为wlan-net [AC-wlan-ssid-prof-wlan-ssid] <strong id="ZH-CN_TASK_0177091646__b898234836183204">quit</strong></span></span></span>
# 创建名为“wlan-vap”的VAP模板,配置业务数据转发模式、业务VLAN,并且引用安全模板和SSID模板。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b205673884183204">vap-profile name wlan-vap</strong> [AC-wlan-vap-prof-wlan-vap] <strong id="ZH-CN_TASK_0177091646__b830912725183204">forward-mode tunnel</strong> //配置业务转发模式为隧道转发 [AC-wlan-vap-prof-wlan-vap] <strong id="ZH-CN_TASK_0177091646__b377219022183204">service-vlan vlan-id 101</strong> //缺省情况下VLAN ID为1,修改VLAN ID为101 [AC-wlan-vap-prof-wlan-vap] <strong id="ZH-CN_TASK_0177091646__b267572194183204">security-profile wlan-security</strong> [AC-wlan-vap-prof-wlan-vap] <strong id="ZH-CN_TASK_0177091646__b1842115631183204">ssid-profile wlan-ssid</strong> [AC-wlan-vap-prof-wlan-vap] <strong id="ZH-CN_TASK_0177091646__b1894643085183204">quit</strong></span></span></span>
# 配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板“wlan-vap”的配置。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1917517408183204">ap-group name ap-group1</strong> [AC-wlan-ap-group-ap-group1] <strong id="ZH-CN_TASK_0177091646__b1903583158183204">vap-profile wlan-vap wlan 1 radio 0</strong> [AC-wlan-ap-group-ap-group1] <strong id="ZH-CN_TASK_0177091646__b914030979183204">vap-profile wlan-vap wlan 1 radio 1</strong> [AC-wlan-ap-group-ap-group1] <strong id="ZH-CN_TASK_0177091646__b823638683183204">quit</strong></span></span></span>
- 提交配置
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1328622543183204">commit all</strong> Warning: Committing configuration may cause service interruption, continue?[Y/N]:<strong id="ZH-CN_TASK_0177091646__b1458354831183204">y</strong></span></span></span>
- 验证配置结果
配置完成后,通过执行命令display vap ssid wlan-net查看如下信息,当“Status”项显示为“ON”时,表示AP对应的射频上的VAP已创建成功。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1868102045183204">display vap ssid wlan-net</strong> WID : WLAN ID -------------------------------------------------------------------------------- AP ID AP name RfID WID BSSID Status Auth type STA SSID -------------------------------------------------------------------------------- 0 area_1 0 1 00E0-FC11-1111 <strong id="ZH-CN_TASK_0177091646__b1543340295183204">ON</strong> WPA2-PSK 0 wlan-net 0 area_1 1 1 00E0-FC11-1112 <strong id="ZH-CN_TASK_0177091646__b1846948955183204">ON</strong> WPA2-PSK 0 wlan-net ------------------------------------------------------------------------------- Total: 2</span></span></span>
STA搜索到名为“wlan-net”的无线网络,输入密码“YsHsjx_202206”并正常关联后,在AC上执行display station ssid wlan-net命令,可以查看到用户已经接入到无线网络“wlan-net”中。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0177091646__b1577903060183204">display station ssid wlan-net</strong> 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 --------------------------------------------------------------------------------- 00e0-fc11-1115 0 area_1 1/1 5G 11n 46/59 -68 101 10.23.101.254 --------------------------------------------------------------------------------- Total: 1 2.4G: 0 5G: 1</span></span></span>
配置文件
-
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd"># sysname SwitchA # vlan batch 100 # interface GigabitEthernet0/0/1port link-type trunkport trunk pvid vlan 100undo port trunk allow-pass vlan 1port trunk allow-pass vlan 100stp edged-port enableport-isolate enable group 1 # interface GigabitEthernet0/0/2port link-type trunkundo port trunk allow-pass vlan 1port trunk allow-pass vlan 100 # return</span></span></span>
-
AC的配置文件
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd"># sysname AC # vlan batch 100 to 101 # dhcp enable # interface Vlanif100ip address 10.23.100.1 255.255.255.0dhcp select interface # interface Vlanif101ip address 10.23.101.1 255.255.255.0dhcp select interface # interface GigabitEthernet1/0/1port link-type trunkundo port trunk allow-pass vlan 1port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/2port link-type trunkundo port trunk allow-pass vlan 1port trunk allow-pass vlan 101 # capwap source interface vlanif100 # wlansecurity-profile name wlan-securitysecurity wpa2 psk pass-phrase %^%#m"tz0f>~7.[`^6RWdzwCy16hJj/Mc!,}s`X*B]}A%^%# aesssid-profile name wlan-ssidssid wlan-netvap-profile name wlan-vapforward-mode tunnelservice-vlan vlan-id 101ssid-profile wlan-ssidsecurity-profile wlan-securityregulatory-domain-profile name domain1ap-group name ap-group1regulatory-domain-profile domain1radio 0vap-profile wlan-vap wlan 1radio 1vap-profile wlan-vap wlan 1ap-id 0 type-id 35 ap-mac 00e0-fc11-1111 ap-sn 210235554710CB000042ap-name area_1ap-group ap-group1 # return</span></span></span>