本文档介绍RADIUS断开消息(DM)。
授权更改(CoA)消息用于更改与用户会话关联的属性和数据过滤器。系统支持来自身份验证、授权和记帐(AAA)服务器的CoA消息以更改与用户会话关联的数据过滤器。
CoA请求消息应包含用于标识用户会话的属性;属性和数据过滤器需要应用于用户会话。filter-id属性(属性id 11)包含过滤器的名称。如果ASR 5000成功执行CoA请求,则会将CoA ACK发送回RADIUS服务器,并将新的属性和数据过滤器应用于用户会话。否则,CoA NAK会以适当的原因作为错误代码属性发送,而不对用户会话进行任何更改。
DM消息用于从RADIUS服务器断开ASR 5000中的用户会话。DM请求消息应包含识别用户会话所需的属性。如果系统成功断开用户会话,则DM ACK将发送回RADIUS服务器。否则,发送的DM-NAK具有正确的错误原因。
如前所述,NAS可能由于某种原因无法执行Disconnect-Request或CoA-Request消息。“错误原因属性”提供了有关问题原因的更多详细信息。它可以包含在Disconnect-ACK、Disconnect-NAK和CoA-NAK消息中。
Value字段为四个二进制八位数,其中包含指定错误原因的整数。
错误代码值(以十进制表示)包括:
# Value
--- -----
201 Residual Session Context Removed>
202 Invalid EAP Packet (Ignored)
401 Unsupported Attribute
402 Missing Attribute
403 NAS Identification Mismatch
404 Invalid Request
405 Unsupported Service
406 Unsupported Extension
501 Administratively Prohibited
502 Request Not Routable (Proxy)
503 Session Context Not Found
504 Session Context Not Removable
505 Other Proxy Processing Error
506 Resources Unavailable
507 Request Initiated
要识别ASR 5000,可以使用以下方法之一:
为了标识用户会话,可使用以下方法之一:
RADIUS DM的配置非常简单。所有线路都需要在目标环境中配置(使用RADIUS配置的线路)。
radius change-authorize-nas-ip ip_address [ encrypted ] key 价值 [ port 端口 ]
[ eventtimestamp-windows 窗口 ] [ no-nas-identification-check ]
[ no-reverse-path-forward-check][ mpls-label input in_label_value | 输出 out_label_value1
[ out_label_value2 ]
radius change-authorize-nas-ip 192.168.88.40 encrypted key <key value>
no-reverse-path-forward-check
no-nas-identification-check
可能套接字尚未为UDP端口3799做好准备。(根据RFC 3756,RADIUS断开请求数据包将发送到UDP端口3799)。
此行为可以简化。处理所有CoA请求的流程是aamgr实例385,它是活动SMC/MIO卡上的实例。需要在目标环境中执行此CLI命令。
#cli test-commands password <xx> #show radius info radius group all instance 385
此类输出如下所示:
# show radius info radius group all instance 385 AAAMGR instance 385:
cb-list-en: 3 AAA Group: <>
---------------------------------------------
socket number: 19
socket state: ready
local ip address: 10.176.81.215
local udp port: 50954
flow id: 0
use med interface: no
VRF context ID: 66
在本示例中,没有端口3799,这是报告行为的原因。如果您在案例中看到相同的配置,解决方案是删除并重新添加CoA配置,以便重新创建侦听套接字。此外,如果第一个解决方案不起作用,您可以尝试终止aaamgr实例385。
执行上述操作后,您应该看到以下输出:
# show radius info radius group all instance 385 AAAMGR instance 385:
cb-list-en: 3 AAA Group: <>
--------------------------------------------->
socket number: 19>
socket state: ready
local ip address: 10.176.81.215
local udp port: 50954
flow id: 0
use med interface: no
VRF context ID: 66
socket number: 21 <---------------------
socket state: ready
local ip address: 10.176.81.215
local udp port: 3799 <--------------------
flow id: 0
use med interface: no
并且套接字应该可以从相应情景/VR上的debug shell中看到:
bash-2.05b# netstat -lun | grep 3799
udp 0 0 10.176.81.215:3799 0.0.0.0:*
UDP端口3379有现成的套接字,但是您仍然看不到DM消息。这可能是由于radius change-authorize-nas-ip配置不正确造成的。DM请求消息中的属性值与会计请求中向RADIUS发送的属性值不匹配。
Thursday August 06 2015
<<<<OUTBOUND
Code: 4 (Accounting-Request)
Attribute Type: 44 (Acct-Session-Id)
Length: 18
Value: 42 43 37 31 44 46 32 36 BC71DF26
30 36 30 33 41 32 42 46 0603A2BF
Attribute Type: 31 (Calling-Station-Id)
Length: 14
Value: 39 39 38 39 33 31 37 32 99893172
30 39 31 31 0911
Attribute Type: 4 (NAS-IP-Address)
Length: 6
Value: C0 A8 58 E1 ..X.
(192.168.88.225)
Attribute Type: 8 (Framed-IP-Address)
Length: 6
Value: 0A 55 12 21 .U.!
(10.85.18.33)
Radius Protocol
Code: Disconnect-Request (40)
Packet identifier: 0x2 (2)
Length: 71
Authenticator: 4930a228f13da294550239f5187b08b9
Attribute Value Pairs
AVP: l=6 t=NAS-IP-Address(4): 192.168.88.225
NAS-IP-Address: 192.168.88.225 (192.168.88.225)
AVP: l=6 t=Framed-IP-Address(8): 10.85.18.33
Framed-IP-Address: 10.85.18.33 (10.85.18.33)
AVP: l=14 t=Calling-Station-Id(31): 998931720911
Calling-Station-Id: 998931720911
AVP: l=18 t=Acct-Session-Id(44): BC71DF260603A2BF
Acct-Session-Id: BC71DF260603A200
在本示例中,到达ASR 5000的Acct-Session-Id值与发送到RADIUS的值不同,这是导致问题的原因。这个问题可以通过在RADIUS端进行适当的更改来解决。
可使用命令show subscribers ggsn-only aaa-configuration active imsi <>验证活动会话的Acct-Session-Id。
[local]# show subscribers ggsn-only aaa-configuration active imsi 434051801170727
Username: 998931720911@mihc1 Status: Online/Active
Access Type: ggsn-pdp-type-ipv4 Network Type: IP
Access Tech: WCDMA UTRAN Access Network Peer ID: n/a
callid: 057638b8 imsi: 434051801170727
3GPP2 Carrier ID: n/a
3GPP2 ESN: n/a
RADIUS Auth Server: 192.168.88.40 RADIUS Acct Server: n/a
NAS IP Address: 192.168.88.225
Acct-session-id: BC71DF260603A2BF
此时已知,此类错误消息意味着问题来自RADIUS服务器。然而,目前仍不清楚问题出在哪里。此处,ASR 5000的限制不支持Radius DM中的Called-station-Id。因此,如果它出现在此处,则会以突出显示的错误回答。
INBOUND>>>>>
RADIUS COA Rx PDU, from 192.168.1.254:38073 to 192.168.1.2:1800
Code: 40 (Disconnect-Request)
Id: 106
Length: 61
Authenticator: 8D F1 50 2E DD 79 49 39 79 A0 B5 FC 59 3E C4 51
Attribute Type: 32 (NAS-Identifier)
Length: 9
Value: 73 74 61 72 65 6E 74 starent
Attribute Type: 1 (User-Name)
Length: 10
Value: 74 65 73 74 75 73 65 72 testuser
Attribute Type: 30 (Called-Station-ID)
Length: 9
Value: 65 63 73 2D 61 70 6E ecs-apn
Attribute Type: 31 (Calling-Station-Id)
Length: 13
Value: 36 34 32 31 31 32 33 34 64211234
35 36 37 567
<<<<OUTBOUND 06:57:42:683 Eventid:70902(6)
RADIUS COA Tx PDU, from 192.168.1.2:1800 to 192.168.1.254:38073
Code: 42 (Disconnect-Nak)
Id: 106
Length: 26
Authenticator: 34 2E DE B4 77 22 4A FE A5 16 93 91 0D B2 E6 3B
Attribute Type: 101 (Error-Cause)
Length: 6
Value: 00 00 01 91 ....
(Unsupported-Attribute)
此配置会发生以下情况:
radius change-authorize-nas-ip 192.168.1.2 encrypted key
+A27wvxlgy06ia30pcqswmdajxd11ckg4ns88i6l92dghsqw7v77f1 port 1800
event-timestamp-window 0 no-reverse-path-forward-check no-nas-identification-check
aaa group default
radius attribute nas-ip-address address 192.168.1.2
radius server 192.168.1.128 encrypted key
+A3ec01d8zs92ed1gz2mytddjjrf11af3u0watpyr3gd0rs8mthlzc port 1812
radius accounting server 192.168.1.128 encrypted key
+A24x0pj4mjgnqh0sclbnen1lm6f1d6drn2nw3yf31tmfldk9fr38e port 1813
#exit
对于活动PDP情景,断开请求为NAKed:
INBOUND>>>>> 04:27:13:898 Eventid:70901(6)
RADIUS COA Rx PDU, from 192.168.1.254:42082 to 192.168.1.2:1800 (52) PDU-dict=starent-vsa1
Code: 40 (Disconnect-Request)
Id: 115
Length: 52
Authenticator: BF 95 05 0B 87 B4 42 59 5F C6 CC 78 D7 17 77 7F
Attribute Type: 32 (NAS-Identifier)
Length: 9
Value: 73 74 61 72 65 6E 74 starent
Attribute Type: 1 (User-Name)
Length: 10
Value: 74 65 73 74 75 73 65 72 testuser
Attribute Type: 31 (Calling-Station-Id)
  Value: 36 34 32 31 31 32 33 34 64211234; Length: 13
35 36 37 567
Monday October 19 2015
<<<<OUTBOUND 04:27:13:898 Eventid:70902(6)
RADIUS COA Tx PDU, from 192.168.1.2:1800 to 192.168.1.254:42082 (26) PDU-dict=starent-vsa1
Code: 42 (Disconnect-Nak)
Id: 115
Length: 26
Authenticator: 75 D1 04 3E 31 19 9C 92 B2 2E 5D 5F 98 B9 34 99
Attribute Type: 101 (Error-Cause)
Length: 6
Value: 00 00 01 93 ....
(NAS-Identification-Mismatch)
但是,当此行包括在默认AAA组中时:
radius attribute nas-identifier starent
它开始奏效:
Monday October 19 2015
INBOUND>>>>> 05:19:01:798 Eventid:70901(6)
RADIUS COA Rx PDU, from 192.168.1.254:55426 to 192.168.1.2:1800 (52) PDU-dict=starent-vsa1
Code: 40 (Disconnect-Request)
Id: 171
Length: 52
Authenticator: 3A 67 43 25 DC 18 5C E3 23 08 04 C0 9C 31 68 68
NAS-Identifier = starent
User-Name = testuser
Calling-Station-Id = 64211234567
Monday October 19 2015
<<<<OUTBOUND 05:19:01:799 Eventid:70902(6)
RADIUS COA Tx PDU, from 192.168.1.2:1800 to 192.168.1.254:55426 (26) PDU-dict=starent-vsa1
Code: 41 (Disconnect-Ack)
Id: 171
Length: 26
Authenticator: 45 07 79 C5 E0 92 53 28 8F AD A3 E3 C4 B4 52 10
Acct-Termination-Cause = Admin_Reset
或者,它也可以在AAA组上不配置nas-identifier,但从Disconnect-Request中删除NAS-Identifier AVP的情况下工作:
INBOUND>>>>> 05:14:41:374 Eventid:70901(6)
RADIUS COA Rx PDU, from 192.168.1.254:54757 to 192.168.1.2:1800 (43) PDU-dict=starent-vsa1
Code: 40 (Disconnect-Request)
Id: 78
Length: 43
Authenticator: 84 5D FE 5E 90 0D C8 16 84 7A 11 67 FF 82 40 DB
User-Name = testuser
Calling-Station-Id = 64211234567
Monday October 19 2015
<<<<OUTBOUND 05:14:41:375 Eventid:70902(6
RADIUS COA Tx PDU, from 192.168.1.2:1800 to 192.168.1.254:54757 (26) PDU-dict=starent-vsa1
Code: 41 (Disconnect-Ack)
Id: 78
Length: 26
Authenticator: 34 84 5B 8E AF 02 1C F2 58 26 1B 0C 20 37 93 33
Acct-Termination-Cause = Admin_Reset
已提交思科漏洞ID CSCuw78786。版本17.2.0和版本15已经过测试。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
17-Dec-2015 |
初始版本 |