组网需求
如图1,AC连接园区出口网关Router,并通过接入交换机SwitchA与AP连接。
用户希望通过WLAN部署,提供名为“test”的无线网络方便用户随时随地接入。同时,用户希望通过路由器Router来做DHCP Server为用户提供10.10.10.0/24网段的IP地址,并在AC上对用户进行集中控制和管理。
图1 配置中型网络WLAN基本业务组网图
配置思路
采用如下的思路配置中型网络的WLAN基本业务:
配置AP、AC和上层网络设备之间实现网络互通。
在AC上配置基于接口的DHCP服务器为AP分配IP地址,同时配置AC作为DHCP中继,由AC连接的路由器为STA分配IP地址。
配置WLAN基本业务,保证用户能够通过WLAN网络接入Internet。
操作步骤
1、配置SwitchA和AC,使AP与AC之间能够传输CAPWAP报文
说明:
本示例的业务数据转发方式采用隧道转发。如果用户的数据转发方式为直接转发,建议在SwitchA连接AP的接口GE0/0/1上配置端口隔离,如果不配置端口隔离,可能会在VLAN内存在不必要的广播报文,或者导致不同AP间的WLAN用户二层互通的问题。# 配置SwitchA连接AP的接口GE0/0/1加入VLAN100(管理VLAN),SwitchA连接AC的接口GE0/0/2加入VLAN100。
# 配置SwitchA连接AP的接口GE0/0/1加入VLAN100(管理VLAN),SwitchA连接AC的接口GE0/0/2加入VLAN100。
<Quidway> system-view [Quidway] sysname SwitchA [SwitchA] vlan batch 100 [SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] port link-type trunk [SwitchA-GigabitEthernet0/0/1] port trunk pvid vlan 100 [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 [SwitchA-GigabitEthernet0/0/1] port-isolate enable [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] port link-type trunk [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 [SwitchA-GigabitEthernet0/0/2] quit
# 配置AC连接SwitchA的接口GE0/0/1加入VLAN100。
<AC6605> system-view [AC6605] sysname AC [AC] vlan batch 100 [AC] interface gigabitethernet 0/0/1 [AC-GigabitEthernet0/0/1] port link-type trunk [AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 [AC-GigabitEthernet0/0/1] quit
2、配置AC与上层网络设备互通
# 配置VLANIF101(业务VLAN)和VLANIF102。
说明:
隧道转发模式下,管理VLAN和业务VLAN不能配置为同一VLAN。
[AC] vlan batch 101 102 [AC] interface vlanif 101 [AC-Vlanif101] ip address 10.10.10.1 24 [AC-Vlanif101] quit [AC] interface vlanif 102 [AC-Vlanif102] ip address 11.1.1.2 24 [AC-Vlanif102] quit
# 配置AC的缺省路由。
[AC] ip route-static 0.0.0.0 0.0.0.0 11.1.1.1
# 配置AC连接Router的接口GE0/0/2加入VLAN102。
[AC] interface gigabitethernet 0/0/2 [AC-GigabitEthernet0/0/2] port link-type trunk [AC-GigabitEthernet0/0/2] port trunk allow-pass vlan 102 [AC-GigabitEthernet0/0/2] quit
3、配置AC给AP分配IP地址,Router给STA分配IP地址。
# 配置AC通过接口地址池为AP分配IP地址。
[AC] dhcp enable [AC] interface vlanif 100 [AC-Vlanif100] ip address 192.168.10.1 24 [AC-Vlanif100] dhcp select interface [AC-Vlanif100] quit
# 配置AC作为DHCP中继并使能DHCP中继探测用户表项功能。
[AC] dhcp relay detect enable [AC] interface vlanif 101 [AC-Vlanif101] dhcp select relay [AC-Vlanif101] dhcp relay server-ip 11.1.1.1 [AC-Vlanif101] quit
# 配置Router作为DHCP服务器为STA分配IP地址。
<Huawei> system-view [Huawei] sysname Router [Router] dhcp enable [Router] ip pool sta [Router-ip-pool-sta] gateway-list 10.10.10.1 [Router-ip-pool-sta] network 10.10.10.0 mask 24 [Router-ip-pool-sta] quit [Router] vlan batch 102 [Router] interface vlanif 102 [Router-Vlanif102] ip address 11.1.1.1 24 [Router-Vlanif102] dhcp select global [Router-Vlanif102] quit [Router] interface gigabitethernet 2/0/0 [Router-GigabitEthernet2/0/0] port link-type trunk [Router-GigabitEthernet2/0/0] port trunk allow-pass vlan 102 [Router-GigabitEthernet2/0/0] quit [Router] ip route-static 10.10.10.0 24 11.1.1.2
4、配置AC的系统参数
# 配置AC的国家码。
[AC] wlan ac-global country-code cn Warning: Modify the country code may delete configuration on those AP which use the global country code and reset them, continue?[Y/N]:y # 配置AC ID和运营商标识。 [AC] wlan ac-global ac id 1 carrier id other Warning: Modify the carrier ID or AC ID may cause all of the AP offline, continu e?[Y/N]:y
# 配置AC的源接口。
[AC] wlan [AC-wlan-view] wlan ac source interface vlanif 100
5、在AC上管理AP
# 现场获取AP的MAC地址后,查看AP的设备类型ID。
# 根据查询到的AP设备类型ID,离线添加AP。假设AP的类型为AP6010DN-AGN,其MAC地址为60de-4476-e360。
[AC-wlan-view] ap-auth-mode mac-auth [AC-wlan-view] ap id 0 type-id 19 mac 60de-4476-e360 [AC-wlan-ap-0] quit
# 配置AP域并将AP加入到AP域。
[AC-wlan-view] ap-region id 10 [AC-wlan-ap-region-10] quit [AC-wlan-view] ap id 0 [AC-wlan-ap-0] region-id 10 [AC-wlan-ap-0] quit
# 将AP上电后,可以查看到AP的“AP State”字段为“normal”。
[AC-wlan-view] display ap all
All AP information:
Normal[1],Fault[0],Commit-failed[0],Committing[0],Config[0],Download[0]
Config-failed[0],Standby[0],Type-not-match[0],Ver-mismatch[0]
------------------------------------------------------------------------------
AP AP AP Profile AP AP
/Region
ID Type MAC ID State Sysname
------------------------------------------------------------------------------
0 AP6010DN-AGN 60de-4476-e360 0/10 normal ap-0
------------------------------------------------------------------------------
Total number: 1,printed: 1
6、配置WLAN业务参数
# 创建名为“wmm”的WMM模板。
[AC-wlan-view] wmm-profile name wmm id 1 [AC-wlan-wmm-prof-wmm] quit
# 创建名为“radio”的射频模板,绑定WMM模板“wmm”。
[AC-wlan-view] radio-profile name radio id 1 [AC-wlan-radio-prof-radio] wmm-profile name wmm [AC-wlan-radio-prof-radio] quit [AC-wlan-view] quit
# 创建WLAN-ESS接口1。
[AC] interface wlan-ess 1 [AC-Wlan-Ess1] port hybrid pvid vlan 101 [AC-Wlan-Ess1] port hybrid untagged vlan 101 [AC-Wlan-Ess1] quit
# 创建名为“security”的安全模板。
[AC] wlan [AC-wlan-view] security-profile name security id 1 [AC-wlan-sec-prof-security] quit #此处我们并未使用安全密码,如果你需要使用密码请在这里配置
# 创建名为“traffic”的流量模板。
[AC-wlan-view] traffic-profile name traffic id 1 [AC-wlan-traffic-prof-traffic] quit
# 创建名为“test”的服务集并绑定WLAN-ESS接口、安全模板和流量模板。
[AC-wlan-view] service-set name test id 1 [AC-wlan-service-set-test] ssid test [AC-wlan-service-set-test] wlan-ess 1 [AC-wlan-service-set-test] security-profile name security [AC-wlan-service-set-test] traffic-profile name traffic [AC-wlan-service-set-test] service-vlan 101 [AC-wlan-service-set-test] forward-mode tunnel [AC-wlan-service-set-test] quit
7、配置VAP并下发
# 配置VAP。
[AC-wlan-view] ap 0 radio 0 [AC-wlan-radio-0/0] radio-profile name radio [AC-wlan-radio-0/0] service-set name test [AC-wlan-radio-0/0] quit
# 提交配置。
[AC-wlan-view] commit ap 0 Warning: Committing configuration may cause service interruption, continue?[Y/N] :y
8、验证配置结果
配置完成后,通过display vap ap 0 radio 0命令,可以查看到VAP已创建成功。
[AC-wlan-view] display vap ap 0 radio 0
All VAP Information(Total-1):
SS: Service-set BP: Bridge-profile MP: Mesh-profile
----------------------------------------------------------------------
AP ID Radio ID SS ID BP ID MP ID WLAN ID BSSID Type
0 0 1 - - 1 60DE-4476-E360 service
----------------------------------------------------------------------
Total: 1 STA搜索到名为“test”的无线网络并正常关联后,在AC上执行display station assoc-info命令,可以查看到用户已经接入到无线网络“test”中。
[AC-wlan-view] display station assoc-info ap 0 radio 0
------------------------------------------------------------------------------
STA MAC AP ID RADIO ID SS ID SSID
------------------------------------------------------------------------------
9021-55dc-3e17 0 0 1 test
------------------------------------------------------------------------------
Total stations: 1





