华为AC旁路二层组网隧道转发示例

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/tjjingpan/article/details/89026125

拓扑图

数据规划

AC6605 V200R007C10SPC300

参考配置地址https://support.huawei.com/enterprise/zh/doc/EDOC1000154075

SwitchA g0/0/1 和E0/0/1配置为trunk,只允许vlan 100通过,pvid 为vlan100。

[SiwtchA-GigabitEthernet0/0/1]dis this
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk pvid vlan 100
 port trunk allow-pass vlan 100

SwitchA的g0/0/2配置为trunk,只允许vlan100通过 

[SiwtchA-GigabitEthernet0/0/2]dis this
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 100
return
00 to 101

 AC上创建VLAN100,配置vlanif100 接口地址为192.168.100.1/24,开启dhcp功能,dhcp方式采用接口方式将g0/0/1配置为trunk允许vlan100 和vlan 101通过

[AC]dhcp enable
[AC]vlan 100
[AC-vlan100]quit
[AC]dhcp enable
[AC]int g0/0/1
[AC-GigabitEthernet0/0/1]port link-type trunk
[AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 101
[AC]int Vlanif 100
[AC-Vlanif100]ip address 10.23.100.1 255.255.255.0
[AC-Vlanif100]dhcp select interface

SwitchB上创建vlan100 101,配置vlanif101 接口地址为192.168.10.1/24,开启dhcp功能,dhcp方式采用接口方式将g0/0/1配置为trunk允许vlan100通过,g0/0/2允许vlan100和vlan101通过。

[SwitcbB]dhcp enable
[SwitcbB]vlan batch 100 to 101
[SwitcbB]int Vlanif 101
[SwitcbB-Vlanif101]ip address 10.23.101.1 255.255.255.0
[SwitcbB-Vlanif101]dhcp select interface
[SwitcbB-Vlanif101]quit
[SwitcbB]int g0/0/1
[SwitcbB-GigabitEthernet0/0/1]port link-type trunk
[SwitcbB-GigabitEthernet0/0/1]port trunk allow-pass vlan 100

AP上线配置

# 创建AP组,用于将相同配置的AP都加入同一AP组中。

[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit

# 创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板。

[AC-wlan-view] regulatory-domain-profile name default
[AC-wlan-regulate-domain-default] country-code cn
[AC-wlan-regulate-domain-default] quit
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] regulatory-domain-profile default
Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continu
e?[Y/N]:y 
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] quit

配置AC的源接口。

[AC]capwap source interface vlanif 100
[AC] wlan
[AC-wlan-view] ap auth-mode mac-auth
[AC-wlan-view] ap-id 0 ap-mac 60de-4476-e360
[AC-wlan-ap-0] ap-name area_1
Warning: This operation may cause AP reset. Continue? [Y/N]y 
[AC-wlan-ap-0] ap-group ap-group1
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configuration
s of the radio, Whether to continue? [Y/N]:y 
[AC-wlan-ap-0] quit

将AP上电后,当执行命令display ap all查看到AP的“State”字段为“nor”时,表示AP正常上线。

[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 STA Uptime
-----------------------------------------------------------------------------------------------------
0    00e0-fc0b-1330 00e0-fc0b-1330 ap-group1 10.23.100.21 AP6050DN        nor   1   36M:5S
1    00e0-fc8c-0990 area_2         ap-group1 10.23.100.63 AP6050DN        nor   1   36M:4S
-----------------------------------------------------------------------------------------------------
Total: 2

配置WLAN业务参数

# 创建名为“wlan-net”的安全模板,并配置安全策略。

[AC-wlan-view] security-profile name wlan-net
[AC-wlan-sec-prof-wlan-net] security wpa-wpa2 psk pass-phrase a1234567 aes
[AC-wlan-sec-prof-wlan-net] quit

  创建名为“wlan-net”的SSID模板,并配置SSID名称为“wlan-net”。

[AC-wlan-view] ssid-profile name wlan-net
[AC-wlan-ssid-prof-wlan-net] ssid wlan-net
[AC-wlan-ssid-prof-wlan-net] quit

# 创建名为“wlan-net”的VAP模板,配置业务数据转发模式、业务VLAN,并且引用安全模板和SSID模板。

[AC-wlan-view] vap-profile name wlan-net
[AC-wlan-vap-prof-wlan-net] forward-mode tunnel
[AC-wlan-vap-prof-wlan-net] service-vlan vlan-id 101
[AC-wlan-vap-prof-wlan-net] security-profile wlan-net
[AC-wlan-vap-prof-wlan-net] ssid-profile wlan-net
[AC-wlan-vap-prof-wlan-net] quit

配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板“wlan-net”的配置。

[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 0
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 1
[AC-wlan-ap-group-ap-group1] quit

验证配置

STA1可以获取到IP地址

STA>ipconfig

Link local IPv6 address...........: ::
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 10.23.101.254
Subnet mask.......................: 255.255.255.0
Gateway...........................: 10.23.101.1
Physical address..................: 54-89-98-75-3F-08
DNS server........................:

STA可以ping 能10.23.101.1

STA>ping 10.23.101.1

Ping 10.23.101.1: 32 data bytes, Press Ctrl_C to break
From 10.23.101.1: bytes=32 seq=1 ttl=255 time=140 ms
From 10.23.101.1: bytes=32 seq=2 ttl=255 time=125 ms
From 10.23.101.1: bytes=32 seq=3 ttl=255 time=125 ms
From 10.23.101.1: bytes=32 seq=4 ttl=255 time=140 ms
From 10.23.101.1: bytes=32 seq=5 ttl=255 time=141 ms

--- 10.23.101.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 125/134/141 ms

猜你喜欢

转载自blog.csdn.net/tjjingpan/article/details/89026125