一、配置任务——站点到站点IPSec VP
1、在AC上配置trunk、创建VLAN并配置默认路由
[AC6005]int g0/0/1
[AC6005-GigabitEthernet0/0/1]port link-type trunk
[AC6005-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[AC6005-GigabitEthernet0/0/1]vlan batch 10 20
[AC6005]int vlanif 10
[AC6005-Vlanif10]ip address 192.168.10.150 24
[AC6005]ip route-static 0.0.0.0 0 192.168.10.1
以上命令的作用是让AC连接交换机的接口封装Trunk(用户承载管理,业务VLAN),并且创建VLAN,设置接口管理地址,配置默认路由。
2、在交换机S5700上完成基本配置
[Huawei]sysname S5700
[S5700]interface GigabitEthernet 0/0/1
[S5700-GigabitEthernet0/0/1]port link-type trunk
[S5700-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[S5700-GigabitEthernet0/0/1]quit
[S5700]vlan batch 10 20
[S5700]interface vlanif 10
[S5700-Vlanif10]ip address 192.168.10.1 24
[S5700-Vlanif10]interface vlanif 20
[S5700-Vlanif20]ip address 192.168.20.1 24
[S5700-Vlanif20]quit
[S5700]interface GigabitEthernet 0/0/2
[S5700-GigabitEthernet0/0/2]port link-type trunk
[S5700-GigabitEthernet0/0/2]port trunk pvid vlan 10
[S5700-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
以上命令的作用将交换机连接AC的接口配置为了trunk接口,同时还创建了两个SVI。此外,我们还在连接AP的接口上放行了VLAN 10和VLAN 20。
3、在交换机上配置DHCP服务
[S5700]dhcp enable
[S5700]interface vlanif 10
[S5700-Vlanif10]dhcp select interface
[S5700-Vlanif10]quit
[S5700]interface vlanif 20
[S5700-Vlanif20]dhcp select interface
接口视图命令dhcp select interface的作用是让交换机接口IP地址和子网掩码来为DHCP客户端提供IP地址信息。因此,经过上面的操作,我们已经在交换机上开启了DHCP服务。
二、配置任务——AP注册AC
1、在AC上创建AP group
[AC6005]wlan
[AC6005-wlan-view]ap-group name A
管理员进入了WLAN视图,并使用WLAN视图命令ap-group name group-name,创建了一个名为A的AP组。
注释:AC上默认即包含ap group:default,所以也可以不创建AP group。
2、配置AC系统参数和源接口
a. 配置域管理模版domain-guest
[AC6005-wlan-view]regulatory-domain-profile name A
[AC6005-wlan-regulate-domain-A]country-code
在上面的配置中,管理员在WLAN视图下使用命令regulatory-domain-profile name profile-name创建了域管理模版,并进入了该模版视图。在域管理模版中,管理员可以设置国家码、优化信道和带宽等参数。在上面的配置中,管理员将国家码配置为了中国(cn)。
b. 在AP组中应用域管理模版domain-guest
[AC6005-wlan-view]ap-group name A
[AC6005-wlan-ap-group-A]regulatory-domain-profile A
Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continue?[Y/N]:Y
在更改AP组中应用的域管理模版(默认default group 国家代码为CN)。
c. 设置AC的源接口:
[AC6005]capwap source interface vlanif10
3、导入AP
a. 配置AC,使AP不执行认证
[AC6005]wlan
[AC6005-wlan-view]ap auth-mode no-auth
Warning: It is insecure to configure none authentication mode.
[AC6005-wlan-view]ap-id 0
[AC6005-wlan-ap-0]ap-group A
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configurations of the radio, Whether to continue? [Y/N]:Y
Info: This operation may take a few seconds. Please wait for a moment.. done.
命令ap-auth-mode no-auth的作用是将MAC地址认证方式设置为不执行认证。除此之外,管理员还可以将其设置为MAC认证方式(mac-auth)或序列号认证方式(sn-auth)。在默认情况下,AP采用的是认证方式是MAC认证。
b. 在AC上查看AP状态:
[AC6005]dis ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor : normal [1]
--------------------------------------------------------------------------------
-------------------
ID MAC Name Group IP Type State ST
A Uptime
--------------------------------------------------------------------------------
-------------------
0 00e0-fc6c-1800 00e0-fc6c-1800 A 192.168.10.254 AP3030DN nor 0
1M:1S
--------------------------------------------------------------------------------
-------------------
Total: 1
AP3030已注册到了AC上。
三、配置任务——配置WLAN
接下来需要在AC上配置与WLAN相关的业务参数,这些业务参数分别包括SSID模版、安全模版和VAP模版。
1、配置SSID模版
[AC6005]wlan
[AC6005-wlan-view]ssid-profile name ssid-guest
[AC6005-wlan-ssid-prof-ssid-guest]ssid guest
管理员在AC上创建了一个名为ssid-guest的SSID模版,并在其中把SSID配置为了guest。
2、配置安全模版
[AC6005]wlan
[AC6005-wlan-view]security-profile name sec-guest
[AC6005-wlan-sec-prof-sec-guest]security wpa2 psk pass-phrase huawei123 aes
在这一步中,管理员在AC上了创建了一个名为sec-guest的安全模版,并在其中配置了WPA2+PSK+AES的安全策略,同时将密码设置为了huawei123。
3、配置VAP模版
[AC6005]wlan
[AC6005-wlan-view]vap-profile name vap-guest
[AC6005-wlan-vap-prof-vap-guest]forward-mode tunnel
[AC6005-wlan-vap-prof-vap-guest]service-vlan vlan-id 20
[AC6005-wlan-vap-prof-vap-guest]ssid-profile ssid-guest
[AC6005-wlan-vap-prof-vap-guest]security-profile sec-guest
这一步中的命令forward-mode tunnel旨在将转发模式设置为隧道转发,当AP接收到用户发来的数据后,会把这些数据通过CAPWAP协议封装后发送给AC;命令service-vlan vlan-id 20的作用是将指定WLAN业务VLAN为VLAN 20。接下来,管理员使用命令ssid-profile ssid-guest应用了名为ssid-guest的SSID模版,并使用命令security-profile sec-guest应用了名为sec-guest的安全模版。
4、AP组应用中应用VAP模版
[AC6005-wlan-view]ap-group name A
[AC6005-wlan-ap-group-default]vap-profile vap-guest wlan 2 radio 1
[AC6005-wlan-ap-group-default]vap-profile vap-guest wlan 2 radio 0
在AP组视图中,管理员使用命令vap-profile命令把指定的VAP模版与指定射频进行了绑定。在这条命令中wlan 2是在给AC中的这个VAP设置,一个AC中最多可以创建16个VAP,VAP ID的取值范围为1-16,上面配置的VAP ID是2;接下来的参数radio是指定应用这个VAP模版的射频,其中射频0为2.4 GHz射频,射频1为5 GHz。
使用命令display vap ssid guest来验证一下这个刚刚创建的VAP:
[AC6005]dis vap ssid guest
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 00e0-fc6c-1800 0 2 00E0-FC6C-1801 OFF WPA2-PSK 0 guest
0 00e0-fc6c-1800 1 2 00E0-FC6C-1811 ON WPA2-PSK 0 guest
------------------------------------------------------------------------------
Total: 2
上面的输出结果显示了之前创建的VAP。
5、客户端连接测试
[AC6005]dis station all
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 a
ddress SSID
--------------------------------------------------------------------------------
------------------
--------------------------------------------------------------------------------
------------------
Total: 0 2.4G: 0 5G: 0
是因为2.4G和5G的我们都未连接
选择2.4G连接,并输入我们之前设置的密码huawei123。
再次查询
[AC6005]dis station all
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 SSID
--------------------------------------------------------------------------------
---------------------------
5489-9836-1763 0 00e0-fc6c-1800 0/2 2.4G - -/- - 20
192.168.20.254 guest
--------------------------------------------------------------------------------
---------------------------
Total: 1 2.4G: 1 5G: 0
通过上面的命令输出信息我们可以看出,MAC地址为5489-9836-1763的STA已经连接到了SSID为guest的无线网络中,这个客户端获得的IP地址为192.168.20.254。到此为止STA已经能够正确连接到WLAN网络中,并获得了业务VLAN中相应的IP地址。