AC直连式二层组网

实验相关知识点

什么是CAPWAP隧道

CAPWAP(无线接入点控制和配置协议):该协议定义了如何对AP进行管理、业务配置,即AC通过CAPWAP隧道来实现对AP的集中管理和控制。

功能:

AP对AC的自动发现。

AP和AC间的状态维护。

AC通过CAPWAP隧道对AP进行管理、业务配置下发。

当采用隧道转发模式是,AP将STA发出的数据通过CAPWAP隧道实现与AC之间的交互

CAPWAP隧道有两种转发方式:

直接转发、隧道转发

直接转发:用户的数据报文到达AP后,不经过CAPWAP的隧道封装而直接转发到上层网络。AC只对AP进行管理,业务数据都是由本地直接转发。

优势:数据流量不经过AC,AC负担小,万兆园区推荐方案

隧道转发:业务数据报文由AP统一封装后到达AC实现转发,AC不但进行对AP管理,还作为AP流量的转发中枢。

用户数据报文经过CAPWAP隧道封装后再由AC转发到上层网络。

优势:数据流量和管理流量全部经过AC,可以更容易对无线用户实施安全控制策略。

拓扑设计

该实验拓扑为AC直连式二层组网+隧道转发,适用于小型组网

AP和用户的网关都在AC上

所有流量都会先到达AC,再经由AC往上层网络

实验拓扑

wlan数据规划

管理vlan:负责传输通过CAPWAP隧道转发的报文,包括管理报文和通过CAPWAP隧道转发的业务数据报文。

业务vlan:负责传输业务数据报文。

DHCP服务器AC作为dhcp服务器为AP和用户(STA、cellphone1)分配IP地址,同时也作为它们的网关
AP的IP地址池 vlan100:172.16.100.2~172.16.100.254/24
用户(STA、cellphone1)vlan101:172.16.101.2~172.16.101.254/24
AC的源接口IP地址vlanif100 172.16.100.1/24
AP组 名称为ap-group1、引用模板(VAP模板、域管理模板)
域管理模板名称为domain1、国家码为cn
ssid模板名称为ssid-profile1、ssid名称为ssid1
安全模板                名称为security-profile1的安全模板,安全策略:WAP-WAP2+PSK+AES,密码是“admin123456”
VAP模板名称为vap-profile1,转发模式为隧道转发,业务vlan为vlan101,引用模板:名为ssid-prodile1的ssid模板跟安全模板security-profile1

实验配置

基础配置

直连AP的交换机端口配置为STP边缘端口,这样可以让AP快速的加入网络。

隧道转发方式下:管理vlan和业务vlan不能配置为同一个vlan,否则会导致mac地址漂移,报文转发出错,并且AP和AC之间只能放通管理vlan,不能放通业务vlan。

LSW1

system-view

sysname LSW1

vlan 100

#

interface GigabitEthernet0/0/1
 port link-type trunk
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 100
#

interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk pvid vlan 100
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 100
 stp edged-port enable

port-isolate enable group 1

AC

system-view

sysname AC

vlan batch 100 101

#

interface GigabitEthernet0/0/1
 port link-type trunk
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 100
#

配置DHCP服务

配置AC1作为DHCP服务器,以及配置管理vlan的IP地址,因为这是二层组网,不用配置option

配置基于全局地址池的DHCP服务器,其中,vlan100接口为AP提供IP地址,vlan101为用户业务提供IP地址。

interface Vlanif100
 ip address 172.16.100.1 255.255.255.0
 dhcp select interface
#
interface Vlanif101
 ip address 172.16.101.1 255.255.255.0
 dhcp select interface
#

配置AP上线

创建AP组,用于将相同配置的AP都加入同一个AP组中。如下:

[AC1]wlan                                                   #进入wlan视图

[AC1-wlan-view] ap-group name ap-group1                      #创建名为ap-group1的AP组

[AC1-wlan-ap-group-ap-group1] quit

#创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板

[AC1-wlan-view] regulatory-domain-profile name domain1        #创建名为domain1的域管理模板    

[AC1-wlan-regulate-domain-domain1]  country-code cn                                #配置AC的国家码为cn

[AC1-wlan-regulate-domain-domain1]  quit

[AC1-wlan-view] ap-gorup name ap-group1              #进入名为ap-group1的AP组

[AC1-wlan-ap-group-ap-group1] regulatory-domain-profile  domain1  #在AP组下引用域管理模板

Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continue?[Y/N]:y    

#警告:修改国家/地区代码将清除收音机的频道、电源和天线增益配置,并重置AP。继续?[是/否]:是

[AC1-wlan-ap-group-ap-group1] quit

