1. 配置LSW和AC,使AP与AC之间能够传输CAPWAP报文
[LSW1]vlan batch 10
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[LSW1-GigabitEthernet0/0/2]port trunk pvid vlan 10
[LSW1-GigabitEthernet0/0/2]port-isolate enable
[LSW1-GigabitEthernet0/0/3]port link-type trunk
[LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 10
[LSW1-GigabitEthernet0/0/3]port trunk pvid vlan 10
[LSW1-GigabitEthernet0/0/3]port-isolate enable
[AC1]vlan batch 10
[AC1-GigabitEthernet0/0/1]port link-type trunk
[AC1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
2. 配置AC与上层网络设备互通
[AC1]vlan batch 20 30 40
[AC1-Vlanif20]ip add 10.1.2.1 24
[AC1-Vlanif30]ip add 10.1.3.1 24
[AC1-Vlanif40]ip add 10.1.4.1 24
[AC1]ip route-static 0.0.0.0 0.0.0.0 10.1.4.2
[AC1-GigabitEthernet0/0/2]port link-type trunk
[AC1-GigabitEthernet0/0/2]port trunk allow-pass vlan 40
[AC1-GigabitEthernet0/0/2]port trunk pvid vlan 40
3. 配置AC给AP分配IP地址,AR给STA分配IP地址
[AC1]dhcp enable
[AC1]int Vlanif 10
[AC1-Vlanif10]ip add 10.1.1.1 24
[AC1-Vlanif10]dhcp select interface //配置AC通过接口地址池为AP分配IP地址
[AC1-Vlanif20]dhcp select relay //配置AC作为DHCP中继并使能DHCP中继探测用户表项功能
[AC1-Vlanif20]dhcp relay server-ip 10.1.4.2
[AC1-Vlanif30]dhcp select relay
[AC1-Vlanif30]dhcp relay server-ip 10.1.4.2
[AR1]dhcp enable //配置AR作为DHCP服务器为STA分配IP地址
[AR1]ip pool sta-ip-pool1
[AR1-ip-pool-sta-ip-pool1]gateway-list 10.1.2.1
[AR1-ip-pool-sta-ip-pool1]network 10.1.2.0 mask 24
[AR1]ip pool sta-ip-pool2
[AR1-ip-pool-sta-ip-pool2]gateway-list 10.1.3.1
[AR1-ip-pool-sta-ip-pool2]network 10.1.3.0 mask 24
[AR1-GigabitEthernet0/0/0]ip add 10.1.4.2 24
[AR1-GigabitEthernet0/0/0]dhcp select global
[AR1]ip route-static 10.1.2.0 24 10.1.4.1
[AR1]ip route-static 10.1.3.0 24 10.1.4.1
4. 配置VLAN pool,用于作为业务VLAN
[AC1]vlan pool sta-pool
[AC1-vlan-pool-sta-pool]vlan 20 30
[AC1-vlan-pool-sta-pool]assignment hash
5. 配置AP上线
[AC1]wlan
[AC1-wlan-view]ap-group name ap-group1 //创建AP组
[AC1-wlan-view]regulatory-domain-profile name domain1 //创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板
[AC1-wlan-regulate-domain-domain1]country-code cn
[AC1-wlan-view]ap-group name ap-group1
[AC1-wlan-ap-group-ap-group1]regulatory-domain-profile domain1
[AC1]capwap source interface Vlanif 10 //配置AC的源接口
[AC1]wlan
[AC1-wlan-view]ap auth-mode mac-auth
[AC1-wlan-view]ap-id 0 ap-mac 00e0-fcae-6d70 //在AC上离线导入AP
[AC1-wlan-ap-0]ap-name ap1
[AC1-wlan-ap-0]ap-group ap-group1
[AC1-wlan-view]ap-id 1 ap-mac 00e0-fc31-7140
[AC1-wlan-ap-1]ap-name ap2
[AC1-wlan-ap-1]ap-group ap-group1
6. 配置WLAN业务参数
[AC1-wlan-view]security-profile name wlan-security //创建安全模板,并配置安全策略
[AC1-wlan-sec-prof-wlan-security]security wpa2 psk pass-phrase abc@1234 aes
[AC1-wlan-view]ssid-profile name wlan-ssid //创建名SSID模板,并配置SSID名称
[AC1-wlan-ssid-prof-wlan-ssid]ssid wlan-net
[AC1-wlan-view]vap-profile name wlan-vap //创建VAP模板,配置业务数据转发模式、业务VLAN,并且引用安全模板和SSID模板
[AC1-wlan-vap-prof-wlan-vap]forward-mode tunnel
[AC1-wlan-vap-prof-wlan-vap]service-vlan vlan-pool sta-pool
[AC1-wlan-vap-prof-wlan-vap]security-profile wlan-security
[AC1-wlan-vap-prof-wlan-vap]ssid-profile wlan-ssid
[AC1-wlan-view]ap-group name ap-group1 //配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板配置
[AC1-wlan-ap-group-ap-group1]vap-profile wlan-vap wlan 1 radio all
7. 配置AP射频的信道和功率
[AC1-wlan-view]rrm-profile name default
[AC1-wlan-rrm-prof-default]calibrate auto-channel-select disable //关闭射频的信道自动调优功能
[AC1-wlan-rrm-prof-default]calibrate auto-txpower-select disable //关闭射频的功率自动调优功能
[AC1-wlan-view]ap-id 0 //配置AP射频0的信道和功率
[AC1-wlan-ap-0]radio 0
[AC1-wlan-radio-0/0]channel 20mhz 6
[AC1-wlan-radio-0/0]eirp 127
[AC1-wlan-ap-0]radio 1
[AC1-wlan-radio-0/1]channel 20mhz 149
[AC1-wlan-radio-0/1]eirp 127
8. 配置智能漫游功能
[AC1-wlan-view]rrm-profile name smart-roam //创建RRM模板
[AC1-wlan-rrm-prof-smart-roam]smart-roam enable //在RRM模板下使能智能漫游功能
[AC1-wlan-rrm-prof-smart-roam]smart-roam roam-threshold check-snr check-rate //指定用户漫游触发方式为基于终端信噪比和终端信号速率
[AC1-wlan-rrm-prof-smart-roam]smart-roam roam-threshold snr 30 //指定触发门限值为30dB
[AC1-wlan-rrm-prof-smart-roam]smart-roam roam-threshold rate 30 //指定触发门限值为30%
[AC1-wlan-view]radio-2g-profile name radio2g //创建2G射频模板,并引用RRM模板
[AC1-wlan-radio-2g-prof-radio2g] rrm-profile smart-roam
[AC1-wlan-view]radio-5g-profile name radio5g //创建5G射频模板,并引用RRM模板
[AC1-wlan-radio-5g-prof-radio5g] rrm-profile smart-roam
[AC1-wlan-view]ap-group name ap-group1 //在AP组下引用5G射频模板和2G射频模板
[AC1-wlan-ap-group-ap-group1]radio-2g-profile radio2g radio all
[AC1-wlan-ap-group-ap-group1]radio-5g-profile radio5g radio all
9. 验证配置