topo图(仅作参考,本实验使用真实设备演示):
1、基础配置
神州数码默认登录账号密码均为:admin
创建相应VLAN,并开启三层接口
vlan10:业务vlan
vlan20:管理vlan
DCWS-6028(config)# int vlan 10
DCWS-6028(config-if-vlan10)# ip add 192.168.10.1 255.255.255.0
DCWS-6028(config-if-vlan10)# int vlan 100
DCWS-6028(config-if-vlan100)# ip add 100.1.1.1 255.255.255.0
端口配置为trunk类型、并标明本征VLAN
DCWS-6028(config-if-ethernet1/0/1)#switchport mode trunk
DCWS-6028(config-if-ethernet1/0/1)#switchport trunk allowed vlan 10;100
DCWS-6028(config-if-ethernet1/0/1)#switchport trunk native vlan 100
动态为AP和STA(移动设备)分配IP地址
分别为STA和AP创建DHCP地址池
DCWS-6028(config)#service dhcp
DCWS-6028(config)#ip dhcp pool ap
DCWS-6028(dhcp-ap-config)#network-address 100.1.1.0 255.255.255.0
DCWS-6028(dhcp-ap-config)#default-router 100.1.1.1
DCWS-6028(dhcp-ap-config)#dns-server 8.8.8.8
DCWS-6028(dhcp-ap-config)#q
DCWS-6028(config)#ip dhcp pool sta
DCWS-6028(dhcp-sta-config)#network-address 192.168.10.0 255.255.255.0
DCWS-6028(dhcp-sta-config)#default-router 192.168.10.1
DCWS-6028(dhcp-sta-config)#dns-server 1.1.1.1
到此步骤,查看AP是否获取到地址
2、进入无线配置
AC上无线功能默认是关闭的。
AC能够管理AP的前提是开启AC的无线功能开启无线功能的条件:AC上有合法的无线IP地址。
无线IP地址的来源:AC上面loopback接口或者UP的三层接口的IP地址。
无线IP地址的配置方式:动态选取和静态指定,动态选取的IP优先级高于静态指定的IP优先级(实际项目中建议选用静态指定)
AP注册到AC时,AC需要对AP进行认证。
主要认证方式:
MAC认证:通过检查AP的mac地址来决定AP是否能够注册到AC上。默认的认证方式。AC上面通过ap database来添加AP的mac地址。大规模部署时比较麻烦。
None:免认证,即AP自动注册,便于部署。推荐使用这种方式。
Pass-Phase认证:密码认证,AC和AP比对密码,密码一致时AP可以注册到AC上。AP需要做配置,使用不便,用的较少。
配置ap上线
DCWS-6028(config)#wireless
DCWS-6028(config-wireless)#no auto-ip-assign
DCWS-6028(config-wireless)#ap authentication none
DCWS-6028(config-wireless)#static-ip 100.1.1.1DCWS-6028(config-wireless)#discovery vlan-list 100
DCWS-6028(config-wireless)# no discovery vlan-list 1
Vlan1是默认加入vlan-list的,可以删除。
DCWS-6028(config-wireless)#enable
查看AC选取的无线IP地址
此时ap可以成功上线,查看AP是否上线
配置SSID、密码、及射频信号、vap
DCWS-6028(config-wireless)#network 20
DCWS-6028(config-network)#ssid test_sign
DCWS-6028(config-network)#security mode wpa-personal
DCWS-6028(config-network)#wpa key 12345678
DCWS-6028(config-network)#vlan 10 #业务vlan
DCWS-6028(config-wireless)#ap profile 1
DCWS-6028(config-ap-profile)#radio 1#radio 1对应AP上2.4Ghz工作频段,radio 2对应AP上5Ghz工作频段。
DCWS-6028(config-ap-profile-radio)#vap 1DCWS-6028(config-ap-profile-vap)#enable
DCWS-6028(config-ap-profile-vap)#network 20
DCWS-6028#wireless ap profile apply 1
All configurations will be send to the aps associated to this profile and associated clients on these aps will be disconnected. Are you sure you want to apply the profile configuration? [Y/N] y
AP Profile apply is in progress.
不论使用何种注册方式,AP要成功注册到AC上的前提是:AC的无线IP地址和AP的IP地址三层可达。即:AP的IP地址和AC的无线地址能够ping通。
更改全局或profile的配置,都要将profile下发一次
wireless ap profile apply X
X 表示 profile 序号,所有应用这个 profile 的 AP 都会更新配置。每次 AP 注册到 AC 上时, AC 会自动下发 profile 配置。