1. 程式人生 > >HW-wlan跨三層的本地轉發

HW-wlan跨三層的本地轉發

• 業務需求
• 組網需求
• 資料規劃
• 配置思路
• 配置注意事項
• 操作步驟
• 配置檔案
配置WLAN跨VLAN的三層漫遊示例
組網圖形
圖1 配置WLAN跨VLAN的三層漫遊示例組網圖
在這裡插入圖片描述

• 業務需求
• 組網需求
• 資料規劃
• 配置思路
• 配置注意事項
• 操作步驟
• 配置檔案
業務需求
企業使用者通過WLAN接入網路,以滿足移動辦公的最基本需求。為了區分部門進行管理,不同部門的員工在不同的子網。且在覆蓋區域內移動發生漫遊時,不影響使用者的業務使用。
組網需求
• AC組網方式:旁掛三層組網。
• DHCP部署方式:
 AC作為DHCP伺服器為AP分配IP地址。
 匯聚交換機SwitchB作為DHCP伺服器為STA分配IP地址。
• 業務資料轉發方式:直接轉發。
資料規劃
表1 AC資料規劃表
配置項 資料
AP管理VLAN VLAN10、VLAN100
STA業務VLAN • area_1:VLAN101
• area_2:VLAN102
DHCP伺服器 AC作為DHCP伺服器為AP分配IP地址
匯聚交換機作為STA的DHCP伺服器,STA的預設閘道器為10.23.101.2/24和10.23.102.2/24
AP的IP地址池 10.23.10.2~10.23.10.254/24
STA的IP地址池 • area_1:10.23.101.3~10.23.101.254/24
• area_2:10.23.102.3~10.23.102.254/24
AC的源介面IP地址 VLANIF100:10.23.100.1/24
AP組 • 名稱:ap-group1
• 引用模板:VAP模板wlan-net1、域管理模板default、2G射頻模板wlan-radio2g、5G射頻模板wlan-radio5g
• 名稱:ap-group2
• 引用模板:VAP模板wlan-net2、域管理模板default、2G射頻模板wlan-radio2g、5G射頻模板wlan-radio5g
域管理模板 • 名稱:default
• 國家碼:中國
• 調優通道集合:配置2.4G和5G調優頻寬和調優通道
SSID模板 • 名稱:wlan-net
• SSID名稱:wlan-net
安全模板 • 名稱:wlan-net
• 安全策略:WPA-WPA2+PSK+AES
• 密碼:a1234567
VAP模板 • 名稱:wlan-net1
• 轉發模式:直接轉發
• 業務VLAN:VLAN101
• 引用模板:SSID模板wlan-net、安全模板wlan-net
• 名稱:wlan-net2
• 轉發模式:直接轉發
• 業務VLAN:VLAN102
• 引用模板:SSID模板wlan-net、安全模板wlan-net
空口掃描模板 • 名稱:wlan-airscan
• 探測通道集合:調優通道
• 空口掃描間隔時間:60000毫秒
• 空口掃描持續時間:60毫秒
RRM模板 • 名稱:wlan-rrm
• 通道自動調優:開啟
• 功率自動調優:開啟
2G射頻模板 • 名稱:wlan-radio2g
• 引用模板:空口掃描模板wlan-airscan、RRM模板wlan-rrm
5G射頻模板 • 名稱:wlan-radio5g
• 引用模板:空口掃描模板wlan-airscan、RRM模板wlan-rrm
配置思路

  1. 配置AP、AC和周邊網路裝置之間實現網路互通。
  2. 配置AP上線。
    a. 建立AP組,用於將需要進行相同配置的AP都加入到AP組,實現統一配置。
    b. 配置AC的系統引數,包括國家碼、AC與AP之間通訊的源介面。
    c. 配置AP上線的認證方式並離線匯入AP,實現AP正常上線。
  3. 配置WLAN業務引數,實現STA訪問WLAN網路功能。
    說明:
    當用戶新開局時,對於AP的射頻通道的設定,使用者可根據網路規劃手動指定,也可使用射頻調優功能自動選擇最佳通道。本例中採用射頻調優功能自動選擇最佳通道。
    配置注意事項
    • 純組播報文由於協議要求在無線空口沒有ACK機制保障,且無線空口鏈路不穩定,為了純組播報文能夠穩定傳送,通常會以低速報文形式傳送。如果網路側有大量異常組播流量湧入,則會造成無線空口擁堵。為了減小大量低速組播報文對無線網路造成的衝擊,建議配置組播報文抑制功能。配置前請確認是否有組播業務,如果有,請謹慎配置限速值。
     業務資料轉發方式採用直接轉發時,建議在直連AP的交換機介面上配置組播報文抑制。
     業務資料轉發方式採用隧道轉發時,建議在AC的流量模板下配置組播報文抑制。
    配置方法請參見如何配置組播報文抑制,減小大量低速組播報文對無線網路造成的衝擊?。
    • 建議在與AP直連的裝置介面上配置埠隔離,如果不配置埠隔離,尤其是業務資料轉發方式採用直接轉發時,可能會在VLAN內形成大量不必要的廣播報文,導致網路阻塞,影響使用者體驗。
    • 隧道轉發模式下,管理VLAN和業務VLAN不能配置為同一VLAN,且AP和AC之間只能放通管理VLAN,不能放通業務VLAN。
    操作步驟
  4. 配置周邊裝置

