适用WX3024版本:ComwareSoftware,Version5.20,Beta3105P01
一、组网需求
WX3024、WA2220E-AG、便携机(安装有11b/g无线网卡)
二、组网图
AC上VLAN1、2的IP地址分别为192.168.1.254、192.168.2.254。
WA2220E-AG处在VLAN1。
无线客户端处在VLAN2。
本例中WA2220E-AG的序列号为21023***29F0081000109。
SSID的名称为H3C-local-portal。
三、WX3024配置步骤
#在ACFlash中新建一个名为portal的文件夹,使用命令dir查看Flash中的文件信息:
<AC>mkdirportal
#进入到新建的portal文件夹中,使用命令pwd查看当前所在目录:
<AC>cdportal
#使用TFTP方式将定制的页面文件http.zip上传到flash:/portal中:
<AC>tftp192.168.1.1gethttp.zip
#配置本地认证用户名
[AC]local-userportal
[AC-luser-portal]service-typeportal
[AC-luser-portal]passwordsimpleportal
#配置无线服务模板
[AC]wlanservice-template2clear
[AC-wlan-st-2]ssidH3C-local-portal
[AC-wlan-st-2]bindWLAN-ESS2
[AC-wlan-st-2]service-templateenable
#配置无线口,添加到vlan2
[AC]interfaceWLAN-BSS2
[AC-WLAN-BSS2]portaccessvlan2
#在AC下绑定无线服务模板
[AC]wlanapapmodelWA2220E-AG
[AC-wlan-ap-ap]serial-id21023***22W0073000002
[AC-wlan-ap-ap]radio2
[AC-wlan-ap-ap-radio-2]service-template2
[AC-wlan-ap-ap-radio-2]radioenable
#配置PortalServer和免认证规则
[AC]portalserverlocalip192.168.1.254
[AC]portalfree-rule0sourceinterfaceGigabitEthernet1/0/1destinationany
[AC]portallocal-serverhttp
#绑定定制的HTTP页面到需要Portal认证的SSID
[AC]portallocal-serverbindssidH3C-local-portalfilehttp.zip
#在Vlan接口下使能Portal
[AC]interfaceVlan-interface2
[AC-Vlan-interface1]ipaddress192.168.2.25424
[AC-Vlan-interface1]portalserverlocalmethoddirect
#p#
四、WX3024交换机的典型配置
#
version5.20,Beta3105P01
#
sysnameAC
#
domaindefaultenablesystem
#
telnetserverenable
#
port-securityenable
#
portalserverlocalip192.168.1.254
portalfree-rule0sourceinterfaceGigabitEthernet1/0/1destinationany
portallocal-serverhttp
portallocal-serverbindssidH3C-local-portalfilehttp.zip
#
oapmanagement-ip192.168.0.101slot0
#
vlan1
#
vlan2
#
domainsystem
access-limitdisable
stateactive
idle-cutdisable
self-service-urldisable
#
dhcpserverip-poolvlan1
network192.168.1.0mask255.255.255.0
#
dhcpserverip-poolvlan2
network192.168.2.0mask255.255.255.0
gateway-list192.168.2.254
#
user-groupsystem
#
local-useradmin
passwordsimpleadmin
authorization-attributelevel3
service-typetelnet
local-userportal
passwordsimpleportal
service-typeportal
#
wlanrrm
dot11amandatory-rate61224
dot11asupported-rate918364854
dot11bmandatory-rate12
dot11bsupported-rate5.511
dot11gmandatory-rate125.511
dot11gsupported-rate69121824364854
#
wlanservice-template2clear
ssidH3C-local-portal
bindWLAN-ESS2
service-templateenable
#
interfaceNULL0
#
interfaceVlan-interface1
ipaddress192.168.1.254255.255.255.0
#
interfaceVlan-interface2
ipaddress192.168.2.254255.255.255.0
portalserverlocalmethoddirect
#
interfaceGigabitEthernet1/0/1
portlink-typetrunk
porttrunkpermitvlanall
#
interfaceWLAN-ESS2
portaccessvlan2
#
wlanapapmodelWA2220E-AG
serial-id21023***29F0081000109
radio1
radio2
service-template2
radioenable
#
dhcpenable
#
loadxml-configuration
#
user-interfaceaux0
user-interfacevty04
authentication-modescheme
userprivilegelevel3
#
return
#p#
五、验证结果
客户端的相关配置
在STA上打开IE,输入任意IP地址(如1.1.1.1),推出定制的HTTP认证页面,输入帐号,完成认证。
六、Q&A
1、定制的HTTP页面文件必须放置在flash:/portal文件夹下。
2、定制的页面文件只能是.zip类型,该文件名称任意,注意压缩包内的文件名称和目录一定要图示的文件名称保持一致。
【编辑推荐】