HTTP协议Portal认证流程

描述

HTTP协议Portal认证流程

    服务器

此过程中如下几点需要关注:

WLAN无线场景在AP上完成,而不是AC。

Portal服务器和RADIUS服务器虽然大部分场景下是一个服务器,但是从逻辑和功能上来说,是两个网元,不可混为一谈。

关键配置检查

VAP模板配置检查

根据SSID找到对应VAP模板,检查VAP模板下配置,主要检查认证模板配置。

1. 通过命令display vap-profile all查看所有的VAP模板,根据SSID找到对应的VAP模板。

 

[Huawei] display vap-profile all
FMode   : Forward mode
STA U/D : Rate limit client up/down
VAP U/D : Rate limit VAP up/down
BR2G/5G : Beacon 2.4G/5G rate
---------------------------------------------------------------
Name         FMode    Type     VLAN       AuthType     STA U/D(Kbps)  VAP U/D(Kbps)  BR2G/5G(Mbps)  Reference  SSID
---------------------------------------------------------------
default      direct   service  VLAN 1    Open         -/-            -/-               1/6              0           HUAWEI-WLAN
vap_portal  tunnel    service  VLAN 200 Open+Portal -/-            -/-               1/6              3           portal_test
---------------------------------------------------------------
Total: 2
 

 

说明

不建议多个VAP模板下绑定相同SSID,因为SSID相同的多个VAP模板绑定到同一AP时,会引起接入失败等异常现象。

2. 查看VAP模板下的配置,检查VAP模板下绑定的认证模板。

 

[Huawei] wlan
[Huawei-wlan-view] vap-profile name vap_portal
[Huawei-wlan-vap-prof-vap_portal]display this
#
 forward-mode tunnel
 service-vlan vlan-id 200
 ssid-profile localportal
 authentication-profile authen_portal
#

 

3. 查看认证模板下的配置,需要绑定Portal接入模板。

 

[Huawei] authentication-profile name authen_portal
[Huawei-authentication-profile-authen_portal] display this
#
authentication-profile name authen_portal
 portal-access-profile access_portal
 access-domain domain_test
#

 

4. 查看Portal接入模板下的配置,需要绑定Portal服务器模板。

 

[Huawei] portal-access-profile name access_portal
[Huawei-portal-access-profile-access_portal] display this
#
portal-access-profile name access_portal
 web-auth-server portal_test direct
#

 

5. 查看Portal服务器模板配置,需要配置server-ip和URL。

URL有两种配置方式,一是直接在Portal服务器下配置URL;二是在Portal服务器下引用URL模板,在URL模板下配置URL,同时URL模板下可以配置所需的URL参数,如果Portal服务器需要特定的URL参数,则只能通过URL模板方式配置。

方式一:Portal服务器下直接配置url。

 

[Huawei] web-auth-server portal_test
[Huawei-web-auth-server-portal_test] display this
#
web-auth-server server_portal
 server-ip 12.12.12.1
 port 50100
 url http://12.12.12.1:8080/portal
 protocol http
#

 

方式二:Portal服务器下配置url模板。

 

[Huawei] web-auth-server portal_test
[Huawei-web-auth-server-portal_test] display this
#
web-auth-server server_portal
 server-ip 12.12.12.1
 port 50100
 url-template url_test
 protocol http
#

 

查看URL模板下配置,需要配置URL及所需要的参数。

 

[Huawei]url-template name url_test
[Huawei-url-template-url_test] display this
#
url-template name url_test
 url http://12.12.12.1:8080/portal
 url-parameter device-ip ac-ip user-ipaddress userip ssid ssid
#

 

6. 需要开启HTTP/HTTPS协议的Portal对接功能。

开启HTTP协议的Portal对接:

[Huawei] portal web-authen-server http port 8000

 

开启HTTPS协议的Portal对接:

 

[Huawei] portal web-authen-server https ssl-policy default_policy port 8443

 

认证模式配置检查

外置Portal认证支持本地认证、RADIUS认证、LDAP认证和AD认证,但大部分场景都是使用RADIUS认证,本文仅考虑RADIUS认证模式。

认证模式在认证方案下指定,认证方案的引用有两种方式:第一种方式是在认证模板下直接引用认证方案,第二种方式是在域下引用认证方案,然后在认证模板下引用域。第一种方式优先级高于第二种方式优先级,若两种方式同时配置,第一种方式生效,第二种方式在认证模板下配置默认域或强制域不生效。

方式一:在认证模板下引用认证方案。

在认证模板下引用认证方案时,需要同时引用RADIUS服务器模板,如果需要计费,还需要同时引用计费方案。

 

[Huawei] authentication-profile name authen_portal
[Huawei-authentication-profile-authen_portal] display this
#
authentication-profile name authen_portal
 portal-access-profile access_portal
 authentication-scheme radius
 accounting-scheme radius
 radius-server radius_test
#

 

方式二:在域下引用认证方案。

在域下引用认证方案时,需要同时在域下引用RADIUS服务器模板,如果需要计费,还需要同时在域下引用计费方案。

 

[Huawei] aaa
[Huawei-aaa] domain domain_test
[Huawei-aaa-domain-domain_test] display this
#
 domain domain_test
  authentication-scheme radius
  accounting-scheme radius
  radius-server radius_test
#

 

后续需要在认证模板下配置默认域或者强制域。建议在认证模板下配置不指定接入类型的默认域:

 

[Huawei] authentication-profile name authen_portal
[Huawei-authentication-profile-authen_portal] display this
#
authentication-profile name authen_portal
 portal-access-profile access_portal
 access-domain domain_test
#

 

认证域之间存在优先级,终端在优先级高的认证域中进行认证:指定接入类型的强制域 > 非指定接入类型的强制域 > 用户名中携带的合法域 > 指定接入类型的默认域 > 非指定接入类型的默认域 > 全局默认域。各种域的配置示例如下:

指定接入类型的强制域:

 

[Huawei-authentication-profile-authen_portal] display this
#
authentication-profile name authen_portal
 portal-access-profile access_portal
 access-domain domain_test portal force

 

非指定接入类型的强制域:

 

[Huawei-authentication-profile-authen_portal] display this
#
authentication-profile name authen_portal
 portal-access-profile access_portal
 access-domain domain_test force

 

用户名中携带的合法域:指用户认证时使用的用户名中使用@携带了域名,并且该域在设备上已创建

指定接入类型的默认域:

 

[Huawei-authentication-profile-authen_portal] display this
#
authentication-profile name authen_portal
 portal-access-profile access_portal
 access-domain domain_test portal

 

非指定接入类型的默认域:

 