配置接入交換機SwitchA的GE0/0/1介面加入VLAN10和VLAN101、GE0/0/2介面加入VLAN10、VLAN101和VLAN102、GE0/0/3介面加入VLAN10和VLAN102,GE0/0/1和GE0/0/3介面的預設VLAN為VLAN10。

system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 10 101 102
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] port trunk pvid vlan 10
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 101
[SwitchA-GigabitEthernet0/0/1] port-isolate enable
[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 10 101 102
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] port link-type trunk
[SwitchA-GigabitEthernet0/0/3] port trunk pvid vlan 10
[SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 10 102
[SwitchA-GigabitEthernet0/0/3] port-isolate enable
[SwitchA-GigabitEthernet0/0/3] quit

配置匯聚交換機SwitchB的介面GE0/0/1加入VLAN10、VLAN101和VLAN102,介面GE0/0/2加入VLAN100,介面GE0/0/3加入VLAN101和VLAN102,並建立介面VLANIF100,地址為10.23.100.2/24。

system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 10 100 101 102
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 101 102
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 100
[SwitchB-GigabitEthernet0/0/2] quit
[SwitchB] interface gigabitethernet 0/0/3
[SwitchB-GigabitEthernet0/0/3] port link-type trunk
[SwitchB-GigabitEthernet0/0/3] port trunk allow-pass vlan 101 102
[SwitchB-GigabitEthernet0/0/3] quit
[SwitchB] interface vlanif 100
[SwitchB-Vlanif100] ip address 10.23.100.2 24
[SwitchB-Vlanif100] quit

配置Router的介面GE1/0/0加入VLAN101和VLAN102,建立介面VLANIF101並配置IP地址為10.23.101.2/24,建立介面VLANIF102並配置IP地址為10.23.102.2/24。

system-view
[Huawei] sysname Router
[Router] vlan batch 101 102
[Router] interface gigabitethernet 1/0/0
[Router-GigabitEthernet1/0/0] port link-type trunk
[Router-GigabitEthernet1/0/0] port trunk allow-pass vlan 101 102
[Router-GigabitEthernet1/0/0] quit
[Router] interface vlanif 101
[Router-Vlanif101] ip address 10.23.101.2 24
[Router-Vlanif101] quit
[Router] interface vlanif 102
[Router-Vlanif102] ip address 10.23.102.2 24
[Router-Vlanif102] quit
2. 配置AC與其它網路裝置互通

配置AC的介面GE0/0/1加入VLAN100,並建立介面VLANIF100。

system-view
[AC6605] sysname AC
[AC] vlan 100
[AC-vlan100] quit
[AC] interface vlanif 100
[AC-Vlanif100] ip address 10.23.100.1 24
[AC-Vlanif100] quit
[AC] interface gigabitethernet 0/0/1
[AC-GigabitEthernet0/0/1] port link-type trunk
[AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
[AC-GigabitEthernet0/0/1] quit

配置AC到AP的路由,下一跳為SwitchB的VLANIF100。

[AC] ip route-static 10.23.10.0 24 10.23.100.2
3. 配置DHCP伺服器為STA和AP分配IP地址

在SwitchB上配置DHCP中繼。

[SwitchB] dhcp enable
[SwitchB] interface vlanif 10
[SwitchB-Vlanif10] ip address 10.23.10.1 24
[SwitchB-Vlanif10] dhcp select relay
[SwitchB-Vlanif10] dhcp relay server-ip 10.23.100.1
[SwitchB-Vlanif10] quit

在SwitchB上建立VLANIF101和VLANIF102介面為STA提供地址,並指定預設閘道器。

說明:
DNS伺服器地址請根據實際需要配置。常用配置方法如下:
• 介面地址池場景,需要在VLANIF介面檢視下執行命令dhcp server dns-list ip-address &<1-8>。
• 全域性地址池場景,需要在IP地址池檢視下執行命令dns-list ip-address &<1-8>。
[SwitchB] interface vlanif 101
[SwitchB-Vlanif101] ip address 10.23.101.1 24
[SwitchB-Vlanif101] dhcp select interface
[SwitchB-Vlanif101] dhcp server gateway-list 10.23.101.2
[SwitchB-Vlanif101] quit
[SwitchB] interface vlanif 102
[SwitchB-Vlanif102] ip address 10.23.102.1 24
[SwitchB-Vlanif102] dhcp select interface
[SwitchB-Vlanif102] dhcp server gateway-list 10.23.102.2
[SwitchB-Vlanif102] quit

在AC上建立全域性地址池為AP提供地址。

[AC] dhcp enable
[AC] ip pool huawei
[AC-ip-pool-huawei] network 10.23.10.0 mask 24
[AC-ip-pool-huawei] gateway-list 10.23.10.1
[AC-ip-pool-huawei] option 43 sub-option 3 ascii 10.23.100.1
[AC-ip-pool-huawei] quit
[AC] interface vlanif 100
[AC-Vlanif100] dhcp select global
[AC-Vlanif100] quit
4. 配置AP上線

建立AP組,用於將相同配置的AP都加入同一AP組中。

[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] ap-group name ap-group2
[AC-wlan-ap-group-ap-group2] quit

建立域管理模板,在域管理模板下配置AC的國家碼並在AP組下引用域管理模板。

[AC-wlan-view] regulatory-domain-profile name default
[AC-wlan-regulate-domain-default] country-code cn
[AC-wlan-regulate-domain-default] quit
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] regulatory-domain-profile default
Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continu
e?[Y/N]:y
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] ap-group name ap-group2
[AC-wlan-ap-group-ap-group2] regulatory-domain-profile default
Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continu
e?[Y/N]:y
[AC-wlan-ap-group-ap-group2] quit
[AC-wlan-view] quit

