利用AC管理AP,并且无线用户能够上网
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 192.168.10.1 24
[AR1]int loo 0
[AR1-LoopBack0]ip add 1.1.1.1 24 ===设置个回环口当做外网
[AR1]ip route-static 192.168.0.0 255.255.0.0 192.168.10.2 ===指向内网网段
vlan 9 创建vlan9
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 9
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/3
port link-type trunk
port trunk pvid vlan 9
port trunk allow-pass vlan 2 to 4094
interface Vlanif1
ip address 192.168.10.2 255.255.255.0 ===与路由器相连的地址
interface Vlanif9
ip address 192.168.9.253 255.255.255.0 ===与AC相连的地址
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
ip route-static 0.0.0.0 0.0.0.0 192.168.10.1 ====静态路由指向路由器
ip route-static 192.168.8.0 255.255.255.0 192.168.9.254 ====指向AC
sys
sys AC
vlan batch 8 9
dhcp enable
int vlan 8
ip add 192.168.8.254 24
dhcp select interface
dncp ser dns 114.114.114.114
int vlan 9
ip add 192.168.9.254 24
dhcp select interface
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
[AC]capwap source interface vlan 9 ===重要
[AC]ip route-static 0.0.0.0 0 192.168.9.253 ===AC指向核心,使得业务vlan能够出去
[AC]wlan
[AC-wlan-view]ap auth-mode no-auth ==不用认证
[AC-wlan-view]dis ap all ==查看AP是否上线“nor”
0 00e0-fcd5-07f0 00e0-fcd5-07f0 default 192.168.9.193 AP2050DN nor 0 21S
1 00e0-fc04-1400 00e0-fc04-1400 default 192.168.9.121 AP3030DN nor 0 3S
[AC-wlan-view]security-profile name wlan-security1 ==创建名为“wlan-security”的安全模板
[AC-wlan-sec-prof-wlan-security]security wpa2 psk pass-phrase 12345678 aes ==配置WPA2+PSK+AES的安全策略密码为:12345678
[AC-wlan-view]ssid-profile name wlan-ssid1 ==创建名为“wlan-ssid”的SSID模板
[AC-wlan-ssid-prof-wlan-ssid]ssid within ==设置SSID名称为“within”(WiFi的名称)
[AC-wlan-view]vap-profile name wlan-vap1 ==创建名为“wlan-vap”的VAP模板
[AC-wlan-vap-prof-wlan-vap]forward-mode tunnel ==配置转发模式为“tunnel”
[AC-wlan-vap-prof-wlan-vap]service-vlan vlan-id 8 ==配置业务数据转发模式、业务VLAN
[AC-wlan-vap-prof-wlan-vap]security-profile wlan-security1 ==引用安全模板
[AC-wlan-vap-prof-wlan-vap]ssid-profile wlan-ssid1 ==引用SSID模板
[AC-wlan-view]ap-group name default
[AC-wlan-ap-group-ap-group1]vap-profile wlan-vap1 wlan 1 radio all == 配置AP组引用VAP模板 AP上射频0使用VAP模板“wlan-vap”的配置
当执行完"vap-profile wlan-vap1 wlan 1 radio all"命令后,WiFi信号就出来了