[Huawei-authentication-profile-authen_portal] display this
#
authentication-profile name authen_portal
 portal-access-profile access_portal
 access-domain domain_test

 

全局默认域:指在系统视图上通过domain xxx指定的全局默认域

常见问题

    Portal页面输入账号密码后,没有跳转到设备登录URL或跳转到错误的设备登录URL 问题现象

分别以Cisco ISE服务器和Aruba Clearpass服务器为例。

Cisco ISE服务器:在Portal认证页面输入账号密码后点击登录,之后再点击继续,直接跳转到成功页面,没有看到跳转到设备登录URL,此时在设备上查看用户状态,仍然处于Pre-authen状态,如下图所示:

 

Aruba Clearpass服务器:在Portal认证页面输入账号密码后点击登录,看到跳转到“https://12.12.12.76:8080/login”,但该URL不是正确的设备登录URL。

  问题原因

如果没有跳转到设备登录URL,其原因是Portal服务器不知道设备登录URL,没有配置设备登录URL。

如果跳转到错误的设备登录URL,原因是配置的设备登录URL错误。

解决方案

设备登录URL的配置依赖于Portal服务器,不同的Portal服务器配置方式不同,一般分两种情况:一种是直接在Portal服务器上配置设备登录URL;另一种是在设备上配置URL参数,在URL参数中携带设备登录URL。

方式一:在Portal服务器上配置设备登录URL。

Aruba Clearpass服务器是在服务器上直接配置设备登录URL,以该服务器为例,其他服务器需要服务器侧提供支持: 1. 登录Aruba ClearPass服务器。

在浏览器中输入Aruba ClearPass的访问地址,地址格式为https://Aruba ClearPass IP,其中Aruba ClearPass IP是Aruba ClearPass服务器的IP地址。

选择“ClearPass Guest访客管理”。

在登录页面中,输入用户名和密码进行登录。

2. 配置认证界面。 依次选择“配置 > Pages > 网页登录”,选择已经创建的网络登录页面,点击“编辑”进入编辑页面,在“提交URL”中设置设备登录URL。

方式二:在设备上通过URL参数配置设备登录URL。

Cisco ISE服务器是在设备上通过URL参数配置设备登录URL。 在设备URL模板下配置login-url参数:

[Huawei] url-template name url_test
[Huawei-url-template-url_test] url-parameter login-url switch_url https://12.12.12.76:8443/login

 

设备登录URL格式为http(s)://ip:port/login,其中协议类型和端口号通过命令portal web-authen-server决定,IP地址为AC设备本机任一地址,后续需要通过免认证free-rule放通该地址,且要确保终端与该地址路由可达。

开启HTTP/HTTPS协议的Portal对接功能命令:

 

[Huawei] portal web-authen-server https ssl-policy default_policy port 8443  //协议为https,端口号为8443
[Huawei] portal web-authen-server http port 8000  //协议为http,端口号为8000

 

Portal页面输入账号密码后跳转到设备登录URL,但显示超时

在Portal认证页面输入账号密码后,能够跳转到设备登录URL,但显示“无法访问此网站”,提示“ERR_CONNECTION_TIMED_OUT”。

该问题原因是终端与设备登录URL地址不通,按照如下步骤排查:

1. 设备是否通过free-rule放通设备登录URL对应的IP地址;

终端在访问设备登录URL时,终端还没有认证成功,所以需要在free-rule下放通设备登录URL对应的IP地址。

2. 终端与设备登录URL地址路由是否可达;

可在终端网关设备上使用网关地址作为源ping设备登录URL对应的IP地址,确认路由是否可达,如果路由不可达,需要排查路由配置。

跳转到设备登录URL,提示安全告警

在Portal认证页面输入账号密码登录后,能够跳转到设备登录URL,但提示安全告警,显示“您的连接不是私密连接”。

该问题原因是设备配置HTTPS协议的Portal对接,使用的证书是设备预置证书,不是合法机构颁发的证书,浏览器校验设备证书不合法。有如下两个方案:

使用HTTP协议的Portal对接。

购买合法证书,并导入到设备,设备登录URL不能直接使用IP地址,需要使用域名方式配置,同时需要DNS服务器配合能够解析该设备登录URL域名。证书导入方法请参考Chrome浏览器无法打开页面(一直显示Connect to Wi-Fi页面)。

  跳转到设备登录URL,但认证失败 终端使用get方式提交,但设备不支持

通过debugging web all,可以看到收到终端get请求,显示“Http method is GET, but web server config not permit GET: web server index[1], permit get flag[0].”。

 

[AC6605_8_76]
Nov 30 2020 1155.673.1+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Web receive http msg.
[AC6605_8_76]
Nov 30 2020 1155.673.2+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Web http msg accept.
[AC6605_8_76]
Nov 30 2020 1155.673.3+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt]  Src:User Event:Accept HTTP connect(IP:200.1.1.64 , PORT:49691 , RequestId:1119302816.)
[AC6605_8_76]
Nov 30 2020 1155.673.4+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] [WEB RecvHttp] Userip = 200.1.1.64,UserVrf = 0.
[AC6605_8_76]
Nov 30 2020 1155.673.5+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  Method:GET
[AC6605_8_76]
Nov 30 2020 1155.673.6+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  HTTP Version:HTTP/1.1
[AC6605_8_76]
Nov 30 2020 1155.673.7+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  Http Version:HTTP/1.1
[AC6605_8_76]
Nov 30 2020 1155.673.8+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1119302816, Field:Content-Length, ret:1
[AC6605_8_76]
Nov 30 2020 1155.673.9+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1119302816, Field:If-Modified-Since, ret:1
[AC6605_8_76]
Nov 30 2020 1155.673.10+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1119302816, Field:Cookie, ret:1
[AC6605_8_76]
Nov 30 2020 1155.673.11+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1119302816, Field:Referer, ret:1
[AC6605_8_76]
Nov 30 2020 1155.673.12+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1119302816, Field:Host, ret:1
[AC6605_8_76]
Nov 30 2020 1155.673.13+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Find Sta Mac By Ip(0xc8010140) From AC Snooping Table!
[AC6605_8_76]
Nov 30 2020 1155.673.14+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Get Sta Info(IfIndex = 2466349056, StaVlan = 200, CeVLAN = 0, MAC = 5cd9-98bc-034c) By Ip(0xc8010140) Success!
[AC6605_8_76]
Nov 30 2020 1155.673.15+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get user access L3IfIndex[38] by vlan[200]
[AC6605_8_76]
Nov 30 2020 1155.673.16+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get receive ifindex[2466349056].
[AC6605_8_76]
Nov 30 2020 1155.673.17+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get user ifindex[2466349056], L3IfIndex[38], VID[200].
[AC6605_8_76]
Nov 30 2020 1155.673.18+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] [WEB Get Server Index By IfIndex] IfIndex is 38, L2IfIndex is 2466349056.
[AC6605_8_76]
Nov 30 2020 1155.673.19+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] [WEB Get Server Index By IfIndex] Server Index is 1, User IfIndex is 2466349056.
[AC6605_8_76]
Nov 30 2020 1155.673.20+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] Http method is GET, but web server config not permit GET: web server index[1], permit get flag[0].
[AC6605_8_76]
Nov 30 2020 1155.683.1+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] Get body fail.
该问题原因是终端使用GET方式向设备提交用户名密码信息,但设备默认只开启了HTTP POST的方式,未开启HTTP GET方式(HTTP GET方式存在密码泄露风险,推荐使用POST方式)。

 