配置AC的源介面。

[AC] capwap source interface vlanif 100

在AC上離線匯入AP,並將area_1和area_2分別加入AP組“ap-group1”和“ap-group2”中。假設AP的MAC地址為60de-4476-e360,並且根據AP的部署位置為AP配置名稱,便於從名稱上就能夠了解AP的部署位置。例如MAC地址為60de-4476-e360的AP部署在1號區域,命名此AP為area_1。

說明:
ap auth-mode命令預設情況下為MAC認證,如果之前沒有修改其預設配置,可以不用執行ap auth-mode mac-auth。
舉例中使用的AP為AP5030DN,具有射頻0和射頻1兩個射頻。AP5030DN的射頻0為2.4GHz射頻,射頻1為5GHz射頻。
[AC-wlan-view] ap-id 0 ap-mac 60de-4476-e360
[AC-wlan-ap-0] ap-name area_1
Warning: This operation may cause AP reset. Continue? [Y/N]y
[AC-wlan-ap-0] ap-group ap-group1
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]:y
[AC-wlan-ap-0] quit
[AC-wlan-view] ap-id 1 ap-mac dcd2-fc04-b500
[AC-wlan-ap-1] ap-name area_2
Warning: This operation may cause AP reset. Continue? [Y/N]y
[AC-wlan-ap-1] ap-group ap-group2
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]:y
[AC-wlan-ap-1] quit

將AP上電後,當執行命令display ap all檢視到AP的“State”欄位為“nor”時,表示AP正常上線。

[AC-wlan-view] display ap all
Total AP information:
nor : normal [2]
----------------------------------------------------------------------------ID MAC Name Group IP Type State STA Uptime

0 60de-4476-e360 area_1 ap-group1 10.23.10.254 AP5030DN nor 0 15S
1 dcd2-fc04-b500 area_2 ap-group2 10.23.10.253 AP5030DN nor 0 10S
----------------------------------------------------------------------------Total: 2
5. 配置WLAN業務引數

