0
点赞
收藏
分享

微信扫一扫

WLAN实验-旁挂三层组网隧道转发

爱情锦囊 2022-03-20 阅读 60

实验拓扑:

 

业务需求:

1.组网方式:二层组网

2.业务数据转发方式:隧道转发

3.AC作为DHCP服务器为AP分配IP地址

4.LSW1作为DHCP服务器为STA分配IP地址

5.业务数据转发方式:隧道转发

配置思路:

一、配置AP、AC和周边网络设备之间实现网络互通

二、配置AP上线。

1.创建AP组,用于将需要进行相同配置的AP都加入到AP组,实现统一配置。

2.配置AC的系统参数,包括国家码、ACAP之间通信的源接口。

3.配置AP上线的认证方式并离线导入AP,实现AP正常上线。

三、配置WLAN业务参数,实现STA访问WLAN网络功能。

配置步骤:

一.配置AP、AC和周边网络设备之间实现网络互通

1.LSW1、LSW2、AC创建对应VLAN及接口

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

2.DHCP配置

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

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通信

 

 

二.配置AP上线

1.在AC上创建AP组

[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit

2.创建域管理模板,并配置AC的国家码。

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 

3.配置AC的源接口。

[AC] capwap source interface vlanif 100

4、在AC上离线导入AP

[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地址是不一样的。

5.查看AP上线

此时AP附近出现了无线信号圈

 

三、配置WLAN业务参数,实现STA访问WLAN网络功能。

1、创建名为“wlan-net”的安全模板,并配置安全策略。

[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

2、创建名为“wlan-net”SSID模板,并配置SSID名称为“wlan-net”

[AC-wlan-view] ssid-profile name wlan-net
[AC-wlan-ssid-prof-wlan-net] ssid wlan-net
[AC-wlan-ssid-prof-wlan-net] quit

3、创建名为“wlan-net”VAP模板,配置业务数据转发模式、业务VLAN,并且引用安全模板和SSID模板。

[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

4、配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板“wlan-net”的配置。

[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

5、查看VAP模板信息

WLAN业务配置会自动下发给AP,配置完成后,通过执行命令display vap ssid wlan-net查看如下信息,当“Status”项显示为“ON”时,表示AP对应的射频上的VAP已创建成功。

结果验证 :

1.将STA获取ip地址的方式选为DHCP,点击应用。注意,在没有点击连接的时候,STA是无法自动获取到ip地址的。

2.双击vap列表的wlan,弹出输入密码界面,输入前面配置的密码:a1234567 。可以看到正在获取ip...到已连接的阶段。

3.通过ipconfig命令可以看到STA已获取ip地址 ,且能ping通路由器。

 至此实验完成!

举报

相关推荐

0 条评论