在设备Portal服务器模板下开启允许用户使用GET方式向设备提交用户名和密码等信息:

 

[Huawei] web-auth-server portal_test
[Huawei-web-auth-server-portal_test] http get-method enable
 

 

终端提交的用户名密码请求中未携带用户名或密码,或用户名密码的识别关键字不匹配

通过debugging web all,可以看到收到终端get请求,显示“[WEB HTTP SendAuthMsg] No user name[].”或者“[WEB HTTP SendAuthMsg] No password.”。

 

[AC6605_8_76]
Dec 01 2020 1437.71.1+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Web receive http msg.
[AC6605_8_76]
Dec 01 2020 1437.71.2+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Web http msg accept.
[AC6605_8_76]
Dec 01 2020 1437.71.3+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt]  Src:User Event:Accept HTTP connect(IP:200.1.1.64 , PORT:56870 , RequestId:1093830080.)
[AC6605_8_76]
Dec 01 2020 1437.71.4+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] [WEB RecvHttp] Userip = 200.1.1.64,UserVrf = 0.
[AC6605_8_76]
Dec 01 2020 1437.71.5+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  Method:GET
[AC6605_8_76]
Dec 01 2020 1437.71.6+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  HTTP Version:HTTP/1.1
[AC6605_8_76]
Dec 01 2020 1437.71.7+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  Http Version:HTTP/1.1
[AC6605_8_76]
Dec 01 2020 1437.71.8+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1093830080, Field:Content-Length, ret:1
[AC6605_8_76]
Dec 01 2020 1437.71.9+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1093830080, Field:If-Modified-Since, ret:1
[AC6605_8_76]
Dec 01 2020 1437.71.10+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1093830080, Field:Cookie, ret:1
[AC6605_8_76]
Dec 01 2020 1437.71.11+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1093830080, Field:Referer, ret:1
[AC6605_8_76]
Dec 01 2020 1437.71.12+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:1093830080, Field:Host, ret:1
[AC6605_8_76]
Dec 01 2020 1437.71.13+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Find Sta Mac By Ip(0xc8010140) From AC Snooping Table!
[AC6605_8_76]
Dec 01 2020 1437.71.14+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Get Sta Info(IfIndex = 2466349057, StaVlan = 200, CeVLAN = 0, MAC = 5cd9-98bc-034c) By Ip(0xc8010140) Success!
[AC6605_8_76]
Dec 01 2020 1437.71.15+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get user access L3IfIndex[38] by vlan[200]
[AC6605_8_76]
Dec 01 2020 1437.71.16+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get receive ifindex[2466349057].
[AC6605_8_76]
Dec 01 2020 1437.71.17+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get user ifindex[2466349057], L3IfIndex[38], VID[200].
[AC6605_8_76]
Dec 01 2020 1437.71.18+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] [WEB Get Server Index By IfIndex] IfIndex is 38, L2IfIndex is 2466349057.
[AC6605_8_76]
Dec 01 2020 1437.71.19+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] [WEB Get Server Index By IfIndex] Server Index is 1, User IfIndex is 2466349057.
[AC6605_8_76]
Dec 01 2020 1437.71.20+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Read get info: read length[146].
[AC6605_8_76]
Dec 01 2020 1437.71.1+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] Str[] invalid.
[AC6605_8_76]
Dec 01 2020 1437.71.2+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Decode request info: CMD[login], user name[], MAC[0000-0000-0000], IP[0.0.0.0], URL[].
[AC6605_8_76]
Dec 01 2020 1437.71.3+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] [WEB HTTP SendAuthMsg] No user name[].
[AC6605_8_76]
Dec 01 2020 1437.71.4+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] Send Auth Msg Fail, Stop Proc LoginReq.
[AC6605_8_76]
Dec 01 2020 1437.71.5+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] Decode request info fail.
[AC6605_8_76]
Dec 01 2020 1455.366.1+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Web receive http msg.
[AC6605_8_76]
Dec 01 2020 1455.366.2+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Web http msg accept.
[AC6605_8_76]
Dec 01 2020 1455.366.3+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt]  Src:User Event:Accept HTTP connect(IP:200.1.1.64 , PORT:57230 , RequestId:669981044.)
[AC6605_8_76]
Dec 01 2020 1455.366.4+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] [WEB RecvHttp] Userip = 200.1.1.64,UserVrf = 0.
[AC6605_8_76]
Dec 01 2020 1455.366.5+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  Method:GET
[AC6605_8_76]
Dec 01 2020 1455.366.6+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  HTTP Version:HTTP/1.1
[AC6605_8_76]
Dec 01 2020 1455.366.7+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  Http Version:HTTP/1.1
[AC6605_8_76]
Dec 01 2020 1455.366.8+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669981044, Field:Content-Length, ret:1
[AC6605_8_76]
Dec 01 2020 1455.366.9+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669981044, Field:If-Modified-Since, ret:1
[AC6605_8_76]
Dec 01 2020 1455.366.10+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669981044, Field:Cookie, ret:1
[AC6605_8_76]
Dec 01 2020 1455.366.11+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669981044, Field:Referer, ret:1
[AC6605_8_76]
Dec 01 2020 1455.366.12+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669981044, Field:Host, ret:1
[AC6605_8_76]
Dec 01 2020 1455.366.13+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Find Sta Mac By Ip(0xc8010140) From AC Snooping Table!
[AC6605_8_76]
Dec 01 2020 1455.366.14+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Get Sta Info(IfIndex = 2466349057, StaVlan = 200, CeVLAN = 0, MAC = 5cd9-98bc-034c) By Ip(0xc8010140) Success!
[AC6605_8_76]
Dec 01 2020 1455.366.15+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get user access L3IfIndex[38] by vlan[200]
[AC6605_8_76]
Dec 01 2020 1455.366.16+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get receive ifindex[2466349057].
[AC6605_8_76]
Dec 01 2020 1455.366.17+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get user ifindex[2466349057], L3IfIndex[38], VID[200].
[AC6605_8_76]
Dec 01 2020 1455.366.18+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] [WEB Get Server Index By IfIndex] IfIndex is 38, L2IfIndex is 2466349057.
[AC6605_8_76]
Dec 01 2020 1455.366.19+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] [WEB Get Server Index By IfIndex] Server Index is 1, User IfIndex is 2466349057.
[AC6605_8_76]
Dec 01 2020 1455.366.20+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Read get info: read length[140].
[AC6605_8_76]
Dec 01 2020 1455.366.1+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] Str[] invalid.
[AC6605_8_76]
Dec 01 2020 1455.366.2+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Decode request info: CMD[login], user name[test], MAC[0000-0000-0000], IP[0.0.0.0], URL[].
[AC6605_8_76]
Dec 01 2020 1455.366.3+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] [WEB HTTP SendAuthMsg] No password.
[AC6605_8_76]
Dec 01 2020 1455.366.4+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] Send Auth Msg Fail, Stop Proc LoginReq.
[AC6605_8_76]
Dec 01 2020 1455.366.5+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] Decode request info fail.

 