建立名為“wlan-net”的安全模板,並配置安全策略。

說明:
舉例中以配置WPA-WPA2+PSK+AES的安全策略為例,密碼為“a1234567”,實際配置中請根據實際情況,配置符合實際要求的安全策略。
[AC-wlan-view] security-profile name wlan-net
[AC-wlan-sec-prof-wlan-net] security wpa-wpa2 psk pass-phrase a1234567 aes
[AC-wlan-sec-prof-wlan-net] quit

建立名為“wlan-net”的SSID模板,並配置SSID名稱為“wlan-net”。

[AC-wlan-view] ssid-profile name wlan-net
[AC-wlan-ssid-prof-wlan-net] ssid wlan-net
[AC-wlan-ssid-prof-wlan-net] quit

建立名為“wlan-net1”和“wlan-net2”的VAP模板,配置業務資料轉發模式、業務VLAN,並且引用安全模板和SSID模板。forward-mode direct-forward 使用本地轉發(預設就是,故無需配置該命令){ direct-forward | tunnel }

[AC-wlan-view] vap-profile name wlan-net1
[AC-wlan-vap-prof-wlan-net1] service-vlan vlan-id 101
[AC-wlan-vap-prof-wlan-net1] security-profile wlan-net
[AC-wlan-vap-prof-wlan-net1] ssid-profile wlan-net
[AC-wlan-vap-prof-wlan-net1] quit
[AC-wlan-view] vap-profile name wlan-net2
[AC-wlan-vap-prof-wlan-net2] service-vlan vlan-id 102
[AC-wlan-vap-prof-wlan-net2] security-profile wlan-net
[AC-wlan-vap-prof-wlan-net2] ssid-profile wlan-net
[AC-wlan-vap-prof-wlan-net2] quit

配置AP組引用VAP模板,area_1上射頻0和射頻1都使用VAP模板“wlan-net1”的配置,area_2上射頻0和射頻1都使用VAP模板“wlan-net2”的配置。

[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net1 wlan 1 radio 0
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net1 wlan 1 radio 1
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] ap-group name ap-group2
[AC-wlan-ap-group-ap-group2] vap-profile wlan-net2 wlan 1 radio 0
[AC-wlan-ap-group-ap-group2] vap-profile wlan-net2 wlan 1 radio 1
[AC-wlan-ap-group-ap-group2] quit
6. 開啟射頻調優功能自動選擇AP最佳通道和功率

建立RRM模板“wlan-rrm”,在RRM模板下使能通道自動選擇通道功能和傳送功率自動選擇通道功能。預設情況下,通道自動選擇通道功能和傳送功率自動選擇通道功能都已經使能。

[AC-wlan-view] rrm-profile name wlan-rrm
[AC-wlan-rrm-prof-wlan-rrm] undo calibrate auto-channel-select disable
[AC-wlan-rrm-prof-wlan-rrm] undo calibrate auto-txpower-select disable
[AC-wlan-rrm-prof-wlan-rrm] quit

在域管理模板下配置調優通道集合。

[AC-wlan-view] regulatory-domain-profile name default
[AC-wlan-regulate-domain-default] dca-channel 2.4g channel-set 1,6,11
[AC-wlan-regulate-domain-default] dca-channel 5g bandwidth 20mhz
[AC-wlan-regulate-domain-default] dca-channel 5g channel-set 149,153,157,161
[AC-wlan-regulate-domain-default] quit

建立空口掃描模板“wlan-airscan”,並配置調優通道集合、掃描間隔時間和掃描持續時間。

[AC-wlan-view] air-scan-profile name wlan-airscan
[AC-wlan-air-scan-prof-wlan-airscan] scan-channel-set dca-channel
[AC-wlan-air-scan-prof-wlan-airscan] scan-period 60
[AC-wlan-air-scan-prof-wlan-airscan] scan-interval 60000
[AC-wlan-air-scan-prof-wlan-airscan] quit

建立2G射頻模板“wlan-radio2g”,並在該模板下引用RRM模板“wlan-rrm”和空口掃描模板“wlan-airscan”。

[AC-wlan-view] radio-2g-profile name wlan-radio2g
[AC-wlan-radio-2g-prof-wlan-radio2g] rrm-profile wlan-rrm
[AC-wlan-radio-2g-prof-wlan-radio2g] air-scan-profile wlan-airscan
[AC-wlan-radio-2g-prof-wlan-radio2g] quit

