一哑子、配置任務(wù)——站點(diǎn)到站點(diǎn)IPSec VP
1喊括、在AC上配置trunk祟峦、創(chuàng)建VLAN并配置默認(rèn)路由
[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連接交換機(jī)的接口封裝Trunk(用戶承載管理,業(yè)務(wù)VLAN)啤覆,并且創(chuàng)建VLAN,設(shè)置接口管理地址窗声,配置默認(rèn)路由相恃。
2、在交換機(jī)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
以上命令的作用將交換機(jī)連接AC的接口配置為了trunk接口笨觅,同時(shí)還創(chuàng)建了兩個(gè)SVI拦耐。此外,我們還在連接AP的接口上放行了VLAN 10和VLAN 20见剩。
3杀糯、在交換機(jī)上配置DHCP服務(wù)
[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的作用是讓交換機(jī)接口IP地址和子網(wǎng)掩碼來為DHCP客戶端提供IP地址信息。因此苍苞,經(jīng)過上面的操作固翰,我們已經(jīng)在交換機(jī)上開啟了DHCP服務(wù)。
二羹呵、配置任務(wù)——AP注冊(cè)AC
1倦挂、在AC上創(chuàng)建AP group
[AC6005]wlan
[AC6005-wlan-view]ap-group name A
管理員進(jìn)入了WLAN視圖,并使用WLAN視圖命令ap-group name group-name担巩,創(chuàng)建了一個(gè)名為A的AP組方援。
注釋:AC上默認(rèn)即包含ap group:default,所以也可以不創(chuàng)建AP group涛癌。
2犯戏、配置AC系統(tǒng)參數(shù)和源接口
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創(chuàng)建了域管理模版拳话,并進(jìn)入了該模版視圖先匪。在域管理模版中,管理員可以設(shè)置國(guó)家碼弃衍、優(yōu)化信道和帶寬等參數(shù)呀非。在上面的配置中,管理員將國(guó)家碼配置為了中國(guó)(cn)镜盯。
b. 在AP組中應(yīng)用域管理模版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組中應(yīng)用的域管理模版(默認(rèn)default group 國(guó)家代碼為CN)岸裙。
c. 設(shè)置AC的源接口:
[AC6005]capwap source interface vlanif10
3、導(dǎo)入AP
a. 配置AC速缆,使AP不執(zhí)行認(rèn)證
[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地址認(rèn)證方式設(shè)置為不執(zhí)行認(rèn)證降允。除此之外,管理員還可以將其設(shè)置為MAC認(rèn)證方式(mac-auth)或序列號(hào)認(rèn)證方式(sn-auth)艺糜。在默認(rèn)情況下剧董,AP采用的是認(rèn)證方式是MAC認(rèn)證幢尚。
b. 在AC上查看AP狀態(tài):
[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已注冊(cè)到了AC上。
三翅楼、配置任務(wù)——配置WLAN
接下來需要在AC上配置與WLAN相關(guān)的業(yè)務(wù)參數(shù)尉剩,這些業(yè)務(wù)參數(shù)分別包括SSID模版、安全模版和VAP模版毅臊。
1理茎、配置SSID模版
[AC6005]wlan
[AC6005-wlan-view]ssid-profile name ssid-guest
[AC6005-wlan-ssid-prof-ssid-guest]ssid guest
管理員在AC上創(chuàng)建了一個(gè)名為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上了創(chuàng)建了一個(gè)名為sec-guest的安全模版宠蚂,并在其中配置了WPA2+PSK+AES的安全策略,同時(shí)將密碼設(shè)置為了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旨在將轉(zhuǎn)發(fā)模式設(shè)置為隧道轉(zhuǎn)發(fā),當(dāng)AP接收到用戶發(fā)來的數(shù)據(jù)后扰楼,會(huì)把這些數(shù)據(jù)通過CAPWAP協(xié)議封裝后發(fā)送給AC呀癣;命令service-vlan vlan-id 20的作用是將指定WLAN業(yè)務(wù)VLAN為VLAN 20。接下來弦赖,管理員使用命令ssid-profile ssid-guest應(yīng)用了名為ssid-guest的SSID模版项栏,并使用命令security-profile sec-guest應(yīng)用了名為sec-guest的安全模版。
4蹬竖、AP組應(yīng)用中應(yīng)用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模版與指定射頻進(jìn)行了綁定。在這條命令中wlan 2是在給AC中的這個(gè)VAP設(shè)置币厕,一個(gè)AC中最多可以創(chuàng)建16個(gè)VAP列另,VAP ID的取值范圍為1-16,上面配置的VAP ID是2旦装;接下來的參數(shù)radio是指定應(yīng)用這個(gè)VAP模版的射頻页衙,其中射頻0為2.4 GHz射頻,射頻1為5 GHz阴绢。
使用命令display vap ssid guest來驗(yàn)證一下這個(gè)剛剛創(chuàng)建的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
上面的輸出結(jié)果顯示了之前創(chuàng)建的VAP店乐。
5、客戶端連接測(cè)試
[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
是因?yàn)?.4G和5G的我們都未連接
選擇2.4G連接呻袭,并輸入我們之前設(shè)置的密碼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已經(jīng)連接到了SSID為guest的無線網(wǎng)絡(luò)中棒妨,這個(gè)客戶端獲得的IP地址為192.168.20.254踪古。到此為止STA已經(jīng)能夠正確連接到WLAN網(wǎng)絡(luò)中含长,并獲得了業(yè)務(wù)VLAN中相應(yīng)的IP地址。