终端使用post或者get方式提交用户名密码信息给设备时,需要同时携带用户名和密码,且用户名的识别关键字和密码的识别关键字需要和设备配置的识别关键字一致。

1. 当终端使用get方式提交用户名密码信息给设备时,可以在URL中看到用户名密码信息,如下图所示。

 

如果设备登录URL使用HTTP协议,可以在终端上抓取报文,确认提交给设备的用户名密码信息。

服务器

2. 当终端使用post方式提交用户名密码信息给设备时,如果设备登录URL使用HTTP协议,可以在终端上抓取报文,确认提交给设备的用户名密码信息。

服务器

上述示例报文中用户名的识别关键字为username,密码的识别关键字为password,如果没有用户名密码信息,需要Portal服务器确认根因;如果用户名密码的识别关键字与设备不一致,可以在Portal服务器侧修改,也可在设备上修改。方法如下:

在Portal服务器上修改用户名密码识别关键字。

以Aruba Clearpass服务器为例,其他服务器需要服务器侧提供支持。

a. 登录Aruba ClearPass服务器。

i. 在浏览器中输入Aruba ClearPass的访问地址,地址格式为https://Aruba ClearPass IP,其中Aruba ClearPass IP是Aruba ClearPass服务器的IP地址。

ii. 选择“ClearPass Guest访客管理”。

iii. 在登录页面中,输入用户名和密码进行登录。

b. 配置认证界面。

依次选择“配置 > Pages > 网页登录”,选择已经创建的网络登录页面,点击“编辑”进入编辑页面,在“用户名字段”和“密码字段”中设置用户名识别关键字和密码识别关键字。

服务器

 

在设备上修改用户名密码识别关键字。

在Portal服务器模板下配置HTTP/HTTPS协议的POST/GET请求报文的参数。

说明

用户名的识别关键字默认为username,密码的识别关键字默认为password

 

[Huawei] web-auth-server portal_test
[Huawei-web-auth-server-portal_test] http-method post username-key username password-key password
RADIUS服务器认证拒绝

 

通过命令display aaa online-fail-record mac-address H-H-H查看终端上线失败记录,用户上线失败原因(User online fail reason)显示Radius authentication reject。

 

[Huawei] display aaa online-fail-record mac-address 64e5-99f3-18f6
----------------------------------------------------------------
User name               : test
Domain name             : domain_test
User MAC                : 64e5-99f3-18f6
User access type        : 802.1x
User access interface   : Wlan-Dbss17496
Qinq vlan/User vlan     : 0/200
User IP address         : -
User IPV6 address       : -
User ID                 : 32846
User login time         : 2020/10/19 1422
User online fail reason : Radius authentication reject
Authen reply message    : ErrorReason is Incorrect user na...
User name to server     : test
AP ID                   : 0
Radio ID                : 0
AP MAC                  : 18de-d777-c120
SSID                    : dot1x_test
----------------------------------------------------------------

 

通过业务诊断功能,追踪终端用户上线认证过程,看到RADIUS服务器回应了拒绝报文:

 

