apnetwork服务代码,apnetwork服务器地址

一、组网需求

1. S2交换机支持WLAN-AC功能(若实际环境所用交换机不支持,可用普通AC替代),作为AC使用(后面内容中的AC就是实际的S2交换机)。

2. AC采用旁挂组网方式,AC与AP处于同一个二层网络。

3. AC作为DHCP服务器给AP分配IP地址,S1交换机作为DHCP服务器给接入的STA分配IP地址。

4. 业务数据采用直接转发模式。

二、eNSP实验视频:

视频加载中…

三、配置思路

1. 配置有线网络侧互联互通

2. 配置AP上线。

1)创建AP组,用于将需要进行相同配置的AP都加入到AP组,实现统一配置。

2)配置AC的系统参数,包括国家码、AC与AP之间通信的源接口。

3)配置AP上线的认证方式并离线导入AP,实现AP正常上线。

3. 配置WLAN业务参数并下发给AP,实现STA访问WLAN网络功能。

四、配置步骤数据规划

配置项

配置参数

AP管理VLAN

VLAN100

STA业务VLAN

VLAN101

DHCP服务器

AC作为DHCP服务器为AP分配IP地址

S1作为DHCP服务器为STA分配IP地址,STA的默认网关为192.168.101.254

AP的IP地址池

192.168.100.1-192.168.100.253/24

STA的IP地址池

192.168.101.1-192.168.101.253/24

AC的源接口IP地址

VLANIF100:192.168.100.254/24

AP组

名称:ap-group1

引用模板:VAP模板HCIA-wlan、域管理模板default

域管理模板

名称:default

国家码:中国(CN)

SSID模板

名称:HCIA-WLAN

SSID名称:HCIA- WLAN

安全模板

名称:HCIA- WLAN

安全策略:WPA-WPA2+PSK+AES

密码:HCIA-Datacom

VAP模板

名称:HCIA- WLAN

转发模式:直接转发

业务VLAN:VLAN101

引用模板:SSID模板HCIA- WLAN、安全模板HCIA- WLAN

步骤 1 设备基本配置

# 设备设备命名(拓扑中的S2命名为AC)

略。

# 关闭S1和AC中间的多余链路,只针对《HCIA-Datacom实验室搭建指南V1.0》所描述的环境,其他环境可以忽略此步骤。

[S1] interface GigabitEthernet 0/0/11

[S1-GigabitEthernet0/0/11]shutdown

[S1-GigabitEthernet0/0/11]quit

[S1] interface GigabitEthernet 0/0/12

[S1-GigabitEthernet0/0/12]shutdown

[S1-GigabitEthernet0/0/12]quit

# 开启S3和S4上连接AP接口的PoE供电功能

[S3]interface GigabitEthernet 0/0/4

[S3-GigabitEthernet0/0/4]poe enable

poe enable命令用来使能接口的PoE功能。当接口检测到接口下有受电(PD)设备时,会通过接口给接口下接的PD设备供电。缺省情况下,接口PoE功能处于使能状态。故此处执行此命令仅为示例,实际环境下可以不执行。

[S4]interface GigabitEthernet 0/0/4

[S4-GigabitEthernet0/0/4]poe enable

步骤 2 有线侧网络配置

# VLAN配置

[S1]vlan batch 100 101

Info: This operation may take a few seconds. Please wait for a moment…done.

[S1]interface GigabitEthernet 0/0/13

[S1-GigabitEthernet0/0/13]port link-type trunk

[S1-GigabitEthernet0/0/13]port trunk allow-pass vlan 100 101

[S1-GigabitEthernet0/0/13]quit

[S1]interface GigabitEthernet 0/0/14

[S1-GigabitEthernet0/0/14]port link-type trunk

[S1-GigabitEthernet0/0/14]port trunk allow-pass vlan 100 101

[S1-GigabitEthernet0/0/14]quit

[S1]interface GigabitEthernet 0/0/10