建立5G射頻模板“wlan-radio5g”,並在該模板下引用RRM模板“wlan-rrm”和空口掃描模板“wlan-airscan”。

[AC-wlan-view] radio-5g-profile name wlan-radio5g
[AC-wlan-radio-5g-prof-wlan-radio5g] rrm-profile wlan-rrm
[AC-wlan-radio-5g-prof-wlan-radio5g] air-scan-profile wlan-airscan
[AC-wlan-radio-5g-prof-wlan-radio5g] quit

在名為“ap-group1”和“ap-group2”的AP組下引用5G射頻模板“wlan-radio5g”和2G射頻模板“wlan-radio2g”。

[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] radio-5g-profile wlan-radio5g radio 1
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-ap-group-ap-group1] radio-2g-profile wlan-radio2g radio 0
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] ap-group name ap-group2
[AC-wlan-ap-group-ap-group2] radio-5g-profile wlan-radio5g radio 1
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-ap-group-ap-group2] radio-2g-profile wlan-radio2g radio 0
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-ap-group-ap-group2] quit

配置射頻調優模式為手動調優,並手動觸發射頻調優。

[AC-wlan-view] calibrate enable manual
[AC-wlan-view] calibrate manual startup

待執行手動調優一小時後,調優結束。將射頻調優模式改為定時調優,並將調優時間定為使用者業務空閒時段(如當地時間凌晨00:00-06:00時段)。

[AC-wlan-view] calibrate enable schedule time 03:00:00
7. 驗證配置結果
WLAN業務配置會自動下發給AP,配置完成後,通過執行命令display vap ssid wlan-net檢視如下資訊,當“Status”項顯示為“ON”時,表示AP對應的射頻上的VAP已建立成功。
[AC-wlan-view] display vap ssid wlan-net
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 area_1 0 1 60DE-4476-E360 ON WPA/WPA2-PSK 0 wlan-net
0 area_1 1 1 60DE-4476-E370 ON WPA/WPA2-PSK 0 wlan-net
1 area_2 0 1 60DE-4474-9640 ON WPA/WPA2-PSK 0 wlan-net
1 area_2 1 1 60DE-4474-9650 ON WPA/WPA2-PSK 0 wlan-net

Total: 4
STA搜尋到名為“wlan-net”的無線網路,輸入密碼“a1234567”並正常關聯後,在AC上執行display station ssid wlan-net命令,可以檢視到使用者已經接入到無線網路“wlan-net”中。
[AC-wlan-view] display station ssid wlan-net
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

e019-1dc7-1e08 0 area_1 1/1 5G 11n 46/59 -68 101 10.23.101.254

Total: 1 2.4G: 0 5G: 1
當STA從AP1的覆蓋範圍移動到AP2的覆蓋範圍時,在AC上執行命令display station ssid wlan-net,檢視STA的接入資訊,可以看到STA關聯到了AP2。
[AC-wlan-view] display station ssid wlan-net
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

e019-1dc7-1e08 1 area_2 1/1 5G 11n 46/59 -58 101 10.23.101.254

Total: 1 2.4G: 0 5G: 1
在AC上執行命令display station roam-track sta-mac e019-1dc7-1e08,可以檢視該STA的漫遊軌跡。
[AC-wlan-view] display station roam-track sta-mac e019-1dc7-1e08
Access SSID:wlan-net
Rx/Tx:link receive rate/link transmit rate(Mbps)
z:Zero Roam c:PMK Cache Roam r:802.11r Roam

L2/L3 AC IP AP name Radio ID
BSSID TIME In/Out RSSI Out Rx/Tx

– 10.23.100.1 area_1 1
60DE-4476-E370 2016/01/12 16:52:58 -51/-48 46/13
L3 10.23.100.1 area_2 1
60DE-4474-9650 2016/01/12 16:55:45 -58/- -/-

