案例背景为二层旁挂式组网,转发方式为直接转发,管理Vlan为100,业务Vlan为101。
基本配置:
SW1:
[SW1]VLAN batch 100 101
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 100
[SW1-Vlanif101]IP address 10.1.101.254 24
SW2:
[SW2]VLAN batch 100 101
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101
[SW2-GigabitEthernet0/0/1]port trunk pvid vlan 100
[SW2-GigabitEthernet0/0/2]port link-type trunk
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan 100 101
AC1:
[AC1]VLAN 100
[AC1]dhcp enable
[AC1-GigabitEthernet0/0/1]port link-type access
[AC1-GigabitEthernet0/0/1]port default vlan 100
[AC1-Vlanif100]IP address 10.1.100.254 24
[AC1-Vlanif100]dhcp select interface ---------------------------由于是二层组网,AP通过广播发现AC,所以不需要配置option 43字段
做完基本配置之后,就会发现,AP成功获取到IP地址。接下来配置AP上线!
配置AP上线:
[AC1]capwap source interface Vlanif 100------------------------------指定capwap隧道源
[AC1]wlan
[AC1-wlan-view]regulatory-domain-profile name shiyan-----------------创建域管理模板,名字为“shiyan”
[AC1-wlan-regulate-domain-shiyan]country-code CN------------------选择国家代码为中国
[AC1-wlan-view]ap-group name ap-shiyan---------------------创建AP组,名字为“ap-shiyan”
[AC1-wlan-ap-group-ap-shiyan]regulatory-domain-profile shiyan-----------------将域模板引用到AP组中
[AC1-wlan-view]ap auth-mode no-auth ----------------------------设置AP上线模式为“不认证”
稍等一会就会发现AP已上线,ID为:0
[AC1-wlan-view]ap-id 0
[AC1-wlan-ap-0]ap-name ap0----------------------更改AP名字为“ap0”
[AC1-wlan-ap-0]ap-group ap-shiyan-------------------将AP加入AP组
AP会进行重置,需要等一会。
业务参数配置:
[AC1-wlan-view]security-profile name sec-shiyan-----------------------------创建安全模板,名字为sec-shiyan“”
[AC1-wlan-sec-prof-sec-shiyan]security wpa-wpa2 psk pass-phrase shiyan@123 aes-----------------------------------设置密码
[AC1-wlan-view]ssid-profile name ssid-shiyan--------------------创建ssid模板,名字为“ssid-shiyan”
[AC1-wlan-ssid-prof-ssid-shiyan]ssid shiyan123 -------------------------------设置ssid
[AC1-wlan-view]vap-profile name vap-shiyan------------------------------创建vap模板,名字为“vap-shiyan”
[AC1-wlan-vap-prof-vap-shiyan]forward-mode direct-forward ------------------------转发模式为直接转发
[AC1-wlan-vap-prof-vap-shiyan]service-vlan vlan-id 101-----------------------------业务Vlan为101
[AC1-wlan-vap-prof-vap-shiyan]security-profile sec-shiyan--------------------------引用安全模板
[AC1-wlan-vap-prof-vap-shiyan]ssid-profile ssid-shiyan-----------------------------引用SSID模板
[AC1-wlan-view]ap-group name ap-shiyan
[AC1-wlan-ap-group-ap-shiyan]vap-profile vap-shiyan wlan 1 radio all----------------------在AP组中引用vap模板并开启所有radio
SW1配置:
[SW1]dhcp enable
[SW1-Vlanif101]dhcp select interface
终端设备成功获取到Vlan101的地址!