配置LSW1和AC1,使AP1与AC1之间能够传输CAPWAP报文
[LSW1]vlan batch 100
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 100
[LSW1-GigabitEthernet0/0/2]port trunk pvid vlan 100
[AC1]vlan 100
[AC1-GigabitEthernet0/0/1]port link-type trunk
[AC1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100
配置AC1与上层网络设备互通: 上行接口GE0/0/2加入VLAN101(业务VLAN)
[AC1]vlan 101
[AC1-GigabitEthernet0/0/2]port link-type trunk
[AC1-GigabitEthernet0/0/2]port trunk allow-pass vlan 101
配置AC1作为DHCP服务器,为STA1和AP1分配IP地址:配置基于接口地址池的DHCP服务器,其中,VLANIF100接口为AP1提供IP地址,VLANIF101为STA提供IP地址
[AC1]int Vlanif 100
[AC1-Vlanif100]ip add 10.1.1.1 24
[AC1-Vlanif100]dhcp select interface
[AC1]int Vlanif 101
[AC1-Vlanif101]ip add 10.1.2.1 24
[AC1-Vlanif101]dhcp select interface
配置AP上线
[AC1]wlan
[AC1-wlan-view]ap-group name ap-g1 //创建AP组,用于将相同配置的AP都加入同一AP组中
[AC1-wlan-view]regulatory-domain-profile name domain1 //创建域管理模板
[AC1-wlan-regulate-domain-domain1]country-code cn //配置AC的国家码
[AC1-wlan-view]ap-group name ap-g1
[AC1-wlan-ap-group-ap-g1]regulatory-domain-profile domain1 //AP组下引用域管理模板
[AC1]capwap source interface Vlanif 100 //配置AC的源接口
[AC1]wlan
[AC1-wlan-view]ap auth-mode mac-auth //缺省认证,可以省略
[AC1-wlan-view]ap-id 0 ap-mac 00e0-fc5d-32c0 //离线导入AP
[AC1-wlan-ap-0]ap-name ap1 //为AP配置名称
[AC1-wlan-ap-0]ap-group ap-g1 //将AP加入AP组
配置WLAN业务参数
[AC1-wlan-view]security-profile name wlan-sec //创建名为安全模板
[AC1-wlan-sec-prof-wlan-sec]security wpa2 psk pass-phrase abc@1234 aes //配置安全策略WPA2+PSK+AES
[AC1-wlan-view]ssid-profile name wlan-ssid //创建名为SSID模板
[AC1-wlan-ssid-prof-wlan-ssid]ssid wlan-net //配置SSID名称
[AC1-wlan-view]vap-profile name wlan-vap //创建VAP模板
[AC1-wlan-vap-prof-wlan-vap]forward-mode tunnel //配置业务数据转发模式
[AC1-wlan-vap-prof-wlan-vap]service-vlan vlan-id 101 //配置业务VLAN
[AC1-wlan-vap-prof-wlan-vap]security-profile wlan-sec //引用安全模板
[AC1-wlan-vap-prof-wlan-vap]ssid-profile wlan-ssid //引用SSID模板
[AC1-wlan-view]ap-group name ap-g1
[AC1-wlan-ap-group-ap-g1]vap-profile wlan-vap wlan 1 radio all //配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板“wlan-vap”的配置
配置AP射频的信道和功率
[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
验证配置