Number: 1
配置檔案
• SwitchA的配置檔案
• #
• sysname SwitchA
• #
• vlan batch 10 101 to 102
• #
• interface GigabitEthernet0/0/1
• port link-type trunk
• port trunk pvid vlan 10
• port trunk allow-pass vlan 10 101
• port-isolate enable
• #
• interface GigabitEthernet0/0/2
• port link-type trunk
• port trunk allow-pass vlan 10 101 to 102
• #
• interface GigabitEthernet0/0/3
• port link-type trunk
• port trunk pvid vlan 10
• port trunk allow-pass vlan 10 102
• port-isolate enable
• #
• return
• SwitchB的配置檔案
• #
• sysname SwitchB
• #
• vlan batch 10 100 to 102
• #
• dhcp enable
• #
• interface Vlanif10
• ip address 10.23.10.1 255.255.255.0
• dhcp select relay
• dhcp relay server-ip 10.23.100.1
• #
• interface Vlanif100
• ip address 10.23.100.2 255.255.255.0
• #
• interface Vlanif101
• ip address 10.23.101.1 255.255.255.0
• dhcp select interface
• dhcp server gateway-list 10.23.101.2
• #
• interface Vlanif102
• ip address 10.23.102.1 255.255.255.0
• dhcp select interface
• dhcp server gateway-list 10.23.102.2
• #
• interface GigabitEthernet0/0/1
• port link-type trunk
• port trunk allow-pass vlan 10 101 to 102
• #
• interface GigabitEthernet0/0/2
• port link-type trunk
• port trunk allow-pass vlan 100
• #
• interface GigabitEthernet0/0/3
• port link-type trunk
• port trunk allow-pass vlan 101 to 102
• #
return
• Router的配置檔案
• #
• sysname Router
• #
• vlan batch 101 to 102
• #
• interface Vlanif101
• ip address 10.23.101.2 255.255.255.0
• #
• interface Vlanif102
• ip address 10.23.102.2 255.255.255.0
• #
• interface GigabitEthernet1/0/0
• port link-type trunk
• port trunk allow-pass vlan 101 to 102
• #
• return
• AC的配置檔案
• #
• sysname AC
• #
• vlan batch 100 to 102
• #
• dhcp enable
• #
• ip pool huawei
• gateway-list 10.23.10.1
• network 10.23.10.0 mask 255.255.255.0
• option 43 sub-option 3 ascii 10.23.100.1
• #
• interface Vlanif100
• ip address 10.23.100.1 255.255.255.0
• #
• interface GigabitEthernet0/0/1
• port link-type trunk
• port trunk allow-pass vlan 100
• #
• ip route-static 10.23.10.0 24 10.23.100.2
• #
• capwap source interface vlanif100
• #
• wlan
• calibrate enable schedule time 03:00:00
• security-profile name wlan-net
• security wpa2 psk pass-phrase %%#]:krYrz_r<ee}|[email protected](W{ZD$"-R-HD_y.4#U4,%%# aes
• ssid-profile name wlan-net
• ssid wlan-net
• vap-profile name wlan-net1
• service-vlan vlan-id 101
• ssid-profile wlan-net
• security-profile wlan-net
• vap-profile name wlan-net2
• service-vlan vlan-id 102
• ssid-profile wlan-net
• security-profile wlan-net
• regulatory-domain-profile name default
• dca-channel 5g channel-set 149,153,157,161
• air-scan-profile name wlan-airscan
• scan-channel-set dca-channel
• rrm-profile name wlan-rrm
• radio-2g-profile name wlan-radio2g
• rrm-profile wlan-rrm
• air-scan-profile wlan-airscan
• radio-5g-profile name wlan-radio5g
• rrm-profile wlan-rrm
• air-scan-profile wlan-airscan
• ap-group name ap-group1
• radio 0
• radio-2g-profile wlan-radio2g
• vap-profile wlan-net wlan 1
• radio 1
• radio-5g-profile wlan-radio5g
• vap-profile wlan-net wlan 1
• ap-group name ap-group2
• radio 0
• radio-2g-profile wlan-radio2g
• vap-profile wlan-net wlan 1
• radio 1
• radio-5g-profile wlan-radio5g
• vap-profile wlan-net wlan 1
• ap-id 0 type-id 35 ap-mac 60de-4476-e360 ap-sn 210235554710CB000042
• ap-name area_1
• ap-group ap-group1
• ap-id 1 type-id 35 ap-mac dcd2-fc04-b500 ap-sn 210235554710CB000078
• ap-name area_2
• ap-group ap-group2
• #
return

#各種情況的案例
!Software Version V200R001C00SPC100
sysname AC1

FTP server enable

vlan batch 10 to 13 801

undo http server enable

wlan ac-global carrier id other ac id 0

使用者組授權管理呼叫的QOS模板,用來為無線使用者限速

