無線組網拓撲
實驗規劃:
根據現有場景,Agg1、Agg2 和 SW4 是 PoE 交換機,Core-SW 作為核心交換機,AR1 是出口路由器裝置,連接配接另一個園區網絡。
AP3、AP4 和 AP5 形成 Mesh 組網,PC2 能夠通過 AP5 通路其他園區網絡。
AP6 遠端被 WAC1 納管,為了保證網絡的安全性,AR2 與 WAC1 建立 IPSec 隧道。
VLAN 端口類型及參數設計
IP位址規劃
配置思路:
1.配置基礎網絡互通,保證裝置間的二層、三層互通。
2.配置總部 AP 上線。
3.配置總部 Mesh 網絡上線。
4.配置 WLAN 業務參數。
5.測試總部 WLAN 業務。
6.配置分支機構與總部互通。
7.配置分支 AP 在總部 WAC 上線。
8.測試分支 WLAN 業務。
具體配置步驟:
步驟1:配置二層網絡
核心交換機配置:
<Huawei>sys
sysname Core-SW
vlan batch 10 to 14 99
# 配置 Core-SW 端口類型及所屬 VLAN。
[Core-SW] interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 10 to 14
quit
#
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 10 to 14
quit
#
interface GigabitEthernet 0/0/3
port link-type trunk
port trunk allow-pass vlan 10 to 14
quit
#
interface GigabitEthernet 0/0/7
port link-type access
port default vlan 99
quit
Agg1配置:
sysname Agg1
vlan batch 10 to 14
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 10 to 14
quit
#
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan 10 to 14
quit
#
interface GigabitEthernet 0/0/3
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan 10 to 14
quit
Agg2配置:
sys
sysname Agg2
vlan batch 10 to 14
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 10 to 14
quit
#
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan 10 to 14
quit
SW4配置:
sys
sysname SW4
vlan batch 100 110 120 130 140 200
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 200
quit
#
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk pvid vlan 100
port trunk allow-pass vlan 10 to 14
quit
WAC1配置:
sys
sysname WAC1
vlan 10
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 10
quit
步驟2:配置接口IP位址
在 Core-SW 上配置 IP 位址
interface Vlanif 10
ip address 10.1.10.1 24
quit
#
interface Vlanif 11
ip address 10.1.11.1 24
quit
interface Vlanif 12
ip address 10.1.12.1 24
quit
interface Vlanif 13
ip address 10.1.13.1 24
quit
interface Vlanif 14
ip address 10.1.14.1 24
quit
interface Vlanif 99
ip address 10.1.99.1 30
quit
檢視core-sw上的IP位址display ip interface brief
WAC1 上配置 IP 位址
interface Vlanif 10
ip address 10.1.10.254 24
quit
interface LoopBack 0
ip address 10.10.10.10 32
quit
AR1 上配置 IP 位址:
interface GigabitEthernet 0/0/1
ip address 10.1.99.2 24
quit
interface GigabitEthernet 0/0/2
ip address 20.1.1.1 30
quit
AR2的配置:
sys
sys AR2
interface GigabitEthernet 0/0/1
undo portswitch
ip address 20.1.1.2 30
quit
interface GigabitEthernet 0/0/2
undo portswitch
ip address 10.1.200.1 30
quit
SW4的配置:
interface Vlanif 10
ip address 10.1.10.100 24
interface Vlanif 130
ip address 10.1.130.254 24
interface Vlanif 140
ip address 10.1.140.254 24
interface Vlanif 200
ip address 10.1.200.2 30
quit
步驟3:配置路由
#在 Core-SW 上配置 OSPF,宣告本地各網段。
[Core-SW] ospf 1
area 0
network 10.1.10.1 0.0.0.0
network 10.1.11.1 0.0.0.0
network 10.1.12.1 0.0.0.0
network 10.1.13.1 0.0.0.0
network 10.1.14.1 0.0.0.0
return
#在 WAC1 上配置 OSPF,宣告本地各網段。
[WAC1] ospf 1
area 0
network 10.10.10.10 0.0.0.0
network 10.1.10.254 0.0.0.0
AR1上配置OSPF
ospf 1
area 0
network 10.1.99.2 0.0.0.0
default-route-advertise always
quit
步驟4:檢視 WAC1 和 Core-SW 的路由表
步驟5:配置AP上線
在 Core-SW 上建立 AP 的 DHCP 位址池。
[Core-SW] dhcp enable
ip pool AP
network 10.1.10.0 mask 24
gateway-list 10.1.10.1
excluded-ip-address 10.1.10.254
option 43 sub-option 3 ascii 10.10.10.10
quit
在 Core-SW 上建立 HCIE-Lab 的 DHCP 位址池。
ip pool lab1
network 10.1.11.0 mask 24
gateway-list 10.1.11.1
quit
#
ip pool lab2
network 10.1.12.0 mask 24
gateway-list 10.1.12.1
quit
在 Core-SW 上建立 HCIE-Interview 的 DHCP 位址池。
ip pool interview1
network 10.1.13.0 mask 24
gateway-list 10.1.13.1
quit
ip pool interview2
network 10.1.14.0 mask 24
gateway-list 10.1.14.1
quit
在 Core-SW 接口下使能 DHCP 全局功能。
interface Vlanif 11
dhcp select global
interface Vlanif 12
dhcp select global
interface Vlanif 13
dhcp select global
interface Vlanif 14
dhcp select global
quit
檢視DHCP位址池
配置 VLAN Pool。
在 WAC1 上建立 HCIE-Lab 的 VLAN Pool。
[WAC1] vlan pool lab
vlan 11 12
quit
在 WAC 上建立 HCIE-Interview 的 VLAN Pool。
[WAC1] vlan pool interview
vlan 13 14
quit
配置 AP 上線模闆及參數。
在 WAC1 上配置 CAPWAP 源位址:capwap source interface LoopBack 0
在 WAC1 上建立域管理模闆,預設國家代碼是中國
wlan
regulatory-domain-profile name HCIE
country-code CN
quit
在 WAC1 上建立 AP 組,并綁定域管理模闆。
wlan
ap-group name HCIE
regulatory-domain-profile HCIE
quit
在 WAC1 上添加 AP 的 MAC 位址(MAC 位址請使用實際環境中的 AP MAC 位址)。
ap-mac 30fd-65f8-fd40
ap-name ap1
ap-group HCIE
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.
[WAC1-wlan-ap-0] quit
#
[WAC1-wlan-view] ap-mac f4de-af36-b300
[WAC1-wlan-ap-1] ap-name ap2
[WAC1-wlan-ap-1] ap-group HCIE
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.
[WAC1-wlan-ap-1] quit
#
[WAC1-wlan-view] ap-mac f02f-a75e-5740
[WAC1-wlan-ap-2] ap-name ap3
[WAC1-wlan-ap-2] ap-group HCIE
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.
[WAC1-wlan-ap-2] quit
檢視 AP 狀态<WAC1>display ap all
步驟 6 配置總部 AP 業務參數。
建立安全模闆,HCIE-Lab 和 HCIE-Interview 分别使用不同的密碼。
在 WAC1 上建立 HCIE-Lab 安全模闆。
security-profile name HCIE-Lab
security wpa2 psk pass-phrase HCIE-Lab aes
在 WAC1 上建立 HCIE-Interview 安全模闆。
security-profile name HCIE-Interview
security wpa2 psk pass-phrase HCIE-Interview aes
建立 SSID 模闆,HCIE-Lab 和 HCIE-Interview。
在 WAC1 上建立 HCIE-Lab 的 SSID 模闆。
ssid-profile name HCIE-Lab
ssid HCIE-Lab
在 WAC1 上建立 HCIE-Interview 的 SSID 模闆。
ssid-profile name HCIE-Interview
ssid HCIE-Interview
建立 VAP 模闆,HCIE-Lab 和 HCIE-Interview。
在 WAC1 上建立 HCIE-Lab 的 VAP 模闆。
vap-profile name HCIE-Lab
forward-mode direct-forward
service-vlan vlan-pool lab
security-profile HCIE-Lab
ssid-profile HCIE-Lab
quit
在 WAC1 上建立 HCIE-Interview 的 VAP 模闆。
vap-profile name HCIE-Interview
forward-mode direct-forward
service-vlan vlan-pool interview
security-profile HCIE-Interview
ssid-profile HCIE-Interview
将 VAP 模闆應用到 AP 組下。
在 WAC1 上應用 HCIE-Lab 和 HCIE-Interview 的 VAP 模闆。
ap-group name HCIE
vap-profile HCIE-Lab wlan 1 radio all
vap-profile HCIE-Interview wlan 2 radio all
quit
檢視 VAP 射頻情況。
在 WAC1 上檢視 VAP 射頻情況。
[WAC1-wlan-view] display vap all
步驟7:配置 Mesh 網絡上線。
建立 Mesh 網絡 AP 組。
在 WAC1 上建立 Mesh 網絡的 AP 組。
wlan
ap-group name HCIE-Mesh
Info: This operation may take a few seconds. Please wait for a moment.done.
regulatory-domain-profile HCIE
Warning: Modifying the country code will clear channel, power and antenna gain configurations of
the radio and reset the AP. Continue? [Y/N]: Y
quit
将 AP4、AP5 加入 Mesh 網絡 AP 組。
ap-mac 28a6-dbe1-c300
ap-name ap4
ap-group HCIE-Mesh
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.
quit
ap-mac f02f-a75e-5dc0
ap-name ap5
ap-group HCIE-Mesh
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
配置 Mesh 業務參數。
配置 Mesh 節點使用的主要射頻參數,“coverage distance”參數為射頻覆寫距離,預設情況下是 3,機關是 100m。
wlan
ap-group name HCIE
radio 1
channel 40mhz-plus 149
Warning: This action may cause service interruption. Continue? [Y/N] y
coverage distance 1
quit
[WAC1-wlan-view] ap-group name HCIE-Mesh
radio 1
channel 40mhz-plus 157
Warning: This action may cause service interruption. Continue? [Y/N] y
coverage distance 1
return
配置 Mesh 白名單。
mesh-whitelist-profile name HCIE-Mesh
peer-ap mac f02f-a75e-5740
peer-ap mac 28a6-dbe1-c300
peer-ap mac f02f-a75e-5dc0
配置在 AP 射頻下引用 Mesh 白名單模闆。
ap-group name HCIE
radio 1
mesh-whitelist-profile HCIE-Mesh
return
#
ap-group name HCIE-Mesh
radio 1
mesh-whitelist-profile HCIE-Mesh
配置 Mesh 鍊路使用的安全模闆。
security-profile name HCIE-Mesh
security wpa2 psk pass-phrase HCIE-Mesh aes
配置 Mesh 模闆。配置 Mesh 網絡的 ID 為“HCIE-Mesh”,Mesh 鍊路老化時間為 30 秒,
并引用安全模闆和 Mesh 白名單。
mesh-profile name HCIE-Mesh
mesh-id HCIE-Mesh
link-aging-time 30
security-profile HCIE-Mesh
配置 Mesh 角色。配置 AP3 的 Mesh 角色為“Mesh-portal”,預設情況下 Mesh 角色為
“Mesh-node”,AP4、AP5 的角色為“Mesh-node”,可以使用預設配置。Mesh 角色是通過
AP 系統模闆配置的。
ap-system-profile name HCIE-Mesh
mesh-role mesh-portal
在 AP 組引用相關模闆,使 Mesh 業務生效。
配置 AP 組 HCIE 引用 AP 系統模闆 HCIE-Mesh。
ap-group name HCIE
ap-system-profile HCIE-Mesh
Warning: This action may cause service interruption. Continue? [Y/N] Y
配置 AP 組 HCIE 引用 Mesh 模闆,使 Mesh 業務生效。
[WAC1-wlan-ap-group-HCIE] mesh-profile HCIE-Mesh radio 1
#
[WAC1-wlan-view] ap-group name HCIE-Mesh
[WAC1-wlan-ap-group-HCIE-Mesh] mesh-profile HCIE-Mesh radio 1
Info: This operation may take a few seconds, please wait.done.
[WAC1-wlan-ap-group-HCIE-Mesh] quit
驗證 Mesh 業務配置結果
Mesh 業務生效後,執行指令 display mesh vap all,檢視所有 Mesh 型 VAP 的資訊。
執行指令 display wlan mesh link all,檢視 Mesh 鍊路相關資訊。
步驟8:配置分支機構與總部通過 GRE Over IPSec 隧道互通
配置 WAC1 與 AR2 路由互通。
在 AR1 上配置靜态路由:[AR1] ip route-static 0.0.0.0 0.0.0.0 20.1.1.2
在 AR2 上配置靜态路由:[AR2] ip route-static 10.1.10.0 255.255.255.0 20.1.1.1
驗證 WAC1 和 AR2 路由互通。
<WAC1> ping 10.1.200.1
PING 10.1.200.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.200.1: bytes=56 Sequence=1 ttl=253 time=2 ms
Reply from 10.1.200.1: bytes=56 Sequence=2 ttl=253 time=1 ms
Reply from 10.1.200.1: bytes=56 Sequence=3 ttl=253 time=5 ms
Reply from 10.1.200.1: bytes=56 Sequence=4 ttl=253 time=1 ms
Reply from 10.1.200.1: bytes=56 Sequence=5 ttl=253 time=2 ms
[AR2] ping 10.1.10.254
PING 10.1.10.254: 56 data bytes, press CTRL_C to break
Reply from 10.1.10.254: bytes=56 Sequence=1 ttl=253 time=1 ms
Reply from 10.1.10.254: bytes=56 Sequence=2 ttl=253 time=1 ms
Reply from 10.1.10.254: bytes=56 Sequence=3 ttl=253 time=1 ms
Reply from 10.1.10.254: bytes=56 Sequence=4 ttl=253 time=1 ms
Reply from 10.1.10.254: bytes=56 Sequence=5 ttl=253 time=1 ms
配置 GRE Tunnel 接口
在 WAC1 上配置 Tunnel 接口。
interface Tunnel 0/0/0
ip address 192.168.2.1 255.255.255.0
tunnel-protocol gre
source 10.1.10.254
destination 10.1.200.1
在 AR2 上配置 Tunnel 接口。
interface Tunnel 0/0/0
ip address 192.168.2.2 255.255.255.0
tunnel-protocol gre
source 10.1.200.1
destination 10.1.10.254
驗證 GRE 隧道成功建立。
在檢視 Tunnel 0/0/0 口的狀态,且隧道兩端可以互通,說明 GRE 隧道建立成功。
<WAC1> display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
……
Interface IP Address/Mask Physical Protocol
LoopBack0 10.10.10.10/32 up up(s)
Tunnel0/0/0 192.168.2.1/24 up up
Vlanif10 10.1.10.254/24 up up
<WAC1> ping 192.168.2.2
PING 192.168.2.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.2: bytes=56 Sequence=1 ttl=255 time=4 ms
Reply from 192.168.2.2: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 192.168.2.2: bytes=56 Sequence=3 ttl=255 time=2 ms
Reply from 192.168.2.2: bytes=56 Sequence=4 ttl=255 time=5 ms
Reply from 192.168.2.2: bytes=56 Sequence=5 ttl=255 time=5 ms
建立 IPSec 安全提議。
在 WAC1 上配置 IPSec 安全提議。
ipsec proposal HCIE
esp authentication-algorithm sha2-256
esp encryption-algorithm aes-128
在 AR2 上配置 IPSec 安全提議。
ipsec proposal HCIE
esp authentication-algorithm sha2-256
esp encryption-algorithm aes-128
配置 IKE 對等體。
在 WAC1 上配置 IKE 安全提議。
ike proposal 1
authentication-algorithm sha2-256
encryption-algorithm aes-128
dh group14
quit
在 WAC1 上配置 IKE 對等體。
ike peer HCIE
undo version 2
pre-shared-key cipher Huawei@123
ike-proposal 1
quit
在 AR2 上配置 IKE 安全提議。
ike proposal 1
authentication-algorithm sha2-256
encryption-algorithm aes-128
dh group14
quit
在 AR2 上配置 IKE 對等體。
ike peer HCIE
undo version 2
pre-shared-key cipher Huawei@123
ike-proposal 1
quit
建立安全架構。
在 WAC1 上配置安全架構。
ipsec profile HCIE
ike-peer HCIE
proposal HCIE
quit
在 AR2 上配置安全架構。
ipsec profile HCIE
ike-peer HCIE
proposal HCIE
quit
在 Tunnel0/0/0 口上應用各自的安全架構,使接口具有 IPSec 的保護功能。
在 WAC1 的接口上引用安全架構。
interface tunnel 0/0/0
ipsec profile HCIE
quit
在 AR2 的接口上引用安全架構。
interface tunnel 0/0/0
ipsec profile HCIE
quit
配置 ACL,定義需要 IPSec 隧道保護的資料流。
在 WAC1 上配置 Tunnel 接口的轉發路由:
ip route-static 10.1.200.0 255.255.255.0 tunnel 0/0/0
在 AR2 上配置 Tunnel 接口的轉發路由。
ip route-static 10.1.10.0 255.255.255.0 tunnel 0/0/0
配置成功後,分别在 WAC1 和 AR2 上執行 display ike sa 會顯示所配置的資訊
步驟9:配置分支 AP 在總部 AC 上線。
在 SW4 上建立 DHCP 位址池。
在 SW4 上建立分支 AP 和業務的 DHCP 位址池。
ip pool ap
gateway-list 192.168.100.1
network 192.168.100.0 mask 255.255.255.0
option 43 sub-option 3 ascii 10.10.10.10
quit
#
ip pool HCIE-Lab
gateway-list 192.168.110.1
network 192.168.110.0 mask 255.255.255.0
quit
#
ip pool HCIE-Interview
gateway-list 192.168.110.1
network 192.168.110.0 mask 255.255.255.0
quit
#
interface Vlanif 100
dhcp select global
quit
#
interface Vlanif 110
dhcp select global
quit
#
interface Vlanif 120
dhcp select global
quit
确認 AP 是否正常擷取到 IP 位址。
在 SW4 上檢視 DHCP 位址池配置設定情況,發現 AP6 已經擷取到 IP 位址。
[SW4] display ip pool name ap used
在 WAC1 建立 AP 組 HCIE-Bran,并将 AP6 綁定到該組。
[WAC1-wlan-view] ap-group name HCIE-Bran
[WAC1-wlan-ap-group-HCIE-Bran] regulatory-domain-profile HCIE
Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continue? [Y/N]:Y
[WAC1-wlan-ap-group-HCIE-Bran]quit
[WAC1-wlan-view] ap-mac f4de-af36-ace0
[WAC1-wlan-ap-5] ap-name ap6
[WAC1-wlan-ap-5] ap-group HCIE-Bran
檢視 AP 狀态,AP 已正常上線。
[WAC1]display ap all
Total AP information:
Idle : idle [1]
Nor : normal [5]
ExtraInfo : Extra information
P : insufficient power supply
-----------------------------------------------------------------------------------------------------------------------
ID MAC Name Group IP Type State STA Uptime
ExtraInfo
-----------------------------------------------------------------------------------------------------------------------
0 30fd-65f8-fd40 ap1 HCIE 10.1.10.62 AP7060DN nor 0 19M:24S
P
1 f4de-af36-b300 ap2 HCIE 10.1.10.114 AirEngine5760nor 0 15H:22M:42S
-
2 f02f-a75e-5740 ap3 HCIE 10.1.10.196 AP4030DN nor 0 15H:22M:33S
-
3 28a6-dbe1-c300 ap4 HCIE-Mesh 10.1.10.240 AP4030DN nor 0 15H:20M:17S
-
4 f02f-a75e-5dc0 ap5 HCIE-Mesh 10.1.10.198 AP4030DN nor 0 15H:19M:54S
-
5 f4de-af36-ace0 ap6 HCIE-Bran 192.168.100.72 AirEngine5760 nor 0 00H:01M:51S
-
------------------------------------------------------------------------------------------------------------------------
-
Total: 6