1.进入交换机划分Vlan并且配置好每条链路

The device is running!
<Huawei>system-view 
[Huawei]sysname SW1
[SW1]vlan batch 100 101 
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk 
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 101 100 
[SW1-GigabitEthernet0/0/2]port trunk pvid vlan 101              ****##剥离标签****
[SW1-GigabitEthernet0/0/2]display this 
 port link-type trunk
 port trunk pvid vlan 101
 port trunk allow-pass vlan 100 to 101
#
return
[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 100 101 
[SW1-GigabitEthernet0/0/3]port trunk pvid vlan 101	
[SW1-GigabitEthernet0/0/3]display this 
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk pvid vlan 101
 port trunk allow-pass vlan 100 to 101 
#
return
[SW1-GigabitEthernet0/0/3]quit 
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk 
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101 
[SW1-GigabitEthernet0/0/1]quit 
[SW1]


————————————————

2.开启DHCP 服务,配置VlanIF

[SW1]dhcp enable 	                                ##开启DHCP服务
[SW1]interface Vlanif 100
[SW1-Vlanif100]ip address 10.10.100.1 22            ##绑定IP和子网掩码
[SW1-Vlanif100]
[SW1-Vlanif100]dhcp select interface                ## 设置DHCP地址池接口
[SW1-Vlanif100]dhcp server dns-list 114.114.114.114 223.5.5.5                ##配置DHCP域名解析服务器地址
[SW1-Vlanif100]qu	
[SW1-Vlanif100]quit 
[SW1]


3. 通过CAPWAP协议保证AP上线

The device is running!
[AC6005]sysname AC1
[AC1]vlan  batch  100 101
[AC1]dhcp enable 
[AC1]interface GigabitEthernet 0/0/1
[AC1-GigabitEthernet0/0/1]port link-type trunk 
[AC1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101
[AC1-GigabitEthernet0/0/1]display this 
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 100 to 101
#
return
[AC1-GigabitEthernet0/0/1]quit 
[AC1]interface Vlanif 101
[AC1-Vlanif101]ip address 172.16.101.1 24
[AC1-Vlanif101]dhcp select interface 
[AC1-Vlanif101]quit 
[AC1]wlan 
[AC1-wlan-view]ap-group name ap-group1                    ##创建ap-group1组
[AC1-wlan-ap-group-ap-group1]regulatory-domain-profile default           ##创建域管理模板并绑定到ap-group1中
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
[AC1-wlan-ap-group-ap-group1]quit 
[AC1-wlan-view]quit 
[AC1]capwap source interface Vlanif 101       ##通过capwap协议使AP与AC通信
[AC1-wlan-view]ap auth-mode mac-auth          ## 创建ap模板,指定AP认证模式为MAC地址认证。
[AC1-wlan-view]ap-id 0 ap-mac  00e0-fc46-1bf0         ##绑定ap的id和MAC地址,通过display arp 查询AP的MAC地址
[AC1-wlan-ap-0]ap-name area_1                         ##对ap-0 命名
[AC1-wlan-ap-0]ap-group ap-group1                     ##将ap-0 绑入ap-group1中
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
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC1-wlan-ap-0]quit 
[AC1-wlan-view]ap-id 1 ap-mac 00e0-fc9a-5350         ##绑定第二个ap的id和MAC地址
[AC1-wlan-ap-1]ap-name area_2                        ##对ap-1命名
[AC1-wlan-ap-1]ap-group ap-group1                    ##将ap-1绑入ap-group1中
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
Info: This operation may take a few seconds. Please wait for a moment.. done.	
[AC1-wlan-ap-1]quit 
[AC1-wlan-view]display ap all                        ##显示ap信息
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
fault: fault           [2]
--------------------------------------------------------------------------------
---
ID   MAC            Name   Group     IP Type            State STA Uptime
--------------------------------------------------------------------------------
---
0    00e0-fc46-1bf0 area_1 ap-group1 -  AP2050DN        fault 0   -
1    00e0-fc9a-5350 area_2 ap-group1 -  AP2050DN        fault 0   -
--------------------------------------------------------------------------------
---
Total: 2
[AC1-wlan-view]

AC与AP1通信,AP1自动获取AC网段的IP地址

 4.wlan的业务配置

a) 安全模板:配置WLAN安全策略,可以对无线终端进行身份验证,对用户的报文进行加密,保护WLAN网络和用户的安全。WLAN安全策略支持开放认证、WEP、WPA/WPA2-PSK、WPA/WPA2-802.1X、WAPI-PSK和WAPI-证书,在安全模板中选择其中一种进行配置。开放认证和WPA/WPA2-802.1X还需要和NAC一起配置,有效管理用户的接入。
b) SSID模板:SSID用来指定不同的无线网络。在STA上搜索可接入的无线网络时,显示出来的网络名称就是SSID。SSID模板主要用于配置WLAN网络的SSID名称,还可以配置其他功能,
c) VAP模板: 在VAP模板下配置各项参数,然后在AP组或AP中引用VAP模板,AP上就会生成VAP,VAP用来为STA提供无线接入服务。通过配置VAP模板下的参数,使AP实现为STA提供不同无线业务服务的能力。