[S1-GigabitEthernet0/0/10]port link-type trunk

[S1-GigabitEthernet0/0/10]port trunk allow-pass vlan 100 101

[S1-GigabitEthernet0/0/10]quit

[AC]vlan batch 100 101

Info: This operation may take a few seconds. Please wait for a moment…done.

[AC]interface GigabitEthernet 0/0/10

[AC-GigabitEthernet0/0/10]port link-type trunk

[AC-GigabitEthernet0/0/10]port trunk allow-pass vlan 100 101

[AC-GigabitEthernet0/0/10]quit

[S3]vlan batch 100 101

Info: This operation may take a few seconds. Please wait for a moment…done.

[S3]interface GigabitEthernet 0/0/1

[S3-GigabitEthernet0/0/1]port link-type trunk

[S3-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101

[S3-GigabitEthernet0/0/1]quit

[S3]interface GigabitEthernet 0/0/4

[S3-GigabitEthernet0/0/4]port link-type trunk

[S3-GigabitEthernet0/0/4]port trunk pvid vlan 100

[S3-GigabitEthernet0/0/4]port trunk allow-pass vlan 100 101

[S3-GigabitEthernet0/0/4]quit

[S4]vlan batch 100 101

Info: This operation may take a few seconds. Please wait for a moment…done.

[S4]interface GigabitEthernet0/0/1

[S4-GigabitEthernet0/0/1] port link-type trunk

[S4-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 101

[S4-GigabitEthernet0/0/1]quit

[S4]interface GigabitEthernet0/0/4

[S4-GigabitEthernet0/0/4] port link-type trunk

[S4-GigabitEthernet0/0/4] port trunk pvid vlan 100

[S4-GigabitEthernet0/0/4] port trunk allow-pass vlan 100 to 101

[S4-GigabitEthernet0/0/4]quit

# 配置接口IP地址

[S1]interface Vlanif 101

[S1-Vlanif101]ip address 192.168.101.254 24

STA的网关。

[S1-Vlanif101]quit

[S1]interface LoopBack 0

[S1-LoopBack0] ip address 10.0.1.1 32

后续做测试用,无实际用途。

[S1-LoopBack0]quit

[AC]interface Vlanif 100

[AC-Vlanif100]ip address 192.168.100.254 24

# DHCP配置

[S1]dhcp enable

Info: The operation may take a few seconds. Please wait for a moment.done.

[S1]ip pool sta

Info:It's successful to create an IP address pool.

创建STA接入时所使用的IP地址池。

[S1-ip-pool-sta]network 192.168.101.0 mask 24

[S1-ip-pool-sta]gateway-list 192.168.101.254

[S1-ip-pool-sta]quit

[S1]interface Vlanif 101

[S1-Vlanif101]dhcp select global

[S1-Vlanif101]quit

[AC]dhcp enable

Info: The operation may take a few seconds. Please wait for a moment.done.

[AC]ip pool ap

Info: It is successful to create an IP address pool.

创建AP接入时所使用的IP地址池。

[AC-ip-pool-ap]network 192.168.100.254 mask 24

[AC-ip-pool-ap]gateway-list 192.168.100.254

[AC-ip-pool-ap]quit

[AC]interface Vlanif 100

[AC-Vlanif100]dhcp select global

[AC-Vlanif100]quit

S1作为STA的DHCP Server ,AC作为AP的DHCP Server,分别配置DHCP服务。

步骤 3 配置AP上线

# 创建名为ap-group1的AP组

[AC]wlan

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

Info: This operation may take a few seconds. Please wait for a moment.done.

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

# 创建域管理模板,在域管理模板下配置AC的国家码

[AC]wlan

[AC-wlan-view]regulatory-domain-profile name default

域管理模板提供对AP的国家码、调优信道集合和调优带宽等的配置。

缺省情况下,系统上存在名为default的域管理模板。故当前进入了默认存在的default模板。

[AC-wlan-regulate-domain-default]country-code cn

Info: The current country code is same with the input country code.

国家码用来标识AP射频所在的国家,不同国家码规定了不同的AP射频特性,包括AP的发送功率、支持的信道等。配置国家码是为了使AP的射频特性符合不同国家或区域的法律法规要求。缺省情况下,设备的国家码标识为“CN”。

[AC-wlan-regulate-domain-default]quit

# 在AP组下引用域管理模板

[AC]wlan

[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. Continue?[Y/N]:y

在AP组视图下,regulatory-domain-profile命令用来将指定的域管理模板引用到AP或AP组。缺省情况下,AP组下引用名为default的域管理模板,AP下未引用域管理模板。缺省的域管理模板中国家码为中国,2.4G调优信道包括1、6、11,5G调优信道集合包括149、153、157、161、165 。故这一步和上一步的配置在实际操作时可以省略。

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

# 配置AC建立CAPWAP隧道的源接口

[AC]capwap source interface Vlanif 100

capwap source interface命令用来配置AC建立CAPWAP隧道使用的接口,作为AC的源接口,用于AC和AP间建立CAPWAP隧道通信。

# 在AC上离线导入AP,并将AP加入配置好的AP组“ap-group1”中。

AC上添加AP的方式有三种:

• 离线导入AP:预先配置AP的MAC地址和SN,当AP与AC连接时,如果AC发现AP和预先增加的AP的MAC地址和SN匹配,则AC开始与AP建立连接。

• 自动发现AP:当配置AP的认证模式为不认证或配置AP的认证模式为MAC或SN认证且将AP加入AP白名单中,则当AP与AC连接时,AP将被AC自动发现并正常上线。

• 手工确认未认证列表中的AP:当配置AP的认证模式为MAC或SN认证,但AP没有离线导入且不在已设置的AP白名单中,则该AP会被记录到未授权的AP列表中。需要用户手工确认后,此AP才能正常上线。

[AC]wlan

[AC-wlan-view]ap auth-mode mac-auth

ap auth-mode命令用来配置AP认证模式,只有通过认证的AP才能允许上线。除了MAC地址认证之外,还支持SN认证和不认证。缺省情况下,AP认证模式为MAC地址认证。

注:AP的MAC地址和SN可以通过设备包装箱内MAC地址标签和SN标签查询得到。

[AC-wlan-view]ap-id 0 ap-mac 60F1-8A9C-2B40

ap-id命令用来离线增加AP设备或进入AP视图。

当增加AP时,若使用MAC认证,需要配置ap-mac参数;若使用SN认证,则需要配置ap-sn参数。

当进入AP视图时,只需要输入ap-id即可进入相应的AP视图。

[AC-wlan-ap-0]ap-name ap1

ap-name命令用来配置单个AP的名称,注意各个AP的名字不能重复。如果未配置AP的名称,那么AP上线后默认的名称为AP的MAC地址。

[AC-wlan-ap-0]ap-group ap-group1

ap-group命令用来配置AP所加入的组,AC会给AP下发相应ap-group内的配置。比如此处AP1被加入了ap-group1,那么ap-group1关联的域管理模板、射频模板、VAP模板都会被下发给AP1。缺省情况下,未配置AP加入的组,修改AP所加入的组后,下发配置,AP自动重启,会加入到修改后的AP组中。

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 continue? [Y/N]:y //需要输入y来确认继续

Info: This operation may take a few seconds. Please wait for a moment.. done.

[AC-wlan-ap-0]quit

[AC-wlan-view]ap-id 1 ap-mac B4FB-F9B7-DE40

[AC-wlan-ap-1]ap-name ap2

[AC-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 continue? [Y/N]:y //需要输入y来确认继续

Info: This operation may take a few seconds. Please wait for a moment.. done.

[AC-wlan-ap-1]quit

# 查看当前的AP信息

[AC]wlan

[AC-wlan-view]display 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-fc25-0ed0 ap1 ap-group1 192.168.100.206 AirEngine5760 nor 0 30M:4S

1 00e0-fc0f-07a0 ap2 ap-group1 192.168.100.170 AirEngine5760 nor 0 31M:31S

—————————————————————————————————————————————–

Total: 2

display ap命令用来查看AP信息,包括AP的IP地址、AP的型号(AirEngine5760)、AP的状态(normal)、上线时长等。

此外,还可以在命令后面加by-state state、by-ssid ssid来查筛选处于特定状态或者使用指定SSID的AP。

可以看到此时两台AP都处于正常状态。(更多状态描述请看本实验附录)

步骤 4 配置WLAN业务参数

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

[AC-wlan-view]security-profile name HCIA-WLAN

[AC-wlan-sec-prof-HCIA-WLAN]security wpa-wpa2 psk pass-phrase HCIA-Datacom aes

security psk命令用来配置WPA/WPA2的预共享密钥认证和加密。

当前使用WPA和WPA2混合方式,用户终端使用WPA或WPA2都可以进行认证。预共享秘钥(PSK)为HCIA-Datacom。通过AES加密算法加密用户数据。

[AC-wlan-sec-prof-HCIA-WLAN]quit

# 创建名为“HCIA-WLAN”的SSID模板,并配置SSID名称为“HCIA-WLAN”。

[AC]wlan

[AC-wlan-view]ssid-profile name HCIA-WLAN

创建名为“HCIA-WLAN”的SSID模板。

[AC-wlan-ssid-prof-HCIA-WLAN]ssid HCIA-WLAN

配置SSID名称为“HCIA-WLAN”。

Info: This operation may take a few seconds, please wait.done.

[AC-wlan-ssid-prof-HCIA-WLAN]quit

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

[AC]wlan

[AC-wlan-view]vap-profile name HCIA-WLAN

vap-profile命令用来创建VAP模板。

在VAP模板下可以配置数据转发模式,此外,VAP模板能够引用SSID模板、安全模板、流量模板等。

[AC-wlan-vap-prof-HCIA-WLAN]forward-mode direct-forward

forward-mode命令用来配置VAP模板下的数据转发方式,缺省情况下,VAP模板下的数据转发方式为直接转发。

[AC-wlan-vap-prof-HCIA-WLAN]service-vlan vlan-id 101

service-vlan命令用于配置VAP的业务VLAN,当STA接入无线网络之后,从AP转发出来的用户数据就会带上service-VLAN的tag。

Info: This operation may take a few seconds, please wait.done.

[AC-wlan-vap-prof-HCIA-WLAN]security-profile HCIA-WLAN

引用安全模板“HCIA-WLAN”。

Info: This operation may take a few seconds, please wait.done.

[AC-wlan-vap-prof-HCIA-WLAN]ssid-profile HCIA-WLAN

引用SSID模板“HCIA-WLAN”。

Info: This operation may take a few seconds, please wait.done.

[AC-wlan-vap-prof-HCIA-WLAN]quit

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

[AC]wlan

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

[AC-wlan-ap-group-ap-group1]vap-profile HCIA-WLAN wlan 1 radio all

vap-profile命令用来将指定的VAP模板引用到射频。执行该命令之后,VAP下所有的配置,包括VAP引用的各类模板下的配置都会下发给到AP的射频。

Info: This operation may take a few seconds, please wait…done.

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

六、配置参考

S1的配置

#

sysname S1

#

undo info-center enable

#

vlan batch 100 to 101 201

#

ip pool sta

gateway-list 192.168.101.254

network 192.168.101.0 mask 255.255.255.0

dns-list 8.8.8.8

#

interface Vlanif101

ip address 192.168.101.254 255.255.255.0

dhcp select global

#

interface Vlanif201

ip address 192.168.201.1 255.255.255.0

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

port link-type access

port default vlan 201

#

interface GigabitEthernet0/0/10

port link-type trunk

port trunk allow-pass vlan 100 to 101

#

interface GigabitEthernet0/0/11

#

interface GigabitEthernet0/0/12

#

interface GigabitEthernet0/0/13

port link-type trunk

port trunk allow-pass vlan 100 to 101

#

interface GigabitEthernet0/0/14

port link-type trunk

port trunk allow-pass vlan 100 to 101

#

ip route-static 0.0.0.0 0.0.0.0 192.168.201.2

#

user-interface con 0

user-interface vty 0 4

#

return

AC的配置

#

sysname AC

#

vlan batch 100 to 101

#

dhcp enable

#

ip pool ap

gateway-list 192.168.100.254

network 192.168.100.0 mask 255.255.255.0

dns-list 8.8.8.8

#

interface Vlanif100

ip address 192.168.100.254 255.255.255.0

dhcp select global

#

interface MEth0/0/1

undo negotiation auto

duplex half

#

interface GigabitEthernet0/0/10

port link-type trunk

port trunk allow-pass vlan 100 to 101

#

undo info-center enable

#

capwap source interface vlanif100

#

wlan

traffic-profile name default

security-profile name default

security-profile name HCIA-WLAN

security wpa-wpa2 psk pass-phrase %^%#y+UE#^q{AS"<F`BZ<$I/("n_=K~1kERl@b5fHU+T

%^%# aes #密码是12345678

security-profile name default-wds

security-profile name default-mesh

ssid-profile name default

ssid-profile name HCIA-WLAN

vap-profile name default

vap-profile name HCIA-WLAN

service-vlan vlan-id 101

ssid-profile HCIA-WLAN

security-profile HCIA-WLAN

wds-profile name default

mesh-handover-profile name default

mesh-profile name default

regulatory-domain-profile name default

air-scan-profile name default

rrm-profile name default

radio-2g-profile name default

radio-5g-profile name default

wids-spoof-profile name default

wids-profile name default

wireless-access-specification

ap-system-profile name default

port-link-profile name default

wired-port-profile name default

serial-profile name preset-enjoyor-toeap

ap-group name default

ap-group name ap-group

ap-group name ap-group1

radio 0

vap-profile HCIA-WLAN wlan 1

radio 1

vap-profile HCIA-WLAN wlan 1

radio 2

vap-profile HCIA-WLAN wlan 1

ap-id 0 type-id 56 ap-mac 00e0-fcb8-71c0 ap-sn 210235448310895FA473

ap-name ap4

ap-group ap-group1

ap-id 1 type-id 47 ap-mac 00e0-fc37-3e90 ap-sn 210235448310051FFA31

ap-name ap3

ap-group ap-group1

provision-ap

#

dot1x-access-profile name dot1x_access_profile

#

mac-access-profile name mac_access_profile

#

return

S3的配置

#

sysname S3

#

vlan batch 100 to 101

#

interface GigabitEthernet0/0/1

port link-type trunk

port trunk allow-pass vlan 100 to 101

#

interface GigabitEthernet0/0/4

port link-type trunk

port trunk pvid vlan 100

port trunk allow-pass vlan 100 to 101

#

return

S4的配置

#

sysname S4

#

vlan batch 100 to 101

#

interface GigabitEthernet0/0/1

port link-type trunk

port trunk allow-pass vlan 100 to 101

#

interface GigabitEthernet0/0/4

port link-type trunk

port trunk pvid vlan 100

port trunk allow-pass vlan 100 to 101

#

return

本文地址:https://www.cknow.cn/archives/11404

以上内容源自互联网,由百科助手整理汇总,其目的在于收集传播生活技巧,行业技能,本网站不对其真实性、可靠性承担任何法律责任。特此声明!

如发现本站文章存在版权问题,烦请提供版权疑问、侵权链接、联系方式等信息发邮件至candieraddenipc92@gmail.com,我们将及时沟通与处理。