[Huawei] trace object mac-address 64e5-99f3-18f6
[Huawei] trace enable
[BTRACE][2020/10/19 1423][6144][RADIUS][64e5-99f3-18f6]:
Received a authentication reject packet from radius server(server ip = 10.10.10.1).
[BTRACE][2020/10/19 1423][6144][RADIUS][64e5-99f3-18f6]:
Server Template: 4
Server IP   : 10.10.10.1
Server Port : 1812
Protocol: Standard
Code    : 3
Len     : 176
ID      : 80
[EAP-Message                        ] [6 ] [04 22 00 04 ]
[State                              ] [16] [01u?237372O]
[Reply-Message                      ] [116] [ErrorReason is Incorrect user name or password or Incorrect dataSource or Incorrect access device key.ErrCode:4101]
[Message-Authenticator              ] [18] [00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
[BTRACE][2020/10/19 1423][6144][RADIUS][64e5-99f3-18f6]:Send authentication reject message to AAA.
[BTRACE][2020/10/19 1423][6144][AAA][64e5-99f3-18f6]:
AAA receive AAA_RD_MSG_AUTHENREJECT message(51) from RADIUS module(235).
服务器回应认证拒绝有多种原因,最常见的有用户名密码错误、授权策略无法匹配等,这些问题需要首先通过排查服务器日志找到根因后,再调整服务器、终端或设备配置解决。

 

RADIUS服务器不响应

通过命令display aaa online-fail-record mac-address H-H-H查看终端上线失败记录,用户上线失败原因(User online fail reason)显示The radius server is up but has no reply或者The radius server is not reachable。

 

[Huawei] display aaa online-fail-record mac-address 64e5-99f3-18f6
----------------------------------------------------------------
User name               : test
Domain name             : domain_test
User MAC                : 64e5-99f3-18f6
User access type        : 802.1x
User access interface   : Wlan-Dbss17496
Qinq vlan/User vlan     : 0/200
User IP address         : -
User IPV6 address       : -
User ID                 : 32861
User login time         : 2020/10/19 1702
User online fail reason : The radius server is up but has no reply
Authen reply message    : -
User name to server     : test
AP ID                   : 0
Radio ID                : 0
AP MAC                  : 18de-d777-c120
SSID                    : dot1x_test
----------------------------------------------------------------
[Huawei] display aaa online-fail-record mac-address 64e5-99f3-18f6
----------------------------------------------------------------
User name               : test
Domain name             : domain_test
User MAC                : 64e5-99f3-18f6
User access type        : 802.1x
User access interface   : Wlan-Dbss17496
Qinq vlan/User vlan     : 0/200
User IP address         : -
User IPV6 address       : -
User ID                 : 32865
User login time         : 2020/10/19 2021
User online fail reason : The radius server is not reachable
Authen reply message    : -
User name to server     : test
AP ID                   : 0
Radio ID                : 0
AP MAC                  : 18de-d777-c120
SSID                    : dot1x_test
----------------------------------------------------------------

 

通过业务诊断功能,追踪终端用户上线认证过程,看到RADIUS服务器无响应:

 

[Huawei] trace object mac-address 64e5-99f3-18f6
[Huawei] trace enable
[BTRACE][2020/10/19 1703][6144][AAA][64e5-99f3-18f6]:
AAA receive AAA_RD_MSG_SERVERNOREPLY message(61) from RADIUS module(235).
[BTRACE][2020/10/19 1703][6144][AAA][64e5-99f3-18f6]:
CID:51  TemplateNo:4  SerialNo:62
SrcMsg:AAA_RD_MSG_AUTHENREQ
PriyServer::: Vrf:0
SendServer:10.10.10.1 Vrf:0
[BTRACE][2020/10/19 1703][6144][AAA][64e5-99f3-18f6]:Radius server is up but no response.
[BTRACE][2020/10/19 1703][6144][AAA][64e5-99f3-18f6]:
[AAA ERROR]authen finish,the authen fail code is:8,reason is:Radius server is up but no response.
[BTRACE][2020/10/19 2022][6144][AAA][64e5-99f3-18f6]:
AAA receive AAA_RD_MSG_SERVERNOREPLY message(61) from RADIUS module(235).
[BTRACE][2020/10/19 2022][6144][AAA][64e5-99f3-18f6]:
CID:55  TemplateNo:4  SerialNo:69
SrcMsg:AAA_RD_MSG_AUTHENREQ
PriyServer::: Vrf:0
SendServer:10.10.10.1 Vrf:0
[BTRACE][2020/10/19 2022][6144][AAA][64e5-99f3-18f6]:Radius authentication has no response.
[BTRACE][2020/10/19 2022][6144][AAA][64e5-99f3-18f6]:
[AAA ERROR]authen finish,the authen fail code is:7,reason is:Radius authentication has no response.

 

RADIUS服务器不响应问题排查步骤如下:

1. 确认RADIUS服务器是否正确添加设备IP。

RADIUS服务器如果没有添加设备IP地址则需要添加正确的设备IP。

2. 如果RADIUS服务器已经添加设备IP地址,需要确认添加的设备IP与设备发送RADIUS认证请求报文的源IP是否相同。

设备发送RADIUS认证请求报文的源IP可通过命令配置,如果没有通过命令配置,则使用路由出接口IP地址。如果RADIUS服务器上添加的设备IP地址与路由出接口IP地址一致,则不需要在设备上配置与RADIUS服务器通信的源IP地址,否则需要通过命令配置源IP地址。

a. 先根据RADIUS服务器IP地址查找路由表获取出接口,然后再根据出接口确认IP地址,如果RADIUS服务器添加的设备IP地址与路由出接口地址一致,则不需要再通过命令配置与RADIUS服务器通信的源IP地址。

 

[Huawei] display ip routing-table 10.10.10.1
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
Summary Count : 1
Destination/Mask Proto  Pre Cost Flags NextHop     Interface
10.10.10.0/24     Direct 0   0     D     10.10.10.76   Vlanif12
[Huawei] interface Vlanif 12
[Huawei-Vlanif12] display this
#
interface Vlanif12
 ip address 10.10.10.76 255.255.255.0
#
b. 如果RADIUS服务器添加的设备IP地址与路由出接口地址不同,则需要在设备上配置与RADIUS服务器通信的源IP地址。源IP地址可在全局下配置,也可在RADIUS服务器模板下配置,RADIUS服务器模板下配置的源IP地址优先级高于全局下的配置。 在VRRP双机热备场景开启了无线配置同步条件下,只能在全局下配置与RADIUS服务器通信的源IP地址,如果是单机场景下,建议在RADIUS服务器模板下配置源IP地址。 查询设备上配置的与RADIUS服务器通信的源IP地址。

 

i. 查看全局是否配置与RADIUS服务器通信的源IP地址:

 

[Huawei] display radius-server configuration
------------------------------------------------------
Global:
 Radius Server Source IP Address           : -
 Radius Server Source IPv6 Address         : ::
 Radius Attribute Nas IP Address           : -
 Radius Attribute Nas IPv6 Address         : ::
------------------------------------------------------
[Huawei] display radius-server configuration
------------------------------------------------------
Global:
 Radius Server Source IP Address           : 100.1.1.1
 Radius Server Source IPv6 Address         : ::
 Radius Attribute Nas IP Address           : -
 Radius Attribute Nas IPv6 Address         : ::
------------------------------------------------------

 

如果“Radius Server Source IP Address”为“-”,则表明全局下没有配置源IP地址,如果“Radius Server Source IP Address”为具体IP地址,则表明配置了源IP地址。

ii. 查看RADIUS服务器模板是否配置与RADIUS服务器通信的源IP地址

 

[Huawei] radius-server template radius_test
[Huawei-radius-radius_test] display this
#
radius-server template radius_test
 radius-server shared-key cipher %^%#x[yB5Wd"!3GqH6,@[kW(Xi6PYA%^%#
 radius-server authentication 10.10.10.1 1812 source ip-address 100.1.1.1 weight 80
 radius-server accounting 10.10.10.1 1813 source ip-address 100.1.1.1 weight 80
#
[Huawei] radius-server template radius_test
[Huawei-radius-radius_test] display this
#
radius-server template radius_test
 radius-server shared-key cipher %^%#x[yB5Wd"!3GqH6,@[kW(Xi6PYA%^%#
 radius-server authentication 10.10.10.1 1812 source Vlanif 100 weight 80
 radius-server accounting 10.10.10.1 1813 source Vlanif 100 weight 80

 

如果RADIUS服务器模板下再认证服务器或计费服务器后面写的“source ip-address”或者“source vlanif”,则表明RADIUS服务器模板下配置了源IP地址。

配置设备与RADIUS服务器通信的源IP地址。

i. 在全局下配置与RADIUS服务器通信源地址:

 

[Huawei] radius-server source ip-address 100.1.1.1

 

ii. 在RADIUS模板下配置与RADIUS服务器通信源IP地址:

 

[Huawei] radius-server template radius_test
[Huawei-radius-radius_test] radius-server authentication 10.10.10.1 1812 source ip-address 100.1.1.1
3. 确认设备与RADIUS服务器之间中间链路是否正常。

 

a. 从设备指定源IP ping服务器测试,确认路由是否可达;

 

[Huawei] ping -a 10.10.10.76 10.10.10.1
b. 在设备和服务器同时抓包确认认证报文收发是否正常,常见问题有中间网络存在防火墙,防火墙未放通RADIUS(默认认证端口:1812)报文。 4. 查看RADIUS服务器状态是否正常,STState字段如果不是STState-up状态,则为异常。
[Huawei] display radius-server item template radius_test
---------------------------------------------------------------
  STState    = STState-up
  STChgTime  = -
  Type       = auth-server
  State      = state-up
  AlarmFlag  = false
  STUseNum   = 1
  IPAddress  = 10.10.10.76
  AlarmTimer = 0xffffffff
  Head       = 10274
  Tail       = 10273
  ProbeID    = 255
 --------------------------------------------------------------

 

5. 确认设备与RADIUS服务器配置的共享密钥(shared-key)是否一致。可以通过test-aaa命令测试,同时开启radius debug打印,debug信息中如出现“Authenticator error·”则表示设备与RADIUS服务器配置的共享密钥不一致,需要同时修改设备与RADIUS服务器上共享密钥,使其相同。

 

[Huawei] test-aaa test test radius-template radius_test
[Huawei]
Oct 24 2020 1549.591.1+08:00 AC6605_129_76 RDS/7/DEBUG:
RADIUS packet: IN (TotalLen=20)
Len 1 ~ 20:
02 08 00 14 F6 DA 06 57 40 25 32 2A A9 70 6E FD
46 F6 B1 25
[Huawei]
Oct 24 2020 1549.591.2+08:00 AC6605_129_76 RDS/7/DEBUG:
[RDS(Err):] Receive a illegal packet(Authenticator error), please check share key config.(ip:10.10.10.1 port:1812)

 

设备支持在全局下配置指定RADIUS服务器的共享密钥及在RADIUS服务器模板下配置共享密钥,其中全局下的配置优先级高于模板下的配置.

建议在RADIUS服务器模板下配置共享密钥,如果两个都配置的条件下,建议删除全局下的配置,仅保留模板下的配置。

RADIUS服务器模板下配置共享密钥:

 

[Huawei] radius-server template radius_test
[Huawei-radius-radius_test] radius-server shared-key cipher huawei@123

 

全局下配置RADIUS服务器共享密钥:

 

[Huawei] radius-server ip-address 10.10.10.1 shared-key cipher huawei@123
  RADIUS服务器授权数据失败

 

通过命令display aaa online-fail-record mac-address H-H-H查看终端上线失败记录,用户上线失败原因(User online fail reason)显示Authorization data error。

 

[Huawei] display aaa online-fail-record mac-address 64e5-99f3-18f6
----------------------------------------------------------------
User name               : test
Domain name             : domaintest
User MAC                : 64e5-99f3-18f6
User access type        : 802.1x
User access interface   : Wlan-Dbss17496
Qinq vlan/User vlan     : 0/200
User IP address         : -
User IPV6 address       : -
User ID                 : 32873
User login time         : 2020/10/24 1634
User online fail reason : Authorization data error
Authen reply message    : -
User name to server     : test
AP ID                   : 0
Radio ID                : 0
AP MAC                  : 18de-d777-c120
SSID                    : dot1x_test
----------------------------------------------------------------

 

原因为RADIUS服务器授权了相关权限(如VLAN或者ACL等),但设备上无对应的授权内容配置(如未创建授权VLAN或者未创建授权ACL)。

通过业务诊断功能,追踪终端用户上线认证过程,看到RADIUS服务器下发的授权内容:

 

[Huawei] trace object mac-address 64e5-99f3-18f6
[Huawei] trace enable

 

授权VLAN检查失败

 

[BTRACE][2020/10/24 1614][6144][RADIUS][64e5-99f3-18f6]:
Received a authentication accept packet from radius server(server ip = 12.12.12.1).
[BTRACE][2020/10/24 1614][6144][RADIUS][64e5-99f3-18f6]:
Server Template: 4
Server IP   : 12.12.12.1
Server Port : 1812
Protocol: Standard
Code    : 2
Len     : 194
ID      : 194
[Tunnel-Type                        ] [6 ] [13]
[Tunnel-Medium-Type                 ] [6 ] [6]
[Tunnel-Private-Group-ID            ] [6 ] [201]
[EAP-Message                        ] [6 ] [03 4a 00 04 ]
[State                              ] [16] [01uY31125N]
[MS-MPPE-Send-Key                   ] [52] [fb a1 e9 55 16 62 a3 e5 da 35 fc ce 3e 8f ae 7d ac 0a d6 0b 20 59 ad 82 a8 66 88 06 6a 81 10 82 61 95 2e cf 44 50 c0 79 e5 3f a4 32 43 45 a5 9e 2b c4 ]
[MS-MPPE-Recv-Key                   ] [52] [fb a1 e9 65 b1 18 6d 60 8f 0a ed af 53 1e 26 8a e6 18 9d 26 8c 21 c8 4f c2 8a 6a d5 a8 85 8a 9d ba d8 be 8d 97 b8 b8 d3 24 04 21 23 90 71 33 35 f4 6b ]
[Message-Authenticator              ] [18] [00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
[BTRACE][2020/10/24 1614][6144][RADIUS][64e5-99f3-18f6]:Send authentication reply message to AAA.
[BTRACE][2020/10/24 1614][6144][AAA][64e5-99f3-18f6]:
AAA receive AAA_RD_MSG_AUTHENACCEPT message(50) from RADIUS module(235).
[BTRACE][2020/10/24 1614][6144][AAA][64e5-99f3-18f6]:
CID:57  TemplateNo:4  SerialNo:73
SrcMsg:AAA_RD_MSG_AUTHENREQ
PriyServer::: Vrf:0
SendServer:12.12.12.1 Vrf:0
SessionTimeout:0 IdleTimeout:0
AcctInterimInterval:0 RemanentVolume:0
InputPeakRate:0 InputAverageRate:0
OutputPeakRate:0 OutputAverageRate:0
InputBasicRate:0 OutputBasicRate:0
InputPBS:0 OutputPBS:0
Priority:[0,0] DNS:[0.0.0.0, 0.0.0.0]
ServiceType:0 LoginService:0 AdminLevel:0 FramedProtocol:0
LoginIpHost:0 NextHop:0
EapLength:4 ReplyMessage:
TunnelType:13 MediumType:6 PrivateGroupID:201
WlanReasonCode:0
[BTRACE][2020/10/24 1614][6144][AAA][64e5-99f3-18f6]:
[AAA ERROR]AAA check authen ack, check VLANID error!
[BTRACE][2020/10/24 1614][6144][AAA][64e5-99f3-18f6]:Radius authorization data error.
[BTRACE][2020/10/24 1614][6144][AAA][64e5-99f3-18f6]:
[AAA ERROR]authen finish,the authen fail code is:16,reason is:Radius authorization data error.

 

授权VLAN须知:

授权VLAN需要同时下发RADIUS 64号属性Tunnel-Type,值固定为13,表示VLAN协议,RADIUS 65号属性Tunnel-Medium-Type,值固定为6,表示以太类型,RADIUS 81号属性Tunnel-Private-Group-ID,支持通过VLAN编号、VLAN描述信息、VLAN名称和VLAN Pool授权,并且授权生效顺序为:VLAN编号 > VLAN描述信息 > VLAN名称 > VLAN Pool。

授权ACL检查失败

 

Received a authentication accept packet from radius server(server ip = 12.12.12.1).
[BTRACE][2020/10/24 1619][6144][RADIUS][64e5-99f3-18f6]:
Server Template: 4
Server IP   : 12.12.12.1
Server Port : 1812
Protocol: Standard
Code    : 2
Len     : 182
ID      : 205
[Filter-Id                          ] [6 ] [3000]
[EAP-Message                        ] [6 ] [03 4c 00 04 ]
[State                              ] [16] [01uY31432103]
[MS-MPPE-Send-Key                   ] [52] [bd ce 7f 1d bf 78 33 d4 6c 45 d8 d0 1b f7 ee d2 02 16 7a ac fd 62 25 88 f7 84 7a 22 44 d8 01 8a 99 a3 33 66 7d 47 e9 a7 ed 88 d5 01 f8 62 4f 9d cd 56 ]
[MS-MPPE-Recv-Key                   ] [52] [bd ce 7f 54 6f 27 35 d1 01 5c f1 5e aa e8 27 91 c7 8b 89 2f 06 8f ac 46 13 5c 92 78 ec cf 39 aa dc bb f8 ff b1 b8 5c 42 6b f8 ca 80 76 b1 e8 35 c9 ed ]
[Message-Authenticator              ] [18] [00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
[BTRACE][2020/10/24 1619][6144][RADIUS][64e5-99f3-18f6]:Send authentication reply message to AAA.
[BTRACE][2020/10/24 1619][6144][AAA][64e5-99f3-18f6]:
AAA receive AAA_RD_MSG_AUTHENACCEPT message(50) from RADIUS module(235).
[BTRACE][2020/10/24 1619][6144][AAA][64e5-99f3-18f6]:
CID:58  TemplateNo:4  SerialNo:75
SrcMsg:AAA_RD_MSG_AUTHENREQ
PriyServer::: Vrf:0
SendServer:12.12.12.1 Vrf:0
SessionTimeout:0 IdleTimeout:0
AcctInterimInterval:0 RemanentVolume:0
InputPeakRate:0 InputAverageRate:0
OutputPeakRate:0 OutputAverageRate:0
InputBasicRate:0 OutputBasicRate:0
InputPBS:0 OutputPBS:0
Priority:[0,0] DNS:[0.0.0.0, 0.0.0.0]
ServiceType:0 LoginService:0 AdminLevel:0 FramedProtocol:0
LoginIpHost:0 NextHop:0
EapLength:4 ReplyMessage:
TunnelType:0 MediumType:0 PrivateGroupID:
ACLID:3000
WlanReasonCode:0
[BTRACE][2020/10/24 1619][6144][AAA][64e5-99f3-18f6]:
[AAA ERROR]AAA check radius authen ack, check acl error!
[BTRACE][2020/10/24 1619][6144][AAA][64e5-99f3-18f6]:Radius authorization data error.
[BTRACE][2020/10/24 1619][6144][AAA][64e5-99f3-18f6]:
[AAA ERROR]authen finish,the authen fail code is:16,reason is:Radius authorization data error.

 

授权ACL须知:无线场景下,授权ACL ID取值范围为3000-3031,ACL中rule id最大为64。

RADIUS服务器授权数据失败排查步骤如下:

1. 确认是否需要对应的授权。

如果需要,则需要在设备上创建对应的授权内容,如授权VLAN需要在设备上创建对应VLAN;如授权ACL需要创建对应ACL,并且在ACL中配置相应规则。

如果不需要,可以修改RADIUS服务器上的授权策略,将对应授权内容删除,也可以在设备通过配置忽略对应的授权内容,配置命令如下:

忽略授权VLAN:

 

[Huawei] radius-server template radius_test
[Huawei-radius-radius_test] radius-server attribute translate
[Huawei-radius-radius_test] radius-attribute disable Tunnel-Private-Group-ID receive

 

忽略授权ACL:

 

[Huawei] radius-server template radius_test
[Huawei-radius-radius_test] radius-server attribute translate
[Huawei-radius-radius_test] radius-attribute disable Filter-Id receive

 

终端与设备之间存在NAT

通过debugging web all,可以看到收到终端http请求报文,但源IP地址不是用户实际IP地址,出现报错“[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Can't Find Sta Mac By Ip(0xc0c0c4b) From AC Snooping Table!”。

 


Dec 01 2020 1714.947.1+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Web receive http msg.

Dec 01 2020 1714.947.2+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Web http msg accept.

Dec 01 2020 1714.947.3+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt]  Src:User Event:Accept HTTP connect(IP:12.12.12.75 , PORT:10253 , RequestId:669978704.)

Dec 01 2020 1714.947.4+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] [WEB RecvHttp] Userip = 12.12.12.75,UserVrf = 0.

Dec 01 2020 1714.947.5+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  Method:GET

Dec 01 2020 1714.947.6+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  HTTP Version:HTTP/1.1

Dec 01 2020 1714.947.7+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg]  Http Version:HTTP/1.1

Dec 01 2020 1714.947.8+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669978704, Field:Content-Length, ret:1

Dec 01 2020 1714.947.9+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669978704, Field:If-Modified-Since, ret:1

Dec 01 2020 1714.947.10+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669978704, Field:Cookie, ret:1

Dec 01 2020 1714.947.11+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669978704, Field:Referer, ret:1

Dec 01 2020 1714.947.12+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] WEB Get Header Value, RequestId:669978704, Field:Host, ret:1

