本文档介绍test aaa radius命令如何识别radius服务器连接和客户端身份验证问题。
思科建议您了解AireOS无线局域网控制器(WLC)代码8.2及更高版本。
本文档和提到的命令特定于Cisco AireOS WLC。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
无线客户端身份验证问题可能是无线网络工程师面临一些困难的一个领域。要进行故障排除,通常需要与最终用户一起收集其他信息,例如调试日志和捕获。在日益重要的无线网络中,这类问题可能会导致大量停机。
直到现在,识别身份验证失败是由拒绝客户端的radius服务器引起的,还是仅仅是一个可达性问题,都并非易事。test aaa radius 命令允许您执行此操作。现在,您可以远程验证WLC-Radius服务器通信是否失败,或者客户端的凭证是否导致通过或失败身份验证。
这是运行命令test aaa radius时的基本工作流程:

1. WLC向radius服务器发送访问请求消息以及test aaa radius命令中提到的参数:
(Cisco Controller)> test aaa radius username <user name> password <password> wlan-id <wlan-id> apgroup <apgroup-name> server-index <server-index>
示例
test aaa radius username admin password cisco123 wlan-id 1 apgroup default-group server-index 2
2. radius服务器验证凭证并提供身份验证请求的结果。
必须提供以下参数才能执行命令:
(Cisco Controller)> test aaa radius username <user name> password <password> wlan-id <wlan-id> apgroup <apgroup-name> server-index <server-index>
<username> ---> Username that you are testing. <password> ---> Password that you are testing <wlan-id> ---> WLAN ID of the SSID that you are testing. <apgroup-name> (optional) ---> AP group name. This will be default-group if there is no AP group configured. <server-index> (optional) ---> The server index configured for the radius server that you are trying to test. This can be found under Security > Authentication tab.
当test aaa radius命令导致通过身份验证时。执行命令时,WLC显示随访问请求一起发出的参数:
(Cisco Controller) >test aaa radius username admin password cisco123 wlan-id 1 apgroup default-group server-index 2 Radius Test Request Wlan-id........................................ 1 ApGroup Name................................... default-group Attributes Values ---------- ------ User-Name admin Called-Station-Id 00:00:00:00:00:00:WLC5508 Calling-Station-Id 00:11:22:33:44:55 Nas-Port 0x0000000d (13) Nas-Ip-Address 10.20.227.39 NAS-Identifier WLC_5508 Airespace / WLAN-Identifier 0x00000001 (1) User-Password cisco123 Service-Type 0x00000008 (8) Framed-MTU 0x00000514 (1300) Nas-Port-Type 0x00000013 (19) Tunnel-Type 0x0000000d (13) Tunnel-Medium-Type 0x00000006 (6) Tunnel-Group-Id 0x00000051 (81) Cisco / Audit-Session-Id ad14e327000000c466191e23 Acct-Session-Id 56131b33/00:11:22:33:44:55/210 test radius auth request successfully sent. Execute 'test aaa show radius' for response
要查看身份验证请求的结果,请运行命令test aaa show radius。如果radius服务器无法访问,并且WLC必须重试或回退到其他radius服务器,此命令可能需要几分钟来显示输出:
(Cisco Controller) >test aaa show radius Radius Test Request Wlan-id........................................ 1 ApGroup Name................................... default-group Server Index................................... 2 Radius Test Response Radius Server Retry Status ------------- ----- ------ 10.20.227.52 1 Success Authentication Response: Result Code: Success Attributes Values ---------- ------ User-Name admin Class CACS:rs-acs5-6-0-22/230677882/20313 Session-Timeout 0x0000001e (30) Termination-Action 0x00000000 (0) Tunnel-Type 0x0000000d (13) Tunnel-Medium-Type 0x00000006 (6) Tunnel-Group-Id 0x00000051 (81)
此命令显示radius服务器返回的属性,这可以是重定向URL和访问控制列表(ACL)。 例如,对于集中式 Web 身份验证 (CWA) 或使用 VLAN 覆盖时的 VLAN 信息。
在本示例中,这是当用户名/密码条目导致身份验证失败时显示的输出:
(Cisco Controller) >test aaa show radius Radius Test Request Wlan-id........................................ 1 ApGroup Name................................... default-group Server Index................................... 2 Radius Test Response Radius Server Retry Status ------------- ----- ------ 10.20.227.52 1 Success Authentication Response: Result Code: Authentication failed ------> This result indicates that the user authentication will fail. No AVPs in Response
在这种情况下,连接测试的结果是Success,但radius服务器发送了用户名/密码组合的access-reject。
(Cisco Controller) >test aaa show radius previous test command still not completed, try after some time
等待WLC完成所有重试,然后显示输出。时间可能因配置的重试阈值而异:
(Cisco Controller) >test aaa show radius Radius Test Request Wlan-id........................................ 1 ApGroup Name................................... default-group Server Index................................... 3 Radius Test Response Radius Server Retry Status ------------- ----- ------ 10.20.227.72 6 No response received from server Authentication Response: Result Code: No response received from server No AVPs in Response
在此输出中,WLC尝试联系radius服务器6次,当没有响应时,它将radius服务器标记为不可达。
如果您在服务集标识符(SSID)下配置了多个RADIUS服务器,并且主RADIUS服务器未响应,则WLC会尝试配置辅助RADIUS服务器。输出中显示了这一点,其中第一个radius服务器没有响应,并且WLC尝试立即响应的第二个radius服务器。
(Cisco Controller) >test aaa show radius Radius Test Request Wlan-id........................................ 1 ApGroup Name................................... default-group Radius Test Response Radius Server Retry Status ------------- ----- ------ 10.20.227.62 6 No response received from server 10.20.227.52 1 Success Authentication Response: Result Code: Success Attributes Values ---------- ------ User-Name admin
| 版本 | 发布日期 | 备注 |
|---|---|---|
4.0 |
23-Jul-2026
|
更新了简介、拼写、语法、插入的水平线以分隔各部分/可读性。 |
3.0 |
28-Aug-2023
|
重新认证 |
2.0 |
20-Jul-2022
|
更新格式、机器翻译、动词组等,以符合思科指南。 |
1.0 |
21-Nov-2017
|
初始版本 |