传统组网
某局点PSK+MAC认证失败
首先,PSK+MAC认证是比较简单的组合认证,如果出现认证失败的情况,一般是要检查设备和服务器的配置是否正确,需要两方配合的部分配置是否一致。或者可通过去掉PSK or MAC认证,只采用单一的认证方式时测试是否有故障存在,来确认问题出在PSK还是MAC认证。
对于MAC认证需要在设备侧着重注意的配置点如下:
1、#设备上配置MAC地址认证用户的帐号格式要与服务器侧统一。
[AC] mac-authentication user-name-format mac-address [ { with-hyphen [ six-section | three-section ] | without-hyphen } [ lowercase | uppercase ] ] }
缺省情况下使用用户的MAC地址作为用户名和密码,其中字母为小写,且不带连字符“-”。
mac-address:表示使用用户的MAC地址作为用户名和密码。
with-hyphen [ six-section | three-section ]:带连字符“-”的MAC地址格式,six-section表示六段式MAC地址格式,例如xx-xx-xx-xx-xx-xx或XX-XX-XX-XX-XX-XX;three-section表示三段式MAC地址格式,例如xxxx-xxxx-xxxx或XXXX-XXXX-XXXX。如果不指定任何参数,缺省采用六段式MAC地址格式。
without-hyphen:不带连字符“-”的MAC地址格式,例如xxxxxxxxxxxx或XXXXXXXXXXXX。
lowercase:MAC地址中的字母为小写。
uppercase:MAC地址中的字母为大写。
2、domain域配置,MAC认证应该是lan-access
[AC] domain office1
[AC-isp-office1] authentication lan-access radius-scheme office
[AC-isp-office1] authorization lan-access radius-scheme office
[AC-isp-office1] accounting lan-access radius-scheme office
[AC-isp-office1] authorization-attribute idle-cut 15 1024
[AC-isp-office1] quit
3、radius配置,设置发送给RADIUS服务器的用户名格式,需要和服务器侧配置统一。
[AC-radius-office] user-name-format without-domain
with-domain:发送给RADIUS服务器的用户名携带ISP域名。
without-domain:发送给RADIUS服务器的用户名不携带ISP域名。
在保证配置无问题的情况下,可以采用抓包或者在AC上debug 信息来进一步判断问题根因。v7的设备可debug 如下信息。
debugging wlan client all
debugging wlan access-security all
debugging wlan usersec all
debugging mac-authentication all
debugging radius all
该局点PSK+MAC认证失败,通过debug 信息可知,问题出在3A认证阶段。
Line 252: %Jul 2 10:41:08:285 2021 Zxxx STAMGR/5/STAMGR_MACA_LOGIN_FAILURE: -Username=xxxxcf-UserMAC=xxxxf-8xxf-BSSID=3cd2-xxxx-df56-SSID=mac-APName=test-RadioID=2-VLANID=1191-UsernameFormat=MAC address; A user failed MAC authentication.Reason:AAA processed authentication request and return 26.
Line 253: *Jul 2 10:41:08:285 2021 Zxxxx STAMGR/7/Event: [MAC: xxxx-xxxf-xxxf, BSSID: 3cd2-xxxx-df56]Can not parse 185 attribute
Line 254: *Jul 2 10:41:08:286 2021 xxxxx STAMGR/7/Event: [MAC: xxxx-xxx-xxxf, BSSID: 3cd2-xxxx-df56]Started processing L2 authentication: Result=1, Authentication status=1, Reply-Message=E63018: The user does not exist or has not subscribed to this service.
通过radius 报文:发现设备发包用户名带了域名后缀,而服务器拒绝,认为该用户名不存在,怀疑是服务器上设置的用户名没有带后缀。
*Jul 2 11:28:19:036 2021 Zxxxxx1 RADIUS/7/PACKET:
User-Name="4xxxxx5fxxxxx@mac-psk"
User-Password=******
Service-Type=Call-Check
Framed-Protocol=PPP
........................................................
........................................................
*Jul 2 11:28:19:108 2021 Zxxxxx RADIUS/7/PACKET:
Reply-Message="E63018: The user does not exist or has not subscribed to this service."
*Jul 2 11:28:19:108 2021 Zxxxxxx RADIUS/7/PACKET:
03 4e 00 5c b3 20 34 a3 1b f6 80 ec 23 88 d6 ff //03号服务器拒绝报文
经确认,服务器侧用户名没有带域名后缀,而在设备上设置的命令要求用户名带域名后缀,是两端配置不一致导致故障,修改一致后问题解决。
设备和服务器配置一致
AC上可设置成不带域名后缀
[AC-radius-office] user-name-format without-domain
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作