配置DHCP
Switch1
<Huawei>sys
[Huawei]undo in en
[Huawei]vlan batch 10 20 30 40
[Huawei]int vlan 10
[Huawei-Vlanif10]ip add 192.168.10.1 24
[Huawei-Vlanif10]quit
[Huawei]int vlan 20
[Huawei-Vlanif20]ip add 192.168.20.1 24
[Huawei-Vlanif20]quit
[Huawei]int vlan 30
[Huawei-Vlanif30]ip add 192.168.30.1 24
[Huawei-Vlanif30]quit
[Huawei]int vlan 40
[Huawei-Vlanif40]ip add 192.168.40.1 24
[Huawei-Vlanif40]quit
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]po li tr
[Huawei-GigabitEthernet0/0/1]po tr al vlan all
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]po li tr
[Huawei-GigabitEthernet0/0/2]po tr al vlan all
[Huawei-GigabitEthernet0/0/2]quit
[Huawei]dhcp enable
[Huawei]int vlan 10
[Huawei-Vlanif10]dhcp select int
[Huawei-Vlanif10]quit
[Huawei]int vlan 20
[Huawei-Vlanif20]dhcp select int
[Huawei-Vlanif20]quit
[Huawei]int vlan 40
[Huawei-Vlanif40]dhcp select int
[Huawei-Vlanif40]quit
Switch2
<Huawei>sys
[Huawei]un in en
[Huawei]vlan batch 10 20 30 40
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]po li ac
[Huawei-GigabitEthernet0/0/2]po de vlan 20
[Huawei-GigabitEthernet0/0/2]quit
[Huawei]int g0/0/3
[Huawei-GigabitEthernet0/0/3]po li ac
[Huawei-GigabitEthernet0/0/3]po de vlan 40
[Huawei-GigabitEthernet0/0/3]quit
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]po li tr
[Huawei-GigabitEthernet0/0/1]po tr al vlan all
[Huawei-GigabitEthernet0/0/1]quit
PC获得IP
AP上线
<AC6005>sys
[AC6005]un in en
[AC6005]vlan batch 10 20 30 40
[AC6005]int vlan 30
[AC6005-Vlanif30]ip add 192.168.30.2 24
[AC6005-Vlanif30]quit
[AC6005]dhcp enable
[AC6005]int vlan 40
[AC6005-Vlanif40]ip add 192.168.40.2 24
[AC6005-Vlanif40]dhcp select int
[AC6005-Vlanif40]dhcp server option 43 sub-option 3 ascii 192.168.30.2
[AC6005-Vlanif40]quit
[AC6005]capwap source int vlan 30
[AC6005]int g0/0/1
[AC6005-GigabitEthernet0/0/1]po li tr
[AC6005-GigabitEthernet0/0/1]po tr al vlan all
[AC6005-GigabitEthernet0/0/1]quit
[AC6005]ip route-s 0.0.0.0 0 192.168.30.1
[AC6005]wlan
[AC6005-wlan-view]ap auth-mode no-auth
配置wlan
[AC6005]wlan
[AC6005-wlan-view]ssid name zhangsan
[AC6005-wlan-ssid-prof-zhangsan]sec name zhangsan
[AC6005-wlan-sec-prof-zhangsan]security wpa2 psk pass-phrase zhangsan@123 aes
[AC6005-wlan-sec-prof-zhangsan]vap name zhangsan
[AC6005-wlan-vap-prof-zhangsan]ssid zhangsan
[AC6005-wlan-vap-prof-zhangsan]sec zhangsan
[AC6005-wlan-vap-prof-zhangsan]service-vlan vlan 10
[AC6005-wlan-vap-prof-zhangsan]forward-mode tunnel
[AC6005-wlan-vap-prof-zhangsan]quit
[AC6005-wlan-view]ap-group name default
[AC6005-wlan-ap-group-default]vap-profile zhangsan wlan 1 radio all