Dec 01 2020 1714.947.13+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Can't Find Sta Mac By Ip(0xc0c0c4b) From AC Snooping Table!

Dec 01 2020 1714.947.14+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] WEBAdp FindOut AccessIf By IpVrf. Get IP information.(ulGwIpaddr=12.12.12.76,ulDstIpaddr=12.12.12.0, ulDstIpMask=255.255.255.0)

Dec 01 2020 1714.947.15+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Evt] Get ulNextHop.(ulNextHop=0xc0c0c4c)

Dec 01 2020 1714.947.16+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] WEBAdp FindOut AccessIf By IpVrf. Get Sta Info By Mac Failed!

Dec 01 2020 1714.947.17+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get user access ifinex by ip fail[1]: ip[12.12.12.75]

Dec 01 2020 1714.947.18+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get receive ifindex by CIB fail!.

Dec 01 2020 1714.947.19+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Get user ifindex[4], L3IfIndex[4294967295], VID[12].

Dec 01 2020 1714.947.20+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Msg] Portal disable on ifindex[4], L3IfIndex[4294967295].

Dec 01 2020 1714.947.1+08:00 AC6605_8_76 WEB/7/DEBUG:
[Web-Err] Get web server config fail[1].
[Huawei] display access-user
-----------------------------------------------------------------
UserID  Username        IP address     MAC                Status
-----------------------------------------------------------------
16654   5cd998bc034c    200.1.1.64     5cd9-98bc-034c     Pre-authen
-----------------------------------------------------------------
Total: 1, printed: 1

 

