WLAN 二层旁挂组网实验

实验介绍

关于本实验

WLAN 二层组网中,网络流量多选择直接通过交换机发往上层网络,无需经过 AC ,适用于
中小规模集中部署的 WLAN 网络。

实验目的

  • 理解二层组网方式。
  • 理解旁挂式组网优点。
  • 掌握 WLAN 业务配置。

实验组网介绍

 实验规划

本实验使用二层旁挂组网方式,要求 AP 网关在 AC 上,用户网关部署在交换机 SW1 上,两
AP 同时能覆盖 PC1 ,要求用户流量不经过 AC
VLAN 端口类型及参数设计

 

IP 地址规划

 

WLAN 数据规划

 实验任务配置

配置思路

配置步骤 

步骤 1 配置网络互通

在设备上配置对应 VLAN 及接口类型,保证业务能够二层透传。
# SW1 上创建 VLAN10 VLAN20 VLAN30
<Huawei>system-view
[Huawei]sysname SW1
[SW1]vlan batch 10 20 30
# SW1 上根据VLAN 端口类型及参数设计表 对接口划分接口类型及放行对应 VLAN
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 30
[SW1-GigabitEthernet0/0/1]quit
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[SW1-GigabitEthernet0/0/2]quit
[SW1]interface GigabitEthernet 0/0/3
[SW1-GigabitEthernet0/0/3]port link-type trunk
[SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[SW1-GigabitEthernet0/0/3]quit
# SW2 上创建 VLAN10 VLAN20
<Huawei>system-view
[Huawei]sysname SW2
[SW2]vlan batch 10 20
# SW2 上根据VLAN 端口类型及参数设计表 对接口划分接口类型及放行对应 VLAN
[SW2]interface GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]port trunk pvid vlan 10
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[SW2-GigabitEthernet0/0/1]quit
[SW2]interface GigabitEthernet 0/0/2
[SW2-GigabitEthernet0/0/2]port link-type trunk
[SW2-GigabitEthernet0/0/2]port trunk pvid vlan 10
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
[SW2-GigabitEthernet0/0/2]quit
[SW2]interface GigabitEthernet 0/0/3
[SW2-GigabitEthernet0/0/3]port link-type trunk
[SW2-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[SW2-GigabitEthernet0/0/3]quit

 # AC 上创建 VLAN10

<AC6508>system-view 
[AC6508]sysname AC
[AC]vlan batch 10
# AC 上根据VLAN 端口类型及参数设计表接口划分接口类型及放行对应 VLAN
[AC]interface GigabitEthernet 0/0/2
[AC-GigabitEthernet0/0/2]port link-type trunk
[AC-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[AC-GigabitEthernet0/0/2]quit
在设备上配置对应 IP 地址和路由信息,保证网络互通。
# SW1 上创建 Vlanif 20 Vlanif 30 并配置 IP 地址。
[SW1]interface Vlanif 20
[SW1-Vlanif20]ip address 10.1.20.1 24
[SW1-Vlanif20]quit
[SW1]interface Vlanif 30
[SW1-Vlanif30]ip address 10.1.30.2 24
[SW1-Vlanif30]quit
# AC 上创建 Vlanif 10 并配置 IP 地址。
[AC]interface Vlanif 10
[AC-Vlanif10]ip address 10.1.10.1 24
[AC-Vlanif10]quit
# R1 上配置接口 IP 并写一条目的地为用户网段的静态路由。
<Huawei>system-view
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.1.30.1 24
[R1-GigabitEthernet0/0/1]quit
[R1]ip route-static 10.1.20.0 24 10.1.30.2
# SW1 上使用 10.1.20.1 地址 Ping R1 ,测试通信成功。
[SW1]ping -a 10.1.20.1 10.1.30.1
  PING 10.1.30.1: 56  data bytes, press CTRL_C to break
    Reply from 10.1.30.1: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 10.1.30.1: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 10.1.30.1: bytes=56 Sequence=3 ttl=255 time=40 ms
    Reply from 10.1.30.1: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 10.1.30.1: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 10.1.30.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/32/40 ms

步骤 2 配置 AP 上线

配置 DHCP 服务器,保证用户和 AP 能够正常获取 IP 地址。
# SW1 上使能 DHCP 功能后配置接口地址池。
[SW1]dhcp enable
[SW1]interface Vlanif 20
[SW1-Vlanif20]dhcp select interface 
[SW1-Vlanif20]quit
# AC 上使能 DHCP 功能后配置接口地址池。
[AC]dhcp enable
[AC]interface Vlanif 10
[AC-Vlanif10]dhcp select interface
[AC-Vlanif10]quit
配置 AC 源接口地址并选择合适的 AP 认证方式使 AP 正常上线。
# 配置 AC 源接口地址为 10.1.10.1
[AC]capwap source ip-address 10.1.10.1
# AC 上创建 AP Huawei
[AC]wlan 
[AC-wlan-view]ap-group name Huawei
[AC-wlan-ap-group-Huawei]quit
# 配置 AP 认证方式为不认证,并等待 AP 上线。
[AC-wlan-view]ap auth-mode no-auth
# 使用命令 display ap all 查询 AP 上线状态,发现两台 AP 均已上线。
[AC]display ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor  : normal          [2]
--------------------------------------------------------------------------------
------------------
ID   MAC            Name           Group   IP          Type            State STA
 Uptime
--------------------------------------------------------------------------------
------------------
0    00e0-fc06-04e0 00e0-fc06-04e0 default 10.1.10.109 AP6050DN        nor   0  
 12S
1    00e0-fcf5-2700 00e0-fcf5-2700 default 10.1.10.46  AP6050DN        nor   0  
 6S
--------------------------------------------------------------------------------
------------------
# 将两台 AP 分别命名为 AP1 AP2 ,并加入 AP Huawei
[AC-wlan-view]ap-id 0
[AC-wlan-ap-0]ap-name AP1
[AC-wlan-ap-0]ap-group Huawei
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 c
ontinue? [Y/N]:y
[AC-wlan-ap-0]quit
[AC-wlan-view]ap-id 1
[AC-wlan-ap-1]ap-name AP2
[AC-wlan-ap-1]ap-group Huawei
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 c
ontinue? [Y/N]:y
[AC-wlan-ap-1]quit
# 再次使用 display ap all 命令查询配置是否生效,发现配置已经生效。
[AC]dis ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor  : normal          [2]
--------------------------------------------------------------------------------
-------
ID   MAC            Name Group  IP          Type            State STA Uptime
--------------------------------------------------------------------------------
-------
0    00e0-fc06-04e0 AP1  Huawei 10.1.10.109 AP6050DN        nor   0   43S
1    00e0-fcf5-2700 AP2  Huawei 10.1.10.46  AP6050DN        nor   0   6S
--------------------------------------------------------------------------------
-------
Total: 2
# 为了防止非法 AP 接入该网络,需将 AP 认证方式切换成 mac 认证。
[AC-wlan-view]ap auth-mode mac-auth

步骤 3 配置 WLAN 业务

根据 WLAN 数据规划表,配置 SSID 模板、安全模板和 VAP 模板,保证 AP 正常释放出信
号,终端能够正常连接。
# 创建 SSID 模板 Huawei ,并设置 SSID Huawei
[AC-wlan-view]ssid-profile name Huawei
[AC-wlan-ssid-prof-Huawei]ssid Huawei
[AC-wlan-ssid-prof-Huawei]quit
# 创建安全模板 Huawei ,并设置密码。
[AC-wlan-view]security-profile name Huawei
[AC-wlan-sec-prof-Huawei]security wpa-wpa2 psk pass-phrase a1234567 aes
[AC-wlan-sec-prof-Huawei]quit
# 创建 VAP 模板 Huawei ,并绑定 SSID 和安全模板,设置业务 VLAN 和转发方式。
[AC-wlan-view]vap-profile name Huawei
[AC-wlan-vap-prof-Huawei]ssid-profile Huawei
[AC-wlan-vap-prof-Huawei]security-profile Huawei
[AC-wlan-vap-prof-Huawei]service-vlan vlan-id 20
[AC-wlan-vap-prof-Huawei]forward-mode direct-forward 
[AC-wlan-vap-prof-Huawei]quit
# 创建域管理模板 Huawei ,并设置国家码为 CN
[AC-wlan-view]regulatory-domain-profile name Huawei
[AC-wlan-regulate-domain-Huawei]country-code CN
[AC-wlan-regulate-domain-Huawei]quit
# 进入 AP Huawei ,并绑定域管理模板 Huawei VAP 模板 Huawei
[AC-wlan-view]ap-group name Huawei
[AC-wlan-ap-group-Huawei]regulatory-domain-profile Huawei
Warning: Modifying the country code will clear channel, power and antenna gain c
onfigurations of the radio and reset the AP. Continue?[Y/N]:y
[AC-wlan-ap-group-Huawei]vap-profile Huawei wlan 1 radio all
[AC-wlan-ap-group-Huawei]quit

结果验证

查看 AP 是否放出信号

# AC 上使用命令 display vap ssid Huawei 查询,发现两台 AP 均已放出双频信号。
[AC]display vap ssid Huawei
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     AP1     0    1    00E0-FC06-04E0 ON      WPA/WPA2-PSK  0     Huawei
0     AP1     1    1    00E0-FC06-04F0 ON      WPA/WPA2-PSK  0     Huawei
1     AP2     0    1    00E0-FCF5-2700 ON      WPA/WPA2-PSK  0     Huawei
1     AP2     1    1    00E0-FCF5-2710 ON      WPA/WPA2-PSK  0     Huawei
---------------------------------------------------------------------------
Total: 4

测试用户连接和网络连通性

# 使用终端连接 AP ,并去 Ping 路由器 R1 测试连通性。
STA>ping 10.1.30.1

Ping 10.1.30.1: 32 data bytes, Press Ctrl_C to break
From 10.1.30.1: bytes=32 seq=1 ttl=254 time=157 ms
From 10.1.30.1: bytes=32 seq=2 ttl=254 time=157 ms
From 10.1.30.1: bytes=32 seq=3 ttl=254 time=156 ms
From 10.1.30.1: bytes=32 seq=4 ttl=254 time=157 ms
From 10.1.30.1: bytes=32 seq=5 ttl=254 time=156 ms

--- 10.1.30.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 156/156/157 ms

配置参考

SW1 的配置

#
sysname SW1
#
vlan batch 10 20 30
#
dhcp enable
#
interface Vlanif20
ip address 10.1.20.1 255.255.255.0
dhcp select interface
#
interface Vlanif30
ip address 10.1.30.2 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
#
return

SW2 的配置

#
sysname SW2
#
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
return

AC 的配置

#
sysname AC
#
vlan batch 10
#
dhcp enable
#
interface Vlanif10
ip address 10.1.10.1 255.255.255.0
dhcp select interface
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
capwap source ip-address 10.1.10.1
#
wlan
security-profile name Huawei
 security wpa-wpa2 psk pass-phrase %^%#6z\~7+HUhK[FjBC!)3gUEvFu>@],Y)]H))N.RiI@
%^%# aes
ssid-profile name Huawei
 ssid Huawei
vap-profile name Huawei
 service-vlan vlan-id 20
 ssid-profile Huawei
 security-profile Huawei
regulatory-domain-profile name Huawei
ap-group name Huawei
regulatory-domain-profile Huawei
 radio 0
 vap-profile Huawei wlan 1
 radio 1
 vap-profile Huawei wlan 1
 radio 2
 vap-profile Huawei wlan 1
ap-id 0 type-id 61 ap-mac 00e0-fc1f-4ee0 ap-sn 210235448310CE11E816
 ap-name AP1
 ap-group Huawei
ap-id 1 type-id 61 ap-mac 00e0-fc54-64a0 ap-sn 21023544831065281D1F
 ap-name AP2
 ap-group Huawei
#
return

R1 的配置

#
sysname R1
#
interface GigabitEthernet0/0/1
ip address 10.1.30.1 255.255.255.0 
#
ip route-static 10.1.20.0 255.255.255.0 10.1.30.2
#
return

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

tjjingpan

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值