数据 |
配置 |
AP管理VLAN |
VLAN100 |
AP所在VLAN | VLAN10 |
STA业务VLAN |
VLAN101 |
与路由器互联接口 |
VLAN102:10.0.2.1/24 |
DHCP服务器 |
AC作为DHCP服务器为AP分配IP地址 汇聚交换机LSW1作为DHCP服务器为STA分配IP地址,STA的默认网关为10.0.1.1 |
AP的IP地址池 |
192.168.1.2~192.168.1.254/24 |
STA的IP地址池 |
10.0.1.2~10.0.1.254/24 |
AC的源接口IP地址 |
VLANIF100:192.168.100.254/24 |
AP组 |
名称:ap-group1;引用模板:VAP模板wlan-net、域管理模板 |
域管理模板 |
名称:default 国家码:中国 |
SSID模板 |
名称:wlan-net SSID名称:wlan-net |
安全模板 |
名称:wlan-net 安全策略:WPA-WPA2+PSK+AES 密码:a1234567 |
VAP模板 |
名称:wlan-net 转发模式:隧道转发 业务VLAN:VLAN101 引用模板:SSID模板wlan-net、安全模板wlan-net |
1.组网方式:三层组网
2.AC连接方式:旁挂式组网
3.AC作为DHCP服务器为AP分配IP地址
4.LSW1作为DHCP服务器为STA分配IP地址
5.业务数据转发方式:隧道转发
一、配置AP、AC和周边网络设备之间实现网络互通
二、配置AP上线。
1.创建AP组,用于将需要进行相同配置的AP都加入到AP组,实现统一配置。
2.配置AC的系统参数,包括国家码、AC与AP之间通信的源接口。
3.配置AP上线的认证方式并离线导入AP,实现AP正常上线。
三、配置WLAN业务参数,实现STA访问WLAN网络功能。
LSW1配置:
vlan batch 10 100 101 102
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
interface Vlanif100
ip address 192.168.100.1 255.255.255.0
interface Vlanif101
ip address 10.0.1.1 255.255.255.0
interface Vlanif102
ip address 10.0.2.1 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 100 to 101
interface GigabitEthernet0/0/4
port link-type trunk
port trunk pvid vlan 102
port trunk allow-pass vlan 102
LSW2配置:
vlan 10
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan 10
AC配置
vlan batch 100 to 101
interface Vlanif100
ip address 192.168.100.254 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100 to 101
R1配置
interface Ethernet0/0/0
ip address 10.0.2.2 255.255.255.0
ip route-static 0.0.0.0 0.0.0.0 10.0.2.1
AC配置
dhcp enable
ip pool ap
gateway-list 192.168.1.1
network 192.168.1.0 mask 255.255.255.0
option 43 sub-option 3 ascii 192.168.100.254
interface Vlanif100
dhcp select global
ip route-static 0.0.0.0 0 192.168.100.1
因为当AC与AP之间是三层网络时,AP无法通过广播方式发现AC,所以需要通过DHCP服务器上配置DHCP响应报文中携带的Option 43信息发现AC。
LSW1配置
dhcp enable
ip pool sta
gateway-list 10.0.1.1
network 10.0.1.0 mask 255.255.255.0
interface Vlanif10
dhcp select relay
dhcp relay server-ip 192.168.100.254
interface Vlanif101
dhcp select global
ip route-static 0.0.0.0 0 192.168.100.1
3.结果验证
AP由DHCP分配到了192.168.1.36的ip地址:
AP能与AC、R1通信
[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit
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. Continue?[Y/N]:y
[AC] capwap source interface vlanif 100
[AC] wlan
[AC-wlan-view] ap auth-mode mac-auth
[AC-wlan-view] ap-id 0 ap-mac 00e0-fc6e-1e80
[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 configurations of the radio, Whether to continue? [Y/N]:y
[AC-wlan-ap-0] quit
注:ap-mac可通过在AP上执行'dis interface Vlanif 1'查看,和本实验的mac地址是不一样的。
[AC-wlan-view] display ap all
Total AP information:
nor : normal [1]
Extra information:
P : insufficient power supply
-------------------------------------------------------------------------------------------------------------------------
ID MAC Name Group IP Type State STA Uptime ExtraInfo
-------------------------------------------------------------------------------------------------------------------------
0 00e0-fc6e-1e80 area_1 ap-group1 192.168.1.36 AP2050DN nor 0 12M:
57S-------------------------------------------------------------------------------------------------------------------------
Total: 1
[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
[AC-wlan-view] ssid-profile name wlan-net
[AC-wlan-ssid-prof-wlan-net] ssid wlan-net
[AC-wlan-ssid-prof-wlan-net] quit
[AC-wlan-view] vap-profile name wlan-net
[AC-wlan-vap-prof-wlan-net] forward-mode tunnel
[AC-wlan-vap-prof-wlan-net] service-vlan vlan-id 101
[AC-wlan-vap-prof-wlan-net] security-profile wlan-net
[AC-wlan-vap-prof-wlan-net] ssid-profile wlan-net
[AC-wlan-vap-prof-wlan-net] quit
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 0
[AC-wlan-ap-group-ap-group1] quit
WLAN业务配置会自动下发给AP,配置完成后,通过执行命令display vap ssid wlan-net查看如下信息,当“Status”项显示为“ON”时,表示AP对应的射频上的VAP已创建成功。
dis 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 00E0-FC6E-1E80 ON WPA/WPA2-PSK 0 wlan-net
-----------------------------------------------------------------------------
Total: 1
此时AP附近出现了无线信号圈
1.将STA获取ip地址的方式选为DHCP,点击应用。注意,在没有点击连接的时候,STA是无法自动获取到ip地址的。
2.双击vap列表的wlan,弹出输入密码界面,输入前面配置的密码:a1234567 。可以看到正在获取ip...到已连接的阶段。
3.通过ipconfig命令可以看到STA已获取ip地址 ,且能ping通路由器。
至此实验完成!