实验拓扑
ac发现机制:ap会先发出二层广播报文来试图发现ac,若30s内没有ac应答则会启用三层发现机制,从dchp server的option 43字段获取ac的ip地址,或从option 15字段获取ac的域名。
三层组网的主要问题就在于ap如何发现ac,三层组网下ac无法对ap的广播报文进行响应导致capwap隧道无法建立,此时只需要在管理dhcp server中指明ac的ip地址,并配置ac到ap的静态路由即可,其余配置和二层组网模式并没有什么差别。
1.基本配置:
AR1:
int g0/0/1
ip add 192.168.100.1 24
LSW1:
vlan batch 10 100 200
int g0/0/1
p l a #port link-type access缩写,trunk同理
p d v 100
int g0/0/2
p l t
p t v 100 200
int g0/0/3
p l t
p t a v 10 100
int vlan 10
ip address 192.168.10.254 24
int vlan 100
ip add 192.168.100.254 24
int vlan 200
ip add 192.168.200.1 24
AC1:
vlan batch 100 200 #vlan100必须创建,否则后续sta无法获得地址
int g0/0/1
p l t
p t a v 100 200
int vlan 200
ip add 192.168.200.2 24
LSW3:
int eth0/0/1
p l t
p t a v 10 100
int eth0/0/2
p l t
p t a v 10 100
p t p v 10
2.配置dhcp服务
LSW1:
dhcp enble
ip pool gl
network 192.168.10.0 mask 24
gateway-list 192.168.10.254
option 43 sub-option 3 ascii 192.168.200.2
int vlan 10
dhcp select global
int vlan 100
dhcp select interface
在ac上添加一条访问ap的静态路由,此时除了ap因为trunk放行原因无法访问ar1外全网互通
ip route-static 192.168.10.0 24 192.168.200.1
3.ap上线
capwap source interface vlanif 200
wlan
ap-group name yw
ap auth-mode mac-auth
ap-id 0 ap-mac xxxx-xxxx-xxxx
ap-name test1
ap-group yw
dis ap all查看ap状体为nor,以上线
4.配置wlan参数
security-profile name yw
security wpa-wpa2 psk pass-phrase xxxxxxxx aes
ssid-profile name yw
ssid test
vap-profile name yw
forward-mode tunnel
service-vlan vlan-id 100
security-profile yw
ap-group name yw
vap-profile yw wlan 1 radio all