[AC1-wlan-view] quit

[AC1] capwap source interface vlan 100      #配置AC源接口

#在AC1上离线导入AP,并将AP加入名为ap-group1的AP组中,AP的mac地址可用display interface gigabit Ethernet0/0/0查看,此实验中AP的mac地址是00e0-fcfd-3f80

[AC1] wlan

[AC1-wlan-view] ap auth-mode mac-auth   #缺省情况下是mac认证

[AC1-wlan-view] ap-id 1  ap-mac 00e0-fcfd-3f80    #AP ID号为1类型AP MAC地址是00e0-fcfd-3f80
[AC1-wlan-view] ap-name area1                               #设置AP名称为area1
[AC1-wlan-view] ap-group ap-group1  #将名为ap-group1的AP组配置运用到AP上

测试配置结果:

执行display ap all 查看AP上线情况,查看到AP的State状态为“nor"时,表示AP正常上线。

 配置wlan业务参数

创建名为security-profile1的安全模板,并配置安全策略,配置WAP-WAP2+PSK+AES的安全策略,密码是“admin123456”

[AC1 ]wlan 
[AC1-wlan-view] security-profile name security-profile1 

[AC1-wlan-sec-prof-security-profile1] security wpa-wpa2 psk pass-phrase admin123456 aes  

[AC1-wlan-sec-prof-security-profile1] quit

创建名为ssid-profile1的SSID模板,并配置SSID名称为ssid1

[AC1-wlan-view] ssid-profile name ssid-profile1 
[AC1-wlan-ssid-prof-ssid-profile1] ssid ssid1
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-ssid-prof-ssid-profile1] quit

配置名为vap-profile1的VAP模板,配置业务数据转发模式为隧道转发、业务vlan。并引用安全模板和ssid模板。

[AC1-wlan-view] vap-profile name vap-profile1 
[AC1-wlan-vap-prof-vap-profile1] forward-mode tunnel
Info: This operation may take a few seconds, please wait.done.


[AC1-wlan-vap-prof-vap-profile1] service-vlan vlan-id 101
Info: This operation may take a few seconds, please wait.done.


[AC1-wlan-vap-prof-vap-profile1] security-profile security-profile1
Info: This operation may take a few seconds, please wait.done.  


[AC1-wlan-vap-prof-vap-profile1] ssid-profile ssid-profile1
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-vap-prof-vap-profile1] quit
#

配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板vap-profile1的配置

[AC1-wlan-view] ap-group name ap-group1   
[AC1-wlan-ap-group-ap-group1] vap-profile vap-profile1 wlan 1 radio 0
Info: This operation may take a few seconds, please wait...done.
[AC1-wlan-ap-group-ap-group1] vap-profile vap-profile1 wlan 1 radio 1
Info: This operation may take a few seconds, please wait...done.
[AC1-wlan-ap-group-ap-group1] quit
[AC1-wlan-view]

实验结果验证

在两台终端设备上都可以成功获取到IP地址信息,也可以连通自己的IP地址网关。

 

配置命令

LSW1

system-view

sysname LSW1

vlan 100

#

interface GigabitEthernet0/0/1
 port link-type trunk
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 100
#

interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk pvid vlan 100
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 100
 stp edged-port enable

port-isolate enable group 1

AC1

system-view

sysname AC1

vlan batch 100 101

#

interface GigabitEthernet0/0/1
 port link-type trunk
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 100

quit

#

interface Vlanif100
 ip address 172.16.100.1 255.255.255.0
 dhcp select interface
#
interface Vlanif101
 ip address 172.16.101.1 255.255.255.0
 dhcp select interface
#

wlan                                                  

ap-group name ap-group1                   

 quit

 regulatory-domain-profile name domain1         

 country-code cn                            

 quit

 ap-gorup name ap-group1        

 regulatory-domain-profile  domain1 

Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continue?[Y/N]:y    

quit

 quit

capwap source interface vlan 100   

wlan

ap auth-mode mac-auth 

ap-id 1  ap-mac 00e0-fcfd-3f80    
ap-name area1                               
ap-group ap-group1

wlan 
security-profile name security-profile1 

security wpa-wpa2 psk pass-phrase admin123456 aes  

quit

ssid-profile name ssid-profile1 
ssid ssid1
 quit

vap-profile name vap-profile1 
forward-mode tunnel
service-vlan vlan-id 101
security-profile security-profile1
ssid-profile ssid-profile1
 quit

ap-group name ap-group1   
 vap-profile vap-profile1 wlan 1 radio 0
 vap-profile vap-profile1 wlan 1 radio 1
 quit
 

  • 4
    点赞
  • 82
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值