该问题原因为终端用户与设备之间存在NAT,设备收到终端http请求报文的源IP地址为NAT转后之后的IP地址,设备根据该IP地址无法查找到用户信息,导致认证失败。

如果设备版本为V200R019及之后版本,该问题可通过增加配置使用HTTP/HTTPS协议进行Portal认证时CAPWAP隧道转发的IP地址来解决,该CAPWAP隧道转发的IP地址为设备本机地址,与设备登录URL对应的IP地址相同。

 

[Huawei] portal tunnel-forward ip 12.12.12.76

 

信息采集

用户状态

 

[Huawei] display access-user mac-address xxxx-xxxx-xxxx

 

trace和station-trace

在AC上采集trace信息,复现问题,可看到终端认证过程。

 

[Huawei] trace object mac-address xxxx-xxxx-xxxx
[Huawei] trace object ip-address xx.xx.xx.xx
[Huawei] trace enable

 

在AC上采集station-trace信息,复现问题,可看到AP上终端认证报文收发情况。

 

[Huawei-diagnose] station-trace sta-mac xxxx-xxxx-xxxx

 

采集完成后,需要关闭trace信息

 

[Huawei] undo trace object mac-address xxxx-xxxx-xxxx
[Huawei] undo trace object ip-address xx.xx.xx.xx
[Huawei] undo trace enable
[Huawei-diagnose] undo station-trace sta-mac xxxx-xxxx-xxxx

 