qos-prof-guest1
car inbound cir 256 pir 256 cbs 32000 pbs 32000
car outbound cir 512 pir 512 cbs 64000 pbs 64000
qos-profile name qos-prof-employee1
car inbound cir 1024 pir 1024 cbs 128000 pbs 128000
car outbound cir 2048 pir 2048 cbs 256000 pbs 256000
qos-profile name qos-prof-admin1
car inbound cir 2048 pir 2048 cbs 256000 pbs 256000
car outbound cir 2048 pir 2048 cbs 256000 pbs 256000

dba-profile default0 type3 assure 40000 max 80000

dhcp enable

diffserv domain default
#AAA伺服器配置,用來做第三方認證
radius-server template radius_huawei
radius-server authentication 10.254.1.100 1812
radius-attribute check Filter-Id
#使用者組授權管理配置ACL,定義使用者許可權
time-range workday 08:30 to 18:00 working-day

acl number 3001
description “acl used for guest access control”
rule 5 deny udp destination-port eq bootpc
rule 10 permit udp destination-port eq bootps
rule 15 deny ip destination 10.0.0.0 0.255.255.255
rule 20 deny ip destination 172.16.0.0 0.15.255.255
rule 25 deny ip destination 192.168.0.0 0.0.255.255
rule 30 permit udp destination-port eq dns
rule 35 permit tcp destination-port eq www
rule 40 permit tcp destination-port eq 443
rule 45 permit tcp destination-port eq smtp
rule 50 permit tcp destination-port eq pop3
rule 55 deny
acl number 3002
description “this acl used for employee access control”
rule 5 deny udp destination-port eq bootpc
rule 10 deny tcp destination-port eq ftp
rule 15 deny tcp destination-port eq telnet
rule 20 permit ip source 10.1.10.0 0.0.0.255 time-range workday
rule 25 permit ip source 10.1.11.0 0.0.0.255 time-range workday
rule 30 deny
acl number 3003
description “this acl used for admin access control”
rule 5 deny udp destination-port eq bootpc
rule 15 permit ip destination 10.0.0.0 0.255.255.255
rule 20 permit ip destination 172.16.0.0 0.15.255.255
rule 25 permit ip destination 192.168.0.0 0.0.255.255
rule 30 deny
#使用DHCP及option 43 為AP分配置地址並指定AC位置
ip pool vlan10
gateway-list 10.1.10.1
network 10.1.10.0 mask 255.255.255.0
excluded-ip-address 10.1.10.2 10.1.10.127
dns-list 10.254.1.100 8.8.8.8
option 43 sub-option 3 ascii 10.1.201.100

aaa
authentication-scheme default
authentication-scheme radius_huawei
authentication-mode radius
authorization-scheme default
accounting-scheme default
domain default
authentication-scheme radius_huawei
radius-server radius_huawei
domain default_admin
local-user ftp password simple ftp
local-user ftp privilege level 15
local-user ftp ftp-directory flash:/
local-user ftp service-type ftp
local-user admin password simple admin
local-user admin service-type http
#基礎配置
interface Vlanif10
ip address 10.1.10.100 255.255.255.0
dhcp select global

interface Vlanif11
ip address 10.1.11.100 255.255.255.0

interface Vlanif12
ip address 10.1.12.100 255.255.255.0
#建立訪客閘道器
interface Vlanif13
ip address 172.16.1.1 255.255.255.0
dhcp select interface
dhcp server excluded-ip-address 172.16.1.2 172.16.1.127
dhcp server dns-list 10.254.1.100 8.8.8.8
#AC的WLAN源地址
interface Vlanif801
ip address 10.1.201.100 255.255.255.0

interface Ethernet0/0/0
ip address 192.168.100.200 255.255.255.0

interface XGigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 to 13 801
#無線WLAN-ess介面屬性配置,ess2和ess3上配置有三層漫遊能力
interface Wlan-Ess0
port hybrid pvid vlan 13
port hybrid untagged vlan 13
dhcp enable

interface Wlan-Ess1
port hybrid pvid vlan 12
port hybrid untagged vlan 12
dhcp enable

interface Wlan-Ess2
port hybrid pvid vlan 11
port hybrid untagged vlan 10 to 11
dot1x-authentication enable
dot1x authentication-method eap
dhcp enable

interface Wlan-Ess3
port hybrid pvid vlan 10
port hybrid untagged vlan 10 to 11
dot1x-authentication enable
dot1x authentication-method eap
dhcp enable

