2023年12月11日发(作者:)
WLAN无线二层组网,旁挂AC
1.
在 WLAN 二层组网中,网络流量多选择直接通过交换机发往上层网络,无需经过 AC,适用于中小规模集中部署的 WLAN 网络。
2.仿真软件:ENSP
路由器:AR2220
核心交换机:S5700 (2个)
AC:6605
AP: 6050 (2个)
Sta: 无线设备
3.拓扑图
4.规划
SW1:
GE0/0/1 Access PVID: VLAN 30
GE0/0/2 Trunk PVID:1 Allow-pass: VLAN 10
GE0/0/3 Trunk PVID:1 Allow-pass: VLAN 10 20
SW2:
GE0/0/1 Trunk PVID:VLAN 10 Allow-pass: VLAN 10 20
GE0/0/2 Trunk PVID:VLAN 10 Allow-pass: VLAN 10 20
GE0/0/3 Trunk PVID:1 Allow-pass: VLAN 10 20
AC:
GE0/0/2 Trunk PVID:VLAN 1 Allow-pass: VLAN 10
IP地址:
R1 GE0/0/1 192.168.30.2/24
SW1 Vlanif 20 192.168.20.1/24 Vlanif 30192.168.30.1/24
A C Vlanif 10 192.168.10.1/24
5.配置过程;
步骤 1 配置网络互通
在设备上配置对应 VLAN 及接口类型,保证业务能够二层透传。
在 SW1 上创建 VLAN10、VLAN20 和 VLAN30。
```css
< Huawei >system-view
[Huawei]sysname SW1
[SW1]vlan batch 10 20 30
# 在 SW1 上根据表 3-1 对接口划分接口类型及放行对应 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 上根据表 3-1 对接口划分接口类型及放行对应 VLAN。
[SW2]interface GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]port trunk pvid vlan 10HCIA-WLAN
[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。
system-view
[AC6508]sysname AC
[AC]vlan batch 10
在 AC 上根据表 3-1 对接口划分接口类型及放行对应 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 192.168.20.1 24
[SW1-Vlanif20]quit
[SW1]interface Vlanif 30
[SW1-Vlanif30]ip address 192.168.30.2 24
[SW1-Vlanif30]quit
在 AC 上创建 Vlanif 10 并配置 IP 地址。
[AC]interface Vlanif 10
[AC-Vlanif10]ip address 192.168.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 192.168.30.2 24
[R1-GigabitEthernet0/0/1]quit
[R1]ip route-static 192.168.20.0 24 192.168.30.1
在 SW1 上使用 10.1.20.1 地址 Ping R1,测试通信成功。
步骤 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 源接口地址为 192.168.10.1。
[AC]capwap source ip-address 192.168.10.1
在 AC 上创建 AP 组 CTH。
[AC]wlan
[AC-wlan-view]ap-group name CTH
[AC-wlan-ap-group-CTH]quit
配置 AP 认证方式为不认证,并等待 AP 上线。
[AC-wlan-view]ap auth-mode no-auth
使用命令 display ap all 查询 AP 上线状态,发现两台 AP 均已上线。
[AC-wlan-view]display ap allInfo: This operation may take a few seconds. Please wait for a .
Total AP information:
nor : normal [2]
ID MAC Name Group IP Type State STA Uptime
0 00e0-fcc8-49a0 00e0-fcc8-49a0 default 192.168.10.253 AP4050DN-E nor 0 22S
1 00e0-fc08-7cb0 00e0-fc08-7cb0 default 192.168.10.161 AP4050DN-E nor 0 3S
将两台 AP 分别命名为 AP1 和 AP2,并加入 AP 组 CTH。
[AC-wlan-view]ap-id 0
[AC-wlan-ap-0]ap-name AP1
[AC-wlan-ap-0]ap-group CTH
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 CTH
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-wlan-view]display ap all
Info: This operation may take a few seconds. Please wait for a .
Total AP information:
nor : normal [2]
ID MAC Name Group IP Type State STA Uptime
0 00e0-fcc8-49a0 AP1 default 192.168.10.253 AP2050DN nor 0 11M:5S
1 00e0-fc08-7cb0 AP2 default 192.168.10.161 AP2050DN nor 0 10M:5S
Total: 2
为了防止非法 AP 接入该网络,需将 AP 认证方式切换成 mac 认证。
[AC-wlan-view]ap auth-mode mac-auth
步骤 3 配置 WLAN 业务
根据 WLAN 数据规划表,配置 SSID 模板、安全模板和 VAP 模板,保证 AP 正常释放出信
号,终端能够正常连接。
创建 SSID 模板 CTH,并设置 SSID 为 CTH。
[AC-wlan-view]ssid-profile name CTH
[AC-wlan-ssid-prof-CTH]ssid CTH
[AC-wlan-ssid-prof-CTH]quit
创建安全模板 CTH,并设置密码。[AC-wlan-view]security-profile name CTH
[AC-wlan-sec-prof-CTH]security wpa-wpa2 psk pass-phrase cth123123 aes
[AC-wlan-sec-prof-CTH]quit
创建 VAP 模板 CTH,并绑定 SSID 和安全模板,设置业务 VLAN 和转发方式。
[AC-wlan-view]vap-profile name CTH
[AC-wlan-vap-prof-CTH]ssid-profile CTH
[AC-wlan-vap-prof-CTH]security-profile CTH
[AC-wlan-vap-prof-CTH]service-vlan vlan-id 20
[AC-wlan-vap-prof-CTH]forward-mode direct-forward
[AC-wlan-vap-prof-CTH]quit
创建域管理模板 CTH,并设置国家码为 CN。
[AC-wlan-view]regulatory-domain-profile name CTH
[AC-wlan-regulate-domain-CTH]country-code CN
[AC-wlan-regulate-domain-CTH]quit
进入 AP 组 CTH,并绑定域管理模板 CTH 和 VAP 模板 CTH。
[AC-wlan-view]ap-group name CTH
[AC-wlan-ap-group-CTH]regulatory-domain-profile CTH
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-CTH]vap-profile CTH wlan 1 radio 0
[AC-wlan-ap-group-CTH]quit6.结果验证:
在sta上查看信号,ping R1路由器。
以上内容仅供个人学习参考!我也是做了好几次才成功的,期间可能会遇到不少问题,可以下面一起讨论。欢迎批评指正!


发布评论