实验拓扑图
代码:
SW1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn sw1
[sw1]undo info-center enable
Info: Information center is disabled.
[sw1]vlan batch 10 20 30
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1]int g0/0/1
[sw1-GigabitEthernet0/0/1]port link-type access
[sw1-GigabitEthernet0/0/1]port default vlan 30
[sw1-GigabitEthernet0/0/1]int g0/0/2
[sw1-GigabitEthernet0/0/2]port link-type trunk
[sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[sw1-GigabitEthernet0/0/2]int g0/0/3
[sw1-GigabitEthernet0/0/3]port link-type trunk
[sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[sw1-GigabitEthernet0/0/3]q
[sw1]int vlan 20
[sw1-Vlanif20]ip add 10.1.20.1 24
[sw1-Vlanif20]int vlan 30
[sw1-Vlanif30]ip add 10.1.30.2 24
[sw1-Vlanif30]q
[sw1]ping -a 10.1.20.1 10.1.30.1PING 10.1.30.1: 56 data bytes, press CTRL_C to breakReply from 10.1.30.1: bytes=56 Sequence=1 ttl=255 time=120 msReply from 10.1.30.1: bytes=56 Sequence=2 ttl=255 time=40 msReply from 10.1.30.1: bytes=56 Sequence=3 ttl=255 time=10 msReply from 10.1.30.1: bytes=56 Sequence=4 ttl=255 time=50 msReply from 10.1.30.1: bytes=56 Sequence=5 ttl=255 time=40 ms--- 10.1.30.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/52/120 ms[sw1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[sw1]int vlan 20
[sw1-Vlanif20]dhcp select int
SW2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn sw2
[sw2]undo info-center enable
Info: Information center is disabled.
[sw2]vlan batch 10 20 30
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw2]int g0/0/3
[sw2-GigabitEthernet0/0/3]port link-type trunk
[sw2-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[sw2-GigabitEthernet0/0/3]int g0/0/1
[sw2-GigabitEthernet0/0/1]port link-type trunk
[sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[sw2-GigabitEthernet0/0/1]port trunk pvid vlan 10
[sw2-GigabitEthernet0/0/1]int g0/0/2
[sw2-GigabitEthernet0/0/2]port link-type trunk
[sw2-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
[sw2-GigabitEthernet0/0/2]port trunk pvid vlan 10
AR
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]sysn AR
[AR]undo info-center enable
Info: Information center is disabled.
[AR]int g0/0/1
[AR-GigabitEthernet0/0/1]
[AR-GigabitEthernet0/0/1]ip add 10.1.30.1 24
[AR-GigabitEthernet0/0/1]q
[AR]ip route-static 10.1.20.0 24 10.1.30.2
AC
<AC6005>sys
Enter system view, return user view with Ctrl+Z.
[AC6005]sysn AC
[AC]undo info-center enable
Info: Information center is disabled.
[AC]vlan batch 10 20 30
Info: This operation may take a few seconds. Please wait for a moment...done.
[AC]int g0/0/2
[AC-GigabitEthernet0/0/2]port link-type trunk
[AC-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[AC-GigabitEthernet0/0/2]int vlan 10
[AC-Vlanif10]ip add 10.1.10.1 24
[AC-Vlanif10]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[AC]dhcp enable
[AC]int vlan 10
[AC-Vlanif10]dhcp select int
[AC-Vlanif10]q
[AC]capwap source ip-address 10.1.10.1
[AC]wlan
[AC-wlan-view]ap-group name huawei
Info: This operation may take a few seconds. Please wait for a moment.done.
[AC-wlan-ap-group-huawei]q
[AC-wlan-view]ap auth-mode no-auth
Warning: It is insecure to configure none authentication mode.
[AC-wlan-view]q
[AC]dis ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
--------------------------------------------------------------------------------
ID MAC Name Group IP Type State STA Uptime
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Total: 0
[AC]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 STAUptime
--------------------------------------------------------------------------------
------------------
0 00e0-fc44-0700 00e0-fc44-0700 default 10.1.10.232 AP4050DN-E nor 0 32S
1 00e0-fc6e-48f0 00e0-fc6e-48f0 default 10.1.10.112 AP4050DN-E nor 0 32S
--------------------------------------------------------------------------------
------------------
Total: 2
[AC]wlan
[AC-wlan-view]ap-id 0
[AC-wlan-ap-0]ap-group huawei
Warning: This operation may cause AP reset. If the country code changes, it willclear channel, power and antenna gain configurations of the radio, Whether to c
ontinue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC-wlan-ap-0]q
[AC-wlan-view]ap-id 1
[AC-wlan-ap-1]ap-group huawei
Warning: This operation may cause AP reset. If the country code changes, it willclear channel, power and antenna gain configurations of the radio, Whether to c
ontinue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC-wlan-ap-1]q
[AC-wlan-view]dis ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
fault: fault [2]
--------------------------------------------------------------------------------
--------
ID MAC Name Group IP Type State STA Uptime
--------------------------------------------------------------------------------
--------
0 00e0-fc44-0700 00e0-fc44-0700 huawei - AP4050DN-E fault 0 -
1 00e0-fc6e-48f0 00e0-fc6e-48f0 huawei - AP4050DN-E fault 0 -
--------------------------------------------------------------------------------
--------
Total: 2
[AC-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-fc44-0700 00e0-fc44-0700 huawei 10.1.10.232 AP4050DN-E nor 0
1M:23S
1 00e0-fc6e-48f0 00e0-fc6e-48f0 huawei 10.1.10.112 AP4050DN-E nor 0
44S
--------------------------------------------------------------------------------
-----------------
Total: 2
# 切换为mca认证
[AC-wlan-view]ap auth-mode mac-auth # 创建ssid模板
[AC-wlan-view]ssid-profile name huawei
[AC-wlan-ssid-prof-huawei]ssid huawei
Info: This operation may take a few seconds, please wait.done.
[AC-wlan-ssid-prof-huawei]q# 创建安全模板
[AC-wlan-view]security-profile name huawei
[AC-wlan-sec-prof-huawei]security wpa-wpa2 psk pass-phrase a1234567 aes
[AC-wlan-sec-prof-huawei]q# 创建vap模板
[AC-wlan-view]vap-profile name huawei# 引入ssid模板和安全模板
[AC-wlan-vap-prof-huawei]security-profile huawei
Info: This operation may take a few seconds, please wait.done.
[AC-wlan-vap-prof-huawei]ssid-profile huawei
Info: This operation may take a few seconds, please wait.done.# 设置业务vlan为20和直接转发方式
[AC-wlan-vap-prof-huawei]service-vlan vlan-id 20
Info: This operation may take a few seconds, please wait.done.
[AC-wlan-vap-prof-huawei]forward-mode direct-forward
[AC-wlan-vap-prof-huawei]q# 创建域管理模板
[AC-wlan-view]regulatory-domain-profile name huawei
[AC-wlan-regulate-domain-huawei]country-code CN
Info: The current country code is same with the input country code.
[AC-wlan-regulate-domain-huawei]q# 进入ap组华为中,并且绑定于管理模板huawei和vap模板huawei
[AC-wlan-view]ap-group name huawei
[AC-wlan-ap-group-huawei]regulatory-domain-profile huawei
Warning: Modifying the country code will clear channel, power and antenna gain c
onfigurations of the radio and reset the AP. Continue?[Y/N]:y
[AC-wlan-ap-group-huawei]vap-profile huawei wlan 1 radio all
Info: This operation may take a few seconds, please wait...done.
[AC-wlan-ap-group-huawei]q
# 检查是否上线
[AC-wlan-view]dis vap ssid huawei
Info: This operation may take a few seconds, please wait.
WID : WLAN ID
--------------------------------------------------------------------------------
--
AP ID AP name RfID WID BSSID Status Auth type STA SSID
--------------------------------------------------------------------------------
--
0 00e0-fc44-0700 0 1 00E0-FC44-0700 ON WPA/WPA2-PSK 0 huawei
0 00e0-fc44-0700 1 1 00E0-FC44-0710 ON WPA/WPA2-PSK 0 huawei
1 00e0-fc6e-48f0 0 1 00E0-FC6E-48F0 ON WPA/WPA2-PSK 0 huawei
1 00e0-fc6e-48f0 1 1 00E0-FC6E-4900 ON WPA/WPA2-PSK 0 huawei
--------------------------------------------------------------------------------
--
Total: 4