interface NULL0
#靜態路由配置
ip route-static 0.0.0.0 0.0.0.0 10.1.201.1
#SNMP及telnet網管引數配置
snmp-agent
snmp-agent local-engineid 000007DB7FFFFFFF00006880
snmp-agent community read publicro
snmp-agent community write privaterw
snmp-agent sys-info version v2c v3
snmp-agent trap enable basetrap

user-interface con 0
user-interface vty 0 4
user privilege level 15
set authentication password simple huawei
user-interface vty 16 20

wlan
wlan ac source interface vlanif801
wlan ap lldp enable

AP域、AP認證、5G優先配置
ap-region id 101
ap-region-name floor1
deploy-mode densely-deploy
ap id 0 type-id 19 mac cccc-8110-2260 sn 210235448310C9000012
region-id 101
access priority 5g
ap id 1 type-id 19 mac cccc-8110-2280 sn 210235448310C9000013
region-id 101
access priority 5g
WMM(無線多媒體)模板配置
wmm-profile name wmm-prof-1 id 0
流量模板配置
traffic-profile name traffic-prof-1 id 0
安全模板配置
security-profile name security-prof-open1 id 0
security-profile name security-prof-wpapsk1 id 2
security-policy wpa
wpa authentication-method psk pass-phrase huaweipsk encryption-method ccmp
security-profile name security-prof-wpaeap1 id 3
security-policy wpa2
訪客服務集配置、開放認證
service-set name huawei-guest1 id 0
forward-mode tunnel
wlan-ess 0
ssid huawei-guest1
traffic-profile id 0
security-profile id 0
service-vlan 13
語音用服務集配置,WPA-PSK認證
service-set name huawei-voice1 id 1
forward-mode tunnel
wlan-ess 1
ssid huawei-voice1
undo user-isolate
traffic-profile id 0
security-profile id 2
service-vlan 12
僱員用服務集配置,dot1X PEAP認證,支援漫遊
service-set name huawei-employee1 id 2
forward-mode tunnel
wlan-ess 2
ssid huawei-employee1
undo user-isolate
traffic-profile id 0
security-profile id 3
service-vlan 11
service-set name huawei-employee1a id 3
forward-mode tunnel
wlan-ess 3
ssid huawei-employee1
undo user-isolate
traffic-profile id 0
security-profile id 3
service-vlan 10
802.11N射頻模板配置
radio-profile name radio0-prof-1 id 0
radio-type 80211bgn
channel-mode fixed
wmm-profile id 0
80211n guard-interval-mode short
radio-profile name radio1-prof-1 id 1
radio-type 80211an
channel-mode fixed
wmm-profile id 0
80211n guard-interval-mode short
802.11n手工通道指定及VAP配置
ap 0 radio 0
radio-profile id 0
channel 40MHz-plus 3
service-set id 0 wlan 1
service-set id 1 wlan 2
service-set id 2 wlan 3
ap 0 radio 1
radio-profile id 1
channel 40MHz-plus 149
service-set id 0 wlan 1
service-set id 1 wlan 2
service-set id 2 wlan 3
ap 1 radio 0
radio-profile id 0
channel 40MHz-plus 7
service-set id 0 wlan 1
service-set id 1 wlan 2
service-set id 3 wlan 3
ap 1 radio 1
radio-profile id 1
channel 40MHz-plus 157
service-set id 0 wlan 1
service-set id 1 wlan 2
service-set id 3 wlan 3
負載均衡配置
load-balance-group name huawei-lb2 id 0
associate-threshold 10
session gap 20
member ap-id 0 radio-id 0
member ap-id 1 radio-id 0
load-balance-group name huawei-lb5 id 1
associate-threshold 10
traffic gap 20
member ap-id 0 radio-id 1
member ap-id 1 radio-id 1
使用者黑名單配置
sta-blacklist 3c43-8ebe-0318
sta-blacklist 0019-7d98-ea29
sta-access-mode ap 0 blacklist
sta-access-mode ap 1 blacklist
#使用者組授權管理的使用者組配置
user-group admin
acl-id 3003
qos-profile qos-prof-admin1

user-group employee
acl-id 3002
qos-profile qos-prof-employee1
user-isolate inter-group

user-group guest
acl-id 3001
qos-profile qos-prof-guest1
user-isolate inter-group inner-group

return