一、 案例目标
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 100101[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 101100[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 100101[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 100101[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上线
a)capwap:CAPWAP(无线接入点控制和配置协议),用于无线终端接入点AP和无线网络控制器AC之间的通信交互,实现AC对其所关联的AP的集中管理和控制。主要内容:AP对AC的自动发信、AP&AC的状态机运行和维护、AC对AP进行管理、业务配置下发、STA数据封装CAPWAP隧道进行转发;
The device is running![AC6005]sysname AC1
[AC1]vlan batch 100101[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 100101[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 ##创建ap-group1组[AC1-wlan-ap-group-ap-group1]regulatory-domain-profile default ##创建域管理模板并绑定到ap-group1中
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##通过capwap协议使AP与AC通信[AC1-wlan-view]ap auth-mode mac-auth ## 创建ap模板[AC1-wlan-view]ap-id 0 ap-mac 00e0-fc46-1bf0 ##绑定ap的id和MAC地址,通过display arp 查询AP的MAC地址[AC1-wlan-ap-0]ap-name area_1 ##对ap-0 命名[AC1-wlan-ap-0]ap-group ap-group1 ##将ap-0 绑入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 waitfor a moment.. done.
[AC1-wlan-ap-0]quit
[AC1-wlan-view]ap-id 1 ap-mac 00e0-fc9a-5350 ##绑定第二个ap的id和MAC地址[AC1-wlan-ap-1]ap-name area_2 ##对ap-1命名[AC1-wlan-ap-1]ap-group ap-group1 ##将ap-1绑入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 waitfor a moment.. done.
[AC1-wlan-ap-1]quit
[AC1-wlan-view]display ap all ##显示ap信息
Info: This operation may take a few seconds. Please waitfor 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]
AC与AP没通信时,AP1的IP地址默认为169.254.1.1
AC与AP1通信,AP1自动获取AC网段的IP地址
4.wlan的业务配置
a) 安全模板:配置WLAN安全策略,可以对无线终端进行身份验证,对用户的报文进行加密,保护WLAN网络和用户的安全。WLAN安全策略支持开放认证、WEP、WPA/WPA2-PSK、WPA/WPA2-802.1X、WAPI-PSK和WAPI-证书,在安全模板中选择其中一种进行配置。开放认证和WPA/WPA2-802.1X还需要和NAC一起配置,有效管理用户的接入。
b) SSID模板:SSID用来指定不同的无线网络。在STA上搜索可接入的无线网络时,显示出来的网络名称就是SSID。SSID模板主要用于配置WLAN网络的SSID名称,还可以配置其他功能,主要包括如下功能:
1.隐藏SSID功能:用户在创建无线网络时,为了保护无线网络的安全,可以对无线网络名称进行隐藏设置。这样,只有知道网络名称的无线用户才能连接到这个无线网络中。
2.单个VAP下能够关联成功的最大用户数:单个VAP下接入的用户数越多,每个用户能够使用的平均网络资源就越少,为了保证用户的上网体验,可以根据实际的网络状况配置合理的最大用户接入数。
3.用户数达到最大时自动隐藏SSID的功能:使能用户数达到最大时自动隐藏SSID的功能后,当WLAN网络下接入的用户数达到最大时,SSID会被隐藏,新用户将无法搜索到SSID。
4.禁止非HT终端接入功能:只支持802.11a、802.11b、802.11g类型协议的非HT终端,其数据传输速率远低于802.11n和802.11ac类型协议的终端。当非HT终端接入到无线网络中,会降低同网络中802.11n和802.11ac类型协议终端的数据传输速度。为保护802.11n和802.11ac类型协议终端的数据传输速度,可以禁止非HT 终端接入。
5.STA关联老化时间:若AP连续一段时间内未收到用户的任何数据报文,当时间到达配置老化时间后,用户下线。
DTIM周期参数:DTIM周期表示间隔DTIM个Beacon帧后,下个Beacon帧中会携带DTIM指示,唤醒处于省电状态的STA,并向其传输AP上为之暂存的广播与组播帧。
c) VAP模板: 在VAP模板下配置各项参数,然后在AP组或AP中引用VAP模板,AP上就会生成VAP,VAP用来为STA提供无线接入服务。通过配置VAP模板下的参数,使AP实现为STA提供不同无线业务服务的能力。
[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 ##创建ssid模板[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 ##创建vap模板[AC1-wlan-vap-prof-Internet]forward-mode direct-forward ##配置vap模板下数据转发方式[AC1-wlan-vap-prof-Internet]service-vlan vlan-id 100##设置服务vlan id
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 ##绑定ssid模板
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 ##进入ap-group1组[AC1-wlan-ap-group-ap-group1]vap-profile Internet wlan 1 radio 0##启动2.4G信号(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##启动5G信号(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 intime
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=56Sequence=1ttl=64time=30 ms
Reply from 192.168.100.1: bytes=56Sequence=2ttl=64time=1 ms
Reply from 192.168.100.1: bytes=56Sequence=3ttl=64time=1 ms
Reply from 192.168.100.1: bytes=56Sequence=4ttl=64time=1 ms
Reply from 192.168.100.1: bytes=56Sequence=5ttl=64time=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##启动HTTP服务
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界面:
总结
版权归原作者 皮皮蟹虾饺 所有, 如有侵权,请联系我们删除。