0
点赞
收藏
分享

微信扫一扫

AC+AP组网

外贸达人小峻先森 2022-04-14 阅读 62
网络

一、 案例目标

1. 通过组网设计,掌握小型网络的组建、无线AC控制器的配置,对网络使用无线设备范围、无线认证和信道进行分析。

2. 综合运用路由、NAT和无线AC控制器。

3.通过使用无线AC控制器对网络中的无线AP进行管理,设置无线规则和认证策略,配置DHCP地址池,对无线AP和通过AP的设备进行动态地址分配。

二、案例分析

Cloud1
在这里插入图片描述
拓扑图

在这里插入图片描述

1.首先进入交换机划分Vlan并且配置好每条链路。

PVID的理解

在这里插入图片描述

我们知道PC发送的数据并不带VLAN标签,那么VLAN ID的标签是什么时候打上的呢,其实是在数据中进入交换机端口的时候打上的。在标准的以太网帧的源地址SA和类型Type之间打上的Tag标签,此tag标签中含有VLAN ID,VLAN ID的范围为4096,去掉一个默认的vlan 1和vlan4096作为保留vlan,实际可用的vlan ID个数为4094个。
对于交换机来说,是根据VLAN标签来区分不同VLAN的以太网帧的。比如PCA发送一个目的地址为PCB的数据帧,到达交换机,交换机会打上VLAN 10的标签,然后根据vlan表确定从PCB的端口转发出去交给PCB。下面会详细介绍VLAN标签的操作。上面已经提过PC发送的数据不带VLAN标签,所以实在进入交换机的时候打上vlan标签,既然PC发出的数据不带VLAN标签,那么在出交换机的时候交换机需要对数据帧的VLAN标签进行剥离再转发给相对应的PC。

The device is running!
<Huawei>system-view 
[Huawei]sysname SW1
[SW1]vlan batch 100 101 
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk 
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 101 100 
[SW1-GigabitEthernet0/0/2]port trunk pvid vlan 101              ****##剥离标签****
[SW1-GigabitEthernet0/0/2]display this 
 port link-type trunk
 port trunk pvid vlan 101
 port trunk allow-pass vlan 100 to 101
