常見大中型網絡WLAN基本業務實例
組網圖形
大中型WLAN網絡簡介
- 本文介紹的WLAN網絡是指利用頻率為2.4GHz或5GHz的射頻信號作為傳輸介質的無線局域網,相對於有線網絡的鋪設成本高,不便於網絡調整和擴展、位置固定,移動性差等缺點,WLAN網絡以其低廉的鋪設成本、便捷的網絡調整和擴展、靈活的可移動性獲得了越來越廣泛的應用。
組網需求
- 如圖1,AC連接園區出口網關Router,並通過PoE交換機與AP連接,PoE交換機為AP供電。
- 用戶希望通過WLAN部署,提供名為「test」的無線網絡方便用戶隨時隨地接入。同時,用戶希望通過路由器Router來做DHCP Server為用戶提供10.10.10.0/24網段的IP地址,並在AC上對用戶進行集中控制和管理。
配置思路
- 1.配置AP、AC和上層網絡設備之間實現網絡互通。
- 2.在AC上配置基於接口的DHCP服務器為AP分配IP地址,同時配置AC作為DHCP中繼,由AC連接的路由器為STA分配IP地址。
- 3.配置WLAN基本業務,保證用戶能夠通過WLAN網絡接入Internet。
操作步驟
- 1.在AC上配置NAC模式為統一模式(缺省值,不需配置)。配置SwitchA和AC,使AP與AC之間能夠傳輸CAPWAP報文
# 配置SwitchA連接AP的接口GE0/0/1加入VLAN100(管理VLAN),SwitchA連接AC的接口GE0/0/2加入VLAN100。
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] vlan batch 100 [SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] port link-type trunk [SwitchA-GigabitEthernet0/0/1] port trunk pvid vlan 100 [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] port link-type trunk [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 [SwitchA-GigabitEthernet0/0/2] quit
# 配置AC連接SwitchA的接口GE1/0/1加入VLAN100。
[HUAWEI] sysname AC [AC] vlan batch 100 [AC] interface gigabitethernet 1/0/1 [AC-GigabitEthernet1/0/1] port link-type trunk [AC-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 [AC-GigabitEthernet1/0/1] quit
- 2.配置AC與上層網絡設備互通
# 配置VLANIF101(業務VLAN)和VLANIF102。
[AC] vlan batch 101 102 [AC] interface vlanif 101 [AC-Vlanif101] ip address 10.10.10.1 24 [AC-Vlanif101] quit [AC] interface vlanif 102 [AC-Vlanif102] ip address 10.11.10.2 24 [AC-Vlanif102] quit
# 配置AC的缺省路由。
[AC] ip route-static 0.0.0.0 0.0.0.0 10.11.10.1 //配置缺省路由指向Router
# 配置AC連接Router的接口GE1/0/2加入VLAN102。
[AC] interface gigabitethernet 1/0/2 [AC-GigabitEthernet1/0/2] port link-type trunk [AC-GigabitEthernet1/0/2] port trunk allow-pass vlan 102 [AC-GigabitEthernet1/0/2] quit
- 3.配置AC給AP分配IP地址,Router給STA分配IP地址。
# 配置AC通過接口地址池為AP分配IP地址。
[AC] dhcp enable [AC] interface vlanif 100 [AC-Vlanif100] ip address 192.168.10.1 24 [AC-Vlanif100] dhcp select interface //配置基於接口的地址池 [AC-Vlanif100] quit
# 配置AC作為DHCP中繼並使能DHCP中繼探測用戶表項功能。
[AC] interface vlanif 101 [AC-Vlanif101] dhcp select relay //配置DHCP中繼功能 [AC-Vlanif101] dhcp relay server-ip 10.11.10.1 //配置DHCP中繼所代理的DHCP服務器地址為Router上的IP地址10.11.10.1 [AC-Vlanif101] quit
# 配置Router作為DHCP服務器為STA分配IP地址。
<Huawei> system-view [Huawei] sysname Router [Router] dhcp enable [Router] ip pool sta //配置地址池為STA分配IP地址 [Router-ip-pool-sta] gateway-list 10.10.10.1 [Router-ip-pool-sta] network 10.10.10.0 mask 24 [Router-ip-pool-sta] quit [Router] vlan batch 102 [Router] interface vlanif 102 [Router-Vlanif102] ip address 10.11.10.1 24 [Router-Vlanif102] dhcp select global //配置全局的地址池 [Router-Vlanif102] quit [Router] interface gigabitethernet 2/0/0 [Router-GigabitEthernet2/0/0] port link-type trunk [Router-GigabitEthernet2/0/0] port trunk allow-pass vlan 102 [Router-GigabitEthernet2/0/0] quit [Router] ip route-static 10.10.10.0 24 10.11.10.2 //配置Router到達10.10.10.0/24網段的路由
- 4.配置AC的系統參數
# 配置AC的國家碼。
[AC] wlan ac-global country-code cn Warning: Modify the country code may delete configuration on those AP which use the global country code and reset them, continue?[Y/N]:y
# 配置AC ID和運營商標識。
[AC] wlan ac-global ac id 1 carrier id other //AC ID缺省為0,修改為1
# 配置AC的源接口。
[AC] wlan [AC-wlan-view] wlan ac source interface vlanif 100
- 5.在AC上管理AP
# 現場獲取AP的MAC地址後,查看AP的設備類型ID。
[AC-wlan-view] display ap-type all All AP types information: ------------------------------------------------------------------------------ ID Type ------------------------------------------------------------------------------ 17 AP6010SN-GN 19 AP6010DN-AGN 21 AP6310SN-GN 23 AP6510DN-AGN 25 AP6610DN-AGN 27 AP7110SN-GN 28 AP7110DN-AGN 29 AP5010SN-GN 30 AP5010DN-AGN 31 AP3010DN-AGN 33 AP6510DN-AGN-US 34 AP6610DN-AGN-US 35 AP5030DN 36 AP5130DN 37 AP7030DE 38 AP2010DN 39 AP8130DN 40 AP8030DN 42 AP9330DN 43 AP4030DN 44 AP4130DN 45 AP3030DN 46 AP2030DN ------------------------------------------------------------------------------ Total number: 23
# 配置AP認證模式為MAC地址認證(缺省值,不需配置)。根據查詢到的AP設備類型ID,離線添加AP。假設AP的類型為AP6010DN-AGN,其MAC地址為60de-4476-e360。
[AC-wlan-view] ap id 0 type-id 19 mac 60de-4476-e360 [AC-wlan-ap-0] quit
# 配置AP域並將AP加入到AP域。
[AC-wlan-view] ap-region id 10 //新建AP域10 [AC-wlan-ap-region-10] quit [AC-wlan-view] ap id 0 [AC-wlan-ap-0] region-id 10 //將AP加入域10 [AC-wlan-ap-0] quit
# 將AP上電後,可以查看到AP的「AP State」字段為「normal」。
[AC-wlan-view] display ap all All AP information: Normal[1],Fault[0],Commit-failed[0],Committing[0],Config[0],Download[0] Config-failed[0],Standby[0],Type-not-match[0],Ver-mismatch[0] ------------------------------------------------------------------------------ AP AP AP Profile AP AP /Region ID Type MAC ID State Sysname ------------------------------------------------------------------------------ 0 AP6010DN-AGN 60de-4476-e360 0/10 normal ap-0 ------------------------------------------------------------------------------ Total number: 1,printed: 1
- 6.配置WLAN業務參數
# 創建名為「wmm」的WMM模板。
[AC-wlan-view] wmm-profile name wmm id 1 [AC-wlan-wmm-prof-wmm] quit
# 創建名為「radio」的射頻模板,綁定WMM模板「wmm」。
[AC-wlan-view] radio-profile name radio id 1 [AC-wlan-radio-prof-radio] wmm-profile name wmm [AC-wlan-radio-prof-radio] quit [AC-wlan-view] quit
# 創建WLAN-ESS接口1。
[AC] interface wlan-ess 1 [AC-Wlan-Ess1] port trunk allow-pass vlan 101 [AC-Wlan-Ess1] quit
# 創建名為「security」的安全模板。
[AC] wlan [AC-wlan-view] security-profile name security id 1 [AC-wlan-sec-prof-security] security-policy wpa2 //配置安全策略為WPA2 [AC-wlan-sec-prof-security] wpa2 authentication-method psk pass-phrase cipher huawei123 encryption-method ccmp //配置加密方式為PSK+CCMP [AC-wlan-sec-prof-security] quit
# 創建名為「traffic」的流量模板。
[AC-wlan-view] traffic-profile name traffic id 1 [AC-wlan-traffic-prof-traffic] quit
# 創建名為「test」的服務集並綁定WLAN-ESS接口、安全模板和流量模板。
[AC-wlan-view] service-set name test id 1 [AC-wlan-service-set-test] ssid test //配置SSID名稱為test [AC-wlan-service-set-test] wlan-ess 1 [AC-wlan-service-set-test] security-profile name security [AC-wlan-service-set-test] traffic-profile name traffic [AC-wlan-service-set-test] service-vlan 101 //缺省情況下服務集的VLAN ID為1,修改服務集的VLAN ID為101 [AC-wlan-service-set-test] forward-mode tunnel //配置業務轉發模式為隧道轉發 [AC-wlan-service-set-test] quit
- 7.配置VAP並下發
# 配置VAP。
[AC-wlan-view] ap 0 radio 0 [AC-wlan-radio-0/0] radio-profile name radio //配置射頻模板綁定到射頻上 [AC-wlan-radio-0/0] service-set name test //配置服務集綁定到射頻上 [AC-wlan-radio-0/0] quit
# 提交配置。
[AC-wlan-view] commit ap 0 Warning: Committing configuration may cause service interruption, continue?[Y/N] :y
- 8.驗證配置結果
配置完成後,通過display vap ap 0 radio 0命令,可以查看到VAP已創建成功。
[AC-wlan-view] display vap ap 0 radio 0 All VAP Information(Total-1): SS: Service-set BP: Bridge-profile MP: Mesh-profile ---------------------------------------------------------------------- AP ID Radio ID SS ID BP ID MP ID WLAN ID BSSID Type ---------------------------------------------------------------------- 0 0 1 - - 1 60DE-4476-E360 service ---------------------------------------------------------------------- Total: 1
STA搜索到名為「test」的無線網絡並關聯後,無線PC能夠被分配相應的IP地址,用戶輸入預共享密鑰可以訪問無線網絡,在AC上執行display station assoc-info命令,可以查看到用戶已經接入到無線網絡「test」中。
[AC-wlan-view] display station assoc-info ap 0 radio 0 ------------------------------------------------------------------------------ STA MAC AP ID RADIO ID SS ID SSID ------------------------------------------------------------------------------ 9021-55dc-3e17 0 0 1 test ------------------------------------------------------------------------------ Total stations: 1