终端上下线原因

AAA侧终端上下线原因查看命令:

 

[Huawei] display aaa online-fail-record mac-address xxxx-xxxx-xxxx
[Huawei] display aaa abnormal-offline-record mac-address xxxx-xxxx-xxxx
[Huawei] display aaa offline-record mac-address xxxx-xxxx-xxxx

 

WLAN侧终端上下线原因查看命令:

 


 

[Huawei-diagnose] display station online-fail-record sta-mac xxxx-xxxx-xxxx [Huawei-diagnose] display station offline-record sta-mac xxxx-xxxx-xxxx

协议回放

RADIUS协议回放

 

[Huawei-diagnose] display aaa abnormal-radius-track mac xxxx-xxxx-xxxx
日志

 

AAA上线日志(记录在AC log日志中)

 

%%01CM/5/USER_ACCESSRESULT(s)[395622]:[WLAN_STA_INFO_AUTHENTICATION]ACMAC:xx-xx-xx-xx-xx-xx;ACNAME:xxx;APMAC:xx-xx-xx-xx-xx-xx;APNAME:xxx;SSID:xxx;RADIOID:1;USER:xxx;MAC:xx-xx-xx-xx-xx-xx;IPADDRESS:-;TIME:1608639482;ZONE:UTC+0300;DAYLIGHT:false;ERRCODE:4294967295;RESULT:Open;USERGROUP:NULL;CIB ID:10192;INTERFACE:Wlan-Dbss18108;ACCESS TYPE:None;RDSIP:-;Portal TYPE:-;AUTHID=866625466;AuthFailType:MAC;AUTHPROTOCOL:PAP;

 

AAA下线日志(记录在AC log日志中)

 

%%01CM/5/USER_OFFLINERESULT(s)[395621]:[WLAN_STA_INFO_OFFLINE]ACMAC:xx-xx-xx-xx-xx-xx;ACNAME:xxx;APMAC:xx-xx-xx-xx-xx-xx;APNAME:xxx;SSID:xxx;RADIOID:1;USER:xxx;MAC:xx-xx-xx-xx-xx-xx;IPADDRESS:-;TIME:1608639482;ZONE:UTC+0300;DAYLIGHT:false;SESSIONTIME:2;ERRCODE:208;RESULT:Authentication during association failed;USERGROUP:NULL;AUTHENPLACE:None;EXTENDINFO:The signal strength of the STA is -43 dbm.;CIB ID:11430;INTERFACE:Wlan-Dbss18108;ACCESS TYPE:None;RDSIP:-;Portal TYPE:-;AUTHID=1837558961;AUTHPROTOCOL:-;

 

AP上dot1x高精度日志(记录在AP log日志中)

 

%%01WSRV/6/STA_EVENT_DOT1X_PROC(l)[294062]:dot1x authentication procedure(ApMac=xx-xx-xx-xx-xx-xx,UserMac=xx-xx-xx-xx-xx-xx,Identify=xxx,RadioId=1,Band=2,VapId=20,SSID=xxx,Result=Fail,Msg=ae 5 17;se 0 19;se 38 26;ae 6 47;se 166 49;ae 1012 77;se 6 104;ae 1008 121;se 6 122;ae 10 154;se 136 162;ae 57 219;se 6 229;ae 36 246;se 69 248;ae 69 269;se 123 272;ae 82 293;se 37 294;ae 46 314;se 46 315;ae 4

 

AP上终端关联/去关联日志

一键诊断信息

[Huawei] display diagnostic-information

 

 

 

原文标题:S系列交换机维护宝典 | HTTP协议外置Portal认证失败

文章出处:【微信公众号:华为产品资料】欢迎添加关注!文章转载请注明出处。

  审核编辑:彭菁
 

 

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分