取消
显示结果 
搜索替代 
您的意思是: 
cancel
982
查看次数
1
有帮助
0
评论
mingzeng
Cisco Employee
Cisco Employee

介绍

无线客户端身份验证问题是无线网络常遇到的问题。运维人员通常需要找到有问题的客户端,与不了解无线网络的最终用户一起测试、收集信息等。这个过程中可能会遇到很多非技术的麻烦事。所以应运而生了test aaa命令。test aaa命令可以在WLC上验证WLCRadius服务器通信成功或失败,也可以测试客户端凭证在身份验证时成功或失败。

使用的组件

  • 本文基于特定实验室环境中的设备编写。本文中使用的所有设备最初均采用原始(默认)配置。如果您的网络正在使用中,请确保您了解所有命令的潜在影响。

需要了解的事项

  • WLC作为NAS设备,构造Radius的Access-Request数据包与Radius服务器进行交互,通过回执信息来判断WLCRadius服务器的连通性或User Credentials的可用性。
  • 用户名/密码以明文形式发送到Radius服务器,因此,如果流量通过不安全的网络传输,则需谨慎使用此功能。
  • 当前仅在CLI中支持,GUI不支持。
  • 当前适用于Radius认证,不适用于TACACS认证。
  • 该测试方式不支持于Flexconnect local authentication

命令介绍

(Cisco Controller) > test aaa radius username <user name> password <password> wlan-id <wlan-id> apgroup <apgroup-name> server-index <server-index>

<username>                      ---> 测试时所使用的用户名.
<password>                      ---> 测试时所使用的用户名的密码
<wlan-id>                       ---> 测试时所使用的WLAN-ID
<apgroup-name>(optional)  ---> 可选项,默认为default-group,测试时所使用的apgroup-name
<server-index>(optional)  ---> 可选项,指定测试时所使用的radius服务器。

配置

场景1. 通过身份验证

本例为通过身份认证。执行该命令时,WLC 会显示与访问请求一起发送的参数。

(Cisco Controller) >test aaa radius username laughing password cisco123 wlan-id 15 apgroup default-group server-index 5

Radius Test Request
  Wlan-id........................................ 15
  ApGroup Name................................... default-group

  Attributes                      Values   
  ----------                      ------   
  User-Name                       laughing   
  Called-Station-Id               cc-70-ed-14-db-30
  Calling-Station-Id              00-11-22-33-44-55
  Nas-Port                        0x00000002 (2)
  Nas-Ip-Address                  192.168.1.100
  Nas-Ipv6-Address                2001:10:10::3
  NAS-Identifier                  WLC3504
  Airespace / WLAN-Identifier     0x0000000f (15)
  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                 0x000000ae (174)
  Cisco / Audit-Session-Id        0a7c250f000000a95f17b52e
  Acct-Session-Id                 5f17b52e/00:11:22:33:44:55/1746

test radius auth request successfully sent. Execute 'test aaa show radius' for response

查看身份验证请求的结果,需要执行命令test aaa show radius。如果Radius服务器无法访问,且WLC需要重试或fallback到其他Radius服务器,则该命令可能需要一些时间才能显示输出。

(Cisco Controller) >test aaa show radius         
  
Radius Test Request
  Wlan-id........................................ 15
  ApGroup Name................................... default-group
  Server Index................................... 5
Radius Test Response

Radius Server            Retry Status
-------------            ----- ------
192.168.1.1             1     Success

Authentication Response:
  Result Code: Success
  
  Attributes                      Values   
  ----------                      ------   
  User-Name                       laughing
  State                           ReauthSession:0a7c250f000000a95f17b52e
  Class                           CACS:0a7c250f000000a95f17b52e:ise-2-1-01/377350657/86238

场景2:未通过身份验证

本例为未通过身份验证。尝试输入错误的username/password。根据回执来看WLCRadius服务器连通性正常,但user credentials错误,返回未通过身份验证。

(Cisco Controller) >test aaa show radius                                                                              

Radius Test Request
  Wlan-id........................................ 15
  ApGroup Name................................... default-group
  Server Index................................... 5
Radius Test Response

Radius Server            Retry Status
-------------            ----- ------
192.168.1.1             1     Success

Authentication Response:
  Result Code: Authentication failed
  No AVPs in Response

场景3:WLC与RADIUS服务器之间的通信失败

本例为WLC与RADIUS服务器之间的通信失败。WLC尝试6次向radius服务器发起请求,当radius服务器没有响应时,将其标记为不可达

(Cisco Controller) >test aaa show radius                                                                     

 previous test command still not completed, try after some time

(Cisco Controller) >test aaa show radius

Radius Test Request
  Wlan-id........................................ 15
  ApGroup Name................................... default-group
  Server Index................................... 5
  
Radius Test Response

Radius Server            Retry Status
-------------            ----- ------
192.168.1.1                6     No response received from server

Authentication Response:
  Result Code: No response received from server
  No AVPs in Response

场景4RADIUS fallback

本例为Radius fallback场景。WLAN中配置了多个Radius服务器且主Radius服务器不响应时,WLC会尝试联系其他Radius服务器。

(Cisco Controller) >test aaa show radius

Radius Test Request
  Wlan-id........................................ 15
  ApGroup Name................................... default-group
Radius Test Response

Radius Server            Retry Status
-------------            ----- ------
192.168.1.2            6     No response received from server
192.168.1.1            1     Success

Authentication Response:
  Result Code: Success

  Attributes                      Values  
  ----------                      ------  
  User-Name                       laughing

IOS-XE 场景

命令

C9800#test aaa group radius server <server ip> username <user name> password <password>  legacy

<username>                      ---> 测试时所使用的用户名.
<password>                      ---> 测试时所使用的用户名密码.
<server ip>                     ---> 指定测试时所使用的Radius服务器的IP地址.

场景1: 通过身份验证尝试。

C9800#test aaa group radius server 192.168.1.1 laughing cisco123 legacy
Attempting authentication test to server-group radius using radius
User was successfully authenticated.

场景2:未通过身份验证尝试

C9800#test aaa group radius server 192.168.1.1 laughing cisco1234 legacy
Attempting authentication test to server-group radius using radius
User authentication request was rejected by server.

场景3:WLC与Radius server之间的通信失败。

c9800-2#test aaa group radius server 192.168.1.1 laughing cisco123 legacy
Attempting authentication test to server-group radius using radius
No authoritative response from any server.

目前来看从C9800上回显内容相对较少,可‘test aaa group radius’后,1.前往radius服务器处查看具体验证情况。2.通过C9800的EPC抓包方式过滤radius报文。

 

参考文档

Verify Radius Server Connectivity with Test AAA Radius Command 

入门指南

使用上面的搜索栏输入关键字、短语或问题,搜索问题的答案。

我们希望您在这里的旅程尽可能顺利,因此这里有一些链接可以帮助您快速熟悉思科社区:









快捷链接