#
return
[SW1-GigabitEthernet0/0/2]quit 
[SW1]interface GigabitEthernet 0/0/3
[SW1-GigabitEthernet0/0/3]port link-type trunk 
[SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 100 101 
[SW1-GigabitEthernet0/0/3]port trunk pvid vlan 101	
[SW1-GigabitEthernet0/0/3]display this 
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk pvid vlan 101
 port trunk allow-pass vlan 100 to 101 
#
return
[SW1-GigabitEthernet0/0/3]quit 
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk 
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101 
[SW1-GigabitEthernet0/0/1]quit 
[SW1]

2.开启DHCP 服务,配置VlanIF

vlanif:划分vlan后,同一vlan内的用户可以互相通信,但属于不同vlan的用户不能直接通信,为了实现vlan间通信,可通过配置逻辑的三层接口(vlanif接口)来实现。当交换机需要与网络层的设备通信时,可以在交换机上创建基于vlan的逻辑端口,即vlanif接口。

[SW1]dhcp enable 	                                ##开启DHCP服务
[SW1]interface Vlanif 100
[SW1-Vlanif100]ip address 10.10.100.1 22            ##绑定IP和子网掩码
[SW1-Vlanif100]
[SW1-Vlanif100]dhcp select interface                ## 设置DHCP地址池接口
[SW1-Vlanif100]dhcp server dns-list 114.114.114.114 223.5.5.5                ##配置DHCP域名解析服务器地址
[SW1-Vlanif100]qu	
[SW1-Vlanif100]quit 
[SW1]

3. 通过CAPWAP协议保证AP上线

The device is running!
[AC6005]sysname AC1
[AC1]vlan  batch  100 101
[AC1]dhcp enable 
[AC1]interface GigabitEthernet 0/0/1
[AC1-GigabitEthernet0/0/1]port link-type trunk 
[AC1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101
[AC1-GigabitEthernet0/0/1]display this 
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 100 to 101
#
return
[AC1-GigabitEthernet0/0/1]quit 
[AC1]interface Vlanif 101
[AC1-Vlanif101]ip address 172.16.101.1 24
[AC1-Vlanif101]dhcp select interface 
[AC1-Vlanif101]quit 
[AC1]wlan 
[AC1-wlan-view]ap-group name ap-group1
[AC1-wlan-ap-group-ap-group1]regulatory-domain-profile default
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
[AC1-wlan-ap-group-ap-group1]quit 
[AC1-wlan-view]quit 
[AC1]capwap source interface Vlanif 101
[AC1-wlan-view]ap auth-mode mac-auth 
[AC1-wlan-view]ap-id 0 ap-mac  00e0-fc46-1bf0 
[AC1-wlan-ap-0]ap-name area_1
[AC1-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 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.
[AC1-wlan-ap-0]quit 
[AC1-wlan-view]ap-id 1 ap-mac 00e0-fc9a-5350 
[AC1-wlan-ap-1]ap-name area_2
[AC1-wlan-ap-1]ap-group ap-group1
Warning: This operation may cause AP reset. If the country code changes, it will
 clear 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.	
[AC1-wlan-ap-1]quit 
[AC1-wlan-view]display 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-fc46-1bf0 area_1 ap-group1 -  AP2050DN        fault 0   -
1    00e0-fc9a-5350 area_2 ap-group1 -  AP2050DN        fault 0   -
--------------------------------------------------------------------------------
---
Total: 2
[AC1-wlan-view]

4.wlan的业务配置

[AC1-wlan-view]security-profile name Internet
[AC1-wlan-sec-prof-Internet]security wpa-wpa2 psk pass-phrase a1234567 aes
[AC1-wlan-sec-prof-Internet]quit 
[AC1-wlan-view]ssid-profile name Internet
[AC1-wlan-ssid-prof-Internet]ssid Internet
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-ssid-prof-Internet]quit 
[AC1-wlan-view]vap-profile name Internet
[AC1-wlan-vap-prof-Internet]forward-mode direct-forward 
[AC1-wlan-vap-prof-Internet]service-vlan vlan-id 100
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-vap-prof-Internet]security-profile Internet
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-vap-prof-Internet]ssid-profile Internet
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-vap-prof-Internet]quit 
[AC1-wlan-view]ap-group name ap-group1
[AC1-wlan-ap-group-ap-group1]vap-profile Internet wlan 1 radio 0
Info: This operation may take a few seconds, please wait...done.
[AC1-wlan-ap-group-ap-group1]vap-profile Internet wlan 1 radio 1
Info: This operation may take a few seconds, please wait...done.
[AC1-wlan-ap-group-ap-group1]quit 
[AC1-wlan-view]display arp all 
IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE 
                                          VLAN/CEVLAN PVC                      
------------------------------------------------------------------------------
172.16.101.1    00e0-fcb3-31e4            I -         Vlanif101
172.16.101.106  00e0-fc9a-5350  12        D-0         GE0/0/1
                                           101/-
172.16.101.54   00e0-fc46-1bf0  11        D-0         GE0/0/1
                                           101/-
------------------------------------------------------------------------------
Total:3         Dynamic:2       Static:0     Interface:1    
[AC1-wlan-view]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

开启无线通信
在这里插入图片描述
启动STA1输入无线密码连接WiFi:
在这里插入图片描述
用STA1ping网关地址(10.10.100.1)
在这里插入图片描述

5.配置AC的图形界面

[AC1]vlan batch 200
[AC1]interface GigabitEthernet 0/0/2
[AC1-GigabitEthernet0/0/2]port link-type access 
[AC1-GigabitEthernet0/0/2]port default vlan 200
[AC1-GigabitEthernet0/0/2]quit 
[AC1]interface Vlanif 200
[AC1-Vlanif200]ip address 192.168.100.10 24
[AC1-Vlanif200]quit 
[AC1]ping 192.168.100.1
  PING 192.168.100.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.100.1: bytes=56 Sequence=1 ttl=64 time=30 ms
    Reply from 192.168.100.1: bytes=56 Sequence=2 ttl=64 time=1 ms
    Reply from 192.168.100.1: bytes=56 Sequence=3 ttl=64 time=1 ms
    Reply from 192.168.100.1: bytes=56 Sequence=4 ttl=64 time=1 ms
    Reply from 192.168.100.1: bytes=56 Sequence=5 ttl=64 time=1 ms

  --- 192.168.100.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/6/30 ms
[AC1]http server enable 
This operation will take several minutes, please wait...
Info: Succeeded in starting the HTTP server

在浏览器中输入http://192.168.100.10进入AC管理网页

在这里插入图片描述
用户名:admin
密码:admin@huawei.com

在这里插入图片描述
首页:
在这里插入图片描述
AC界面:
在这里插入图片描述
AP界面:
在这里插入图片描述

总结

举报

相关推荐

0 条评论