[AC1-wlan-view]security-profile name Internet           ##创建安全模板
[AC1-wlan-sec-prof-Internet]security wpa-wpa2 psk pass-phrase a1234567 aes    ##设置认证方式和密码并进行加密
[AC1-wlan-sec-prof-Internet]quit 
[AC1-wlan-view]ssid-profile name Internet               ##创建ssid模板
[AC1-wlan-ssid-prof-Internet]ssid Internet
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-ssid-prof-Internet]quit 
[AC1-wlan-view]vap-profile name Internet               ##创建vap模板
[AC1-wlan-vap-prof-Internet]forward-mode direct-forward              ##配置vap模板下数据转发方式
[AC1-wlan-vap-prof-Internet]service-vlan vlan-id 100                 ##设置服务vlan id
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-vap-prof-Internet]security-profile Internet         ##绑定安全模板
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-vap-prof-Internet]ssid-profile Internet              ##绑定ssid模板
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-vap-prof-Internet]quit 
[AC1-wlan-view]ap-group name ap-group1                          ##进入ap-group1组

//不同ap组调用vap模板使用同一个ssid的话,wlan id可以一致 
//如果是使用不同ssid,wlan id 绝对不能一致
[AC1-wlan-ap-group-ap-group1]vap-profile Internet wlan 1 radio 0      ##启动2.4G信号(0)
Info: This operation may take a few seconds, please wait...done.
[AC1-wlan-ap-group-ap-group1]vap-profile Internet wlan 1 radio 1     ##启动5G信号(1)
Info: This operation may take a few seconds, please wait...done.
[AC1-wlan-ap-group-ap-group1]quit 
[AC1-wlan-view]display arp all 
IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE 
                                          VLAN/CEVLAN PVC                      
------------------------------------------------------------------------------
172.16.101.1    00e0-fcb3-31e4            I -         Vlanif101
172.16.101.106  00e0-fc9a-5350  12        D-0         GE0/0/1
                                           101/-
172.16.101.54   00e0-fc46-1bf0  11        D-0         GE0/0/1
                                           101/-
------------------------------------------------------------------------------
Total:3         Dynamic:2       Static:0     Interface:1    
[AC1-wlan-view]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

//当不同IP段的业务VLAN用同一个SSID时
//不同ap组调用vap模板使用同一个ssid的话,wlan id可以一致 
//如果是使用不同ssid,wlan id 绝对不能一致

开启无线通信

启动STA1输入无线密码连接WiFi:

 用STA1ping网关地址(10.10.100.1)

 

5.配置AC的图形界面 

[AC1]vlan batch 200
[AC1]interface GigabitEthernet 0/0/2
[AC1-GigabitEthernet0/0/2]port link-type access 
[AC1-GigabitEthernet0/0/2]port default vlan 200
[AC1-GigabitEthernet0/0/2]quit 
[AC1]interface Vlanif 200
[AC1-Vlanif200]ip address 192.168.100.10 24
[AC1-Vlanif200]quit 
[AC1]ping 192.168.100.1
  PING 192.168.100.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.100.1: bytes=56 Sequence=1 ttl=64 time=30 ms
    Reply from 192.168.100.1: bytes=56 Sequence=2 ttl=64 time=1 ms
    Reply from 192.168.100.1: bytes=56 Sequence=3 ttl=64 time=1 ms
    Reply from 192.168.100.1: bytes=56 Sequence=4 ttl=64 time=1 ms
    Reply from 192.168.100.1: bytes=56 Sequence=5 ttl=64 time=1 ms

  --- 192.168.100.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/6/30 ms
[AC1]http server enable                   ##启动HTTP服务
This operation will take several minutes, please wait...
Info: Succeeded in starting the HTTP server

在浏览器中输入http://192.168.100.10进入AC管理网页

用户名:admin
密码:admin@huawei.com

在这里插入图片描述

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