先看拓撲圖,配置完畢的狀態(tài):
配置出口路由器的接口sys [AR]intg0/0/0 [AR-GigabitEthernet0/0/0]ipad10.0.0.224
配置AC
sys [AC1]vlanbatch10 [AC1]intvlanif10 [AC1-Vlanif10]ipad172.16.1.224#與核心交換機直連的IP地址 [AC1-Vlanif10]intg0/0/1 [AC1-GigabitEthernet0/0/1]portlink-typetrunk [AC1-GigabitEthernet0/0/1]porttrunkallow-passvlanall
配置核心交換機
[LSW1]vlanbatch510#創(chuàng)建vlan5和10 [LSW1]intvlanif1 [LSW1-Vlanif1]ipad10.0.0.124#與路由器直連的IP地址 [LSW1-Vlanif1]intvlanif5 [LSW1-Vlanif5]ipad192.168.0.124#AP的網(wǎng)關(guān)地址,稍后要用到 [LSW1-Vlanif5]intvlanif10 [LSW1-Vlanif10]ipad172.16.1.124#與AC直連的地址 [LSW1-Vlanif10]intg0/0/4 [LSW1-GigabitEthernet0/0/4]portlink-typetrunk [LSW1-GigabitEthernet0/0/4]porttrunkallow-passvlanall
2.配置AC/出口路由器的路由,使其能相互通信。
AC的靜態(tài)路由
[AC1]iproute-static0.0.0.00172.16.1.1
出口路由器的靜態(tài)路由
[AR]iproute-static0.0.0.0010.0.0.1
在AC上ping一下路由器,測試網(wǎng)絡(luò)是否聯(lián)通:
ping10.0.0.2 PING10.0.0.2:56databytes,pressCTRL_Ctobreak Replyfrom10.0.0.2:bytes=56Sequence=1ttl=254time=60ms Replyfrom10.0.0.2:bytes=56Sequence=2ttl=254time=30ms Replyfrom10.0.0.2:bytes=56Sequence=3ttl=254time=40ms Replyfrom10.0.0.2:bytes=56Sequence=4ttl=254time=40ms Replyfrom10.0.0.2:bytes=56Sequence=5ttl=254time=50ms
確認無誤再進行下一步
3.配置核心交換機DHCP,使其能分配IP地址給AP
配置與AP相連的端口
[LSW1]port-groupgroup-memberg0/0/1tog0/0/3#端口組 [LSW1-port-group]portlink-typetrunk [LSW1-port-group]porttrunkallow-passvlanall [LSW1-port-group]porttrunkpvidvlan5 [LSW1-port-group]quit
配置DHCP地址池
[LSW1]dhcpenable#使能DHCP [LSW1]ippoolvlan5#創(chuàng)建地址池 [LSW1-ip-pool-vlan5]network192.168.0.0mask24#配置要分配的網(wǎng)段 [LSW1-ip-pool-vlan5]gateway-list192.168.0.1#配置要分配的網(wǎng)關(guān)地址 [LSW1-ip-pool-vlan5]option43sub-option3ascii172.16.1.2#將AC的IP地址下發(fā)給AP [LSW1-ip-pool-vlan5]quit [LSW1]intvlanif5 [LSW1-Vlanif5]dhcpselectglobal#在接口上下發(fā)IP地址
看看AP的地址有沒有上來
disipintbri InterfaceIPAddress/MaskPhysicalProtocol NULL0unassignedupup(s) Vlanif1192.168.0.252/24upup
ping一下AC看看通不通
ping172.16.1.2 PING172.16.1.2:56databytes,pressCTRL_Ctobreak Replyfrom172.16.1.2:bytes=56Sequence=1ttl=254time=30ms Replyfrom172.16.1.2:bytes=56Sequence=2ttl=254time=20ms Replyfrom172.16.1.2:bytes=56Sequence=3ttl=254time=10ms Replyfrom172.16.1.2:bytes=56Sequence=4ttl=254time=20ms Replyfrom172.16.1.2:bytes=56Sequence=5ttl=254time=40ms
確認無誤,進行下一步
4.注冊AP
以下配置,可能會彈出的警告,都選Y就行
指定capwap協(xié)議的信令源地址
[AC1]capwapsourceinterfaceVlanif10 [AC1]wlan#進入wlan視圖 [AC1-wlan-view]apauth-modemac-auth#配置AC的驗證方式為MAC驗證
創(chuàng)建域配置并配置國家碼,使AP的射頻特性符合國家的法律法規(guī)要求
[AC1-wlan-view]regulatory-domain-profilenameCN#創(chuàng)建域配置 [AC1-wlan-regulate-domain-CN]country-codeCN#國家碼:中國 [AC1-wlan-regulate-domain-CN]quit
創(chuàng)建AP-group
[AC1-wlan-view]ap-groupnameguest#創(chuàng)建guest組 [AC1-wlan-ap-group-guest]regulatory-domain-profileCN#關(guān)聯(lián)剛才的域配置 [AC1-wlan-ap-group-guest]quit [AC1-wlan-ap-group-work]ap-groupnamework#創(chuàng)建work組 [AC1-wlan-ap-group-work]regulatory-domain-profileCN#關(guān)聯(lián)剛才的域配置 [AC1-wlan-ap-group-work]quit
基于mac地址注冊AP
[AC1-wlan-view]ap-id1ap-mac00e0-fc61-3600#加入AP。mac地址可以通過查看核心交換機的mac地址表,或者右鍵AP打開設(shè)置查看 [AC1-wlan-ap-1]ap-nameguest1#將AP名字更改為guest1 [AC1-wlan-ap-1]ap-groupguest#將AP加入剛才配置的guest組 [AC1-wlan-ap-1]quit [AC1-wlan-view]ap-id2ap-mac00e0-fc56-18b0 [AC1-wlan-ap-1]ap-nameguest2 [AC1-wlan-ap-1]ap-groupguest [AC1-wlan-ap-1]quit [AC1-wlan-view]ap-id3ap-mac00e0-fce3-7a10 [AC1-wlan-ap-1]ap-namework1 [AC1-wlan-ap-1]ap-groupwork [AC1-wlan-ap-1]quit
到此處AP會自動重啟,且AP名字會被更改(如果沒有自動重啟,可以自己手動重啟)
重啟完在AC上查看AP是否注冊成功:
[AC1-wlan-view]displayapall Info:Thisoperationmaytakeafewseconds.Pleasewaitforamoment.done. TotalAPinformation: nor:normal[1] -------------------------------------------------------------------------------- IDMACNameGroupIPTypeStateSTAUptime -------------------------------------------------------------------------------- 100e0-fc61-3600guest1guest192.168.0.252AP9131DNnor01M:3S 200e0-fc56-18b0guest2guest--idle0- 300e0-fce3-7a10work1work--idle0- -------------------------------------------------------------------------------- Total:1
可以看到state為nor,說明注冊成功;余下兩臺設(shè)備顯示為idle,說明注冊失?。ㄖ皇且驗槲疫€沒重啟,想給大家看看沒注冊成功的狀態(tài))
等三臺設(shè)備全部上線,確認無誤再進行下一步
5.分配無線參數(shù)
[AC1]vlanpoolsta-pool101#新建vlan地址池,名稱為sta-pool101 [AC1-vlan-pool-sta-pool101]vlan101 [AC1-vlan-pool-sta-pool101]quit [AC1]vlanpoolsta-pool102 [AC1-vlan-pool-sta-pool102]vlan102 [AC1-vlan-pool-sta-pool102]quit
安全配置(WIFI密碼)
[AC1]wlan [AC1-wlan-view]security-profilenameguest#新建安全配置,名稱為guest [AC1-wlan-sec-prof-guest]securitywpa2pskpass-phrasea12345678aes#配置加密方式為wpa2-psk,aes密文存放 [AC1-wlan-sec-prof-guest]quit [AC1-wlan-view]security-profilenamework [AC1-wlan-sec-prof-work]securitywpa2pskpass-phrasea12345678aes [AC1-wlan-sec-prof-work]quit
SSID配置(WIFI名稱)
[AC1-wlan-view]ssid-profilenameguest#新建SSID配置,名稱為guest [AC1-wlan-ssid-prof-guest]ssidguest#配置SSID名為guest [AC1-wlan-ssid-prof-guest]quit [AC1-wlan-view]ssid-profilenamework [AC1-wlan-ssid-prof-work]ssidwork [AC1-wlan-ssid-prof-work]quit
虛擬接入點(vpa)配置
[AC1-wlan-view]vap-profilenameguest#新建vap配置,名稱為guest [AC1-wlan-vap-prof-guest]service-vlanvlan-poolsta-pool101#應(yīng)用vlan地址池 [AC1-wlan-vap-prof-guest]security-profileguest#應(yīng)用安全配置 [AC1-wlan-vap-prof-guest]ssid-profileguest#應(yīng)用SSID [AC1-wlan-vap-prof-guest]quit [AC1-wlan-view]vap-profilenamework [AC1-wlan-vap-prof-work]service-vlanvlan-poolsta-pool102 [AC1-wlan-vap-prof-work]security-profilework [AC1-wlan-vap-prof-work]ssid-profilework [AC1-wlan-vap-prof-work]quit
開啟無線電信號
[AC1-wlan-view]ap-groupnameguest [AC1-wlan-ap-group-guest]vap-profileguestwlan1radio0#應(yīng)用虛擬接入點配置,wlanid為1,radio0意思是使用2.4GHz的頻段 [AC1-wlan-ap-group-guest]vap-profileguestwlan1radio1#配置雙射頻,radio1=5GHz [AC1-wlan-ap-group-guest]quit [AC1-wlan-view]ap-groupnamework [AC1-wlan-ap-group-work]vap-profileworkwlan1radio0 [AC1-wlan-ap-group-work]vap-profileworkwlan1radio1
6.配置客戶端使用的地址池,結(jié)束。檢驗配置成果。
配置核心交換機
[LSW1]vlanbatch101102 [LSW1]ippool101 [LSW1-ip-pool-101]network192.168.10.0mask24 [LSW1-ip-pool-101]gateway-list192.168.10.1 [LSW1-ip-pool-101]quit [LSW1]ippool102 [LSW1-ip-pool-102]network192.168.20.0mask24 [LSW1-ip-pool-102]gateway-list192.168.20.1 [LSW1-ip-pool-102]quit [LSW1]intvlanif101 [LSW1-Vlanif101]ipad192.168.10.124 [LSW1-Vlanif101]dhcpselectglobal [LSW1]intvlanif102 [LSW1-Vlanif102]ipad192.168.20.124 [LSW1-Vlanif102]dhcpselectglobal
在終端設(shè)備連接AP,并輸入密碼
然后測試一下網(wǎng)絡(luò)連通性:
STA>ipconfig LinklocalIPv6address...........::: IPv6address......................:::/128 IPv6gateway......................::: IPv4address......................:192.168.10.254 Subnetmask.......................:255.255.255.0 Gateway...........................:192.168.10.1 Physicaladdress..................:54-89-98-F0-37-1A DNSserver........................:
以上可以看到終端自動獲取的IP地址信息是正確的
再ping一下出口路由器和AC:
STA>ping10.0.0.2 Ping10.0.0.2:32databytes,PressCtrl_Ctobreak From10.0.0.2:bytes=32seq=1ttl=254time=219ms From10.0.0.2:bytes=32seq=2ttl=254time=282ms From10.0.0.2:bytes=32seq=3ttl=254time=203ms From10.0.0.2:bytes=32seq=4ttl=254time=204ms From10.0.0.2:bytes=32seq=5ttl=254time=218ms STA>ping172.16.1.2 Ping172.16.1.2:32databytes,PressCtrl_Ctobreak From172.16.1.2:bytes=32seq=1ttl=254time=266ms From172.16.1.2:bytes=32seq=2ttl=254time=218ms From172.16.1.2:bytes=32seq=3ttl=254time=203ms From172.16.1.2:bytes=32seq=4ttl=254time=266ms From172.16.1.2:bytes=32seq=5ttl=254time=203ms
審核編輯:湯梓紅
-
華為
+關(guān)注
關(guān)注
215文章
34263瀏覽量
251024 -
交換機
+關(guān)注
關(guān)注
20文章
2611瀏覽量
99134 -
路由器
+關(guān)注
關(guān)注
22文章
3699瀏覽量
113445 -
WIFI
+關(guān)注
關(guān)注
81文章
5282瀏覽量
203124
原文標(biāo)題:無線wifi AC/AP實驗不熟悉,一篇文章教你如何使用華為eNSP模擬!
文章出處:【微信號:網(wǎng)絡(luò)技術(shù)干貨圈,微信公眾號:網(wǎng)絡(luò)技術(shù)干貨圈】歡迎添加關(guān)注!文章轉(zhuǎn)載請注明出處。
發(fā)布評論請先 登錄
相關(guān)推薦
評論