WLAN业务配置——AC旁挂式组网
![](https://i-blog.csdnimg.cn/blog_migrate/104b7fdbb2c5d4f9f390e93610562b60.png)
LSW1 核心交换机
<Huawei>system-view
[Huawei]undo info-center enable
创建3个vlan
[Huawei]vlan batch 10 20 30
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 30
[Huawei-GigabitEthernet0/0/1]q
[Huawei]interface g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type trunk
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/2]q
[Huawei]interface g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type trunk
允许通过 管理vlan 和 业务vlan
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[Huawei-GigabitEthernet0/0/3]q
[Huawei]q
<Huawei>save
LSW2 汇聚交换机
创建 管理vlan 和 业务vlan
<Huawei>system-view
[Huawei]undo info-center enable
创建3个vlan
[Huawei]vlan batch 10 20
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk pvid vlan 10
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 100
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 20
[Huawei-GigabitEthernet0/0/1]q
[Huawei]interface g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type trunk
[Huawei-GigabitEthernet0/0/2]port trunk pvid vlan 10
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan 100
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan 20
[Huawei-GigabitEthernet0/0/2]q
[Huawei]interface g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type trunk
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[Huawei-GigabitEthernet0/0/3]q
[Huawei]q
<Huawei>save
AC1 控制器
<AC6005>system-view
创建 管理vlan
[AC6005]vlan 10
[AC6005-vlan10]q
[AC6005]interface g0/0/1
[AC6005-GigabitEthernet0/0/1]port link-type trunk
[AC6005-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[AC6005-GigabitEthernet0/0/1]q
[AC6005]q
<AC6005>save
LSW1 核心交换机
<Huawei>system-view
[Huawei]interface Vlanif 20
[Huawei-Vlanif20]ip address 10.1.30.1 24
[Huawei-Vlanif20]q
[Huawei]int vlan 30
[Huawei-Vlanif30]ip address 10.1.30.2 24
[Huawei-Vlanif30]q
[Huawei]q
<Huawei>save
AC1控制器
<AC6005>system-view
[AC6005]int vlan 10
[AC6005-Vlanif10]ip add 10.1.10.1 24
[AC6005-Vlanif10]q
[AC6005]q
<AC6005>save
AR路由器
<Huawei>system-view
[Huawei]un in en
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 10.1.30.1 24
[Huawei-GigabitEthernet0/0/0]q
为了能访问外网,在交换机上配置一条静态路由
[Huawei]ip rout 10.1.20.0 24 10.1.30.2
[Huawei]q
<Huawei>save
LSW1
这里可能是因为 机器反应慢的缘故 不通。可先配置AP上线,等会再试,
ping -a 10.1.20.1 10.1.30.1
LSW1
<Huawei>system-view
配置dhcp服务
[Huawei]dhcp enable
在vlan 20下配置dhcp server
[Huawei]int vlan 20
[Huawei-Vlanif20]dhcp se in
[Huawei-Vlanif20]q
[Huawei]q
<Huawei>save
AC1控制器
<AC6005>system-view
配置dhcp服务
[AC6005]dhcp enable
在vlan 10下配置dhcp server 端口模式
[AC6005]int vlan 10
[AC6005-Vlanif10]dhcp se int
[AC6005-Vlanif10]q
[AC6005]q
<AC6005>save
AC1控制器
配置AC源端口的地址
<AC6005>system-view
[AC6005]capwap source ip-address 10.1.10.1
[AC6005]wlan
[AC6005-wlan-view]ap-group name group1
[AC6005-wlan-ap-group-group1]q
尝试 使用不认证方式,查看AP是否能上线
[AC6005-wlan-view]ap auth-mode no-auth
[AC6005-wlan-view]dis ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor : normal [2]
--------------------------------------------------------------------------------------------------
ID MAC Name Group IP Type State STA Uptime
--------------------------------------------------------------------------------------------------
0 00e0-fcc9-59a0 00e0-fcc9-59a0 default 10.1.10.202 AP2050DN nor 0 18S
1 00e0-fca7-56c0 00e0-fca7-56c0 default 10.1.10.170 AP2050DN nor 0 14S
--------------------------------------------------------------------------------------------------
Total: 2
[AC6005-wlan-view]
[AC6005-wlan-view]ap-id 0
[AC6005-wlan-ap-0]ap-name AP1
[AC6005-wlan-ap-0]ap-group group1
[AC6005-wlan-ap-0]q
[AC6005-wlan-view]ap-id 1
[AC6005-wlan-ap-1]ap-name AP2
[AC6005-wlan-ap-1]ap-group group1
[AC6005-wlan-ap-1]q
查看AP上线情况
[AC6005-wlan-view]dis ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor : normal [2]
---------------------------------------------------------------------------------------
ID MAC Name Group IP Type State STA Uptime
---------------------------------------------------------------------------------------
0 00e0-fcc9-59a0 AP1 group1 10.1.10.202 AP2050DN nor 0 4M:34S
1 00e0-fca7-56c0 AP2 group1 10.1.10.170 AP2050DN nor 0 2M:53S
---------------------------------------------------------------------------------------
Total: 2
修改认知方式为 mac认证方式
[AC6005-wlan-view]ap auth-mode mac-auth
[AC6005-wlan-view]dis ap all
===============================================
配置vlan业务:配置ssid模板,security模板,VAP模板;保证AP能正常释放信号。
配置名为group1的ssid模板
[AC6005-wlan-view]ssid-profile name group1
使用该模板
[AC6005-wlan-ssid-prof-group1]ssid group1
[AC6005-wlan-ssid-prof-group1]q
配置名为group1的security模板
[AC6005-wlan-view]security-profile name group1
配置安全密码
[AC6005-wlan-sec-prof-group1]security wpa-wpa2 psk pass-phrase a1234567 aes
[AC6005-wlan-sec-prof-group1]q
配置名为group1的VAP模板
[AC6005-wlan-view]vap-profile name group1
引用ssid模板
[AC6005-wlan-vap-prof-group1]ssid-profile group1
引用security模板
[AC6005-wlan-vap-prof-group1]security-profile group1
转发模式为 直接转发
[AC6005-wlan-vap-prof-group1]forward-mode direct-forward
[AC6005-wlan-vap-prof-group1]q
配置名为group1的域管理模板
[AC6005-wlan-view]regulatory-domain-profile name group1
配置国家码为CN
[AC6005-wlan-regulate-domain-group1]country-code CN
[AC6005-wlan-regulate-domain-group1]q
进入AP group组,将域管理模板group1和VAP模板绑定
[AC6005-wlan-view]ap-group name group1
[AC6005-wlan-ap-group-group1]regulatory-domain-profile group1
最后再将VAP模板进行绑定
[AC6005-wlan-ap-group-group1]vap-profile group1 wlan 1 radio all
查看AP上线情况
[AC6005-wlan-view]dis ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor : normal [2]
----------------------------------------------------------------------------------------
ID MAC Name Group IP Type State STA Uptime
----------------------------------------------------------------------------------------
0 00e0-fcc9-59a0 AP1 group1 10.1.10.202 AP2050DN nor 0 24M:38S
1 00e0-fca7-56c0 AP2 group1 10.1.10.170 AP2050DN nor 0 22M:57S
----------------------------------------------------------------------------------------
Total: 2
一、save命令保存配置
有些设备首次保存(save)需先按提示输入y,再按两次回车提示保存成功。
save 用户视图输入save命令
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y 按提示输入y,回车
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Jul 1 2016 10:16:47-08:00 Huawei %%01CFM/4/SAVE(l)[0]:The user chose Y when dec
iding whether to save the configuration to the device. 再次回车
Now saving the current configuration to the slot 0.
Save the configuration successfully. 提示保存成功
二、清除整个交换机或路由器配置命令
<Huawei>reset saved-configuration
The configuration will be erased to reconfigure. Continue? [Y/N]: y
<Huawei>reboot
Info: The system is now comparing the configuration, please wait.
Warning: All the configuration will be saved to the configuration file for the next startup:, Continue?[Y/N]:n //此时要选择n,若选择y则之前的配置会保存,重启后仍然是原来的配置。
Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'.
System will reboot! Continue?[Y/N]:y
三、清除交换机或路由器某个端口地配置命令
<huawei>system-view
[huawei]interface gigabitethernet 0/0/? (?:表示第几个端口)
[huawei-GigabitEthernet0/0/?]clear configuration interface gigabitethernet 0/0/?
清除该端口的配置后,该端口处于关闭状态,可以用以下命令重新开启。
[huawei-GigabitEthernet0/0/?]undo shutdown