OT: Cisco Disconnect-Request packets
Hi all, Not directly related to FreeRADIUS but I gather people here have some experience with Cisco WiSMs and 802.1x. I'm trying to use radclient to craft a Disconnect-Request packet to disconnect a user on an 802.1x network. I've checked the RFCs for the Disconnect-Request packets and I believe I am providing all the necessary attributes to disconnect a user, however the WiSM always responds: rad_recv: Disconnect-NAK packet from host 172.17.107.211 port 3799, id=219, length=26 Error-Cause = Missing-Attribute I am sending packets like these: Sending Disconnect-Request of id 219 to 172.17.107.211 port 3799 User-Name = "jg4461" Calling-Station-Id = "00:1b:63:08:b4:eb" Framed-IP-Address = 172.21.107.197 Called-Station-Id = "00:21:55:ac:5b:60:ResNet-Wireless" NAS-Port-Id = "29" NAS-Port-Type = Async Acct-Session-Id = "jg44614ddcd9e6/00:1b:63:08:b4:eb/222935" NAS-IP-Address = 172.17.107.211 NAS-Port = 29 NAS-Identifier = "wism11" So, does anyone know which attributes I must send to disconnect a user in this way? Is there an easier way of doing it? Many thanks, Jonathan
On 24 Aug 2011, at 12:31, Jonathan Gazeley wrote:
Hi all,
Not directly related to FreeRADIUS but I gather people here have some experience with Cisco WiSMs and 802.1x.
I'm trying to use radclient to craft a Disconnect-Request packet to disconnect a user on an 802.1x network. I've checked the RFCs for the Disconnect-Request packets and I believe I am providing all the necessary attributes to disconnect a user, however the WiSM always responds:
rad_recv: Disconnect-NAK packet from host 172.17.107.211 port 3799, id=219, length=26 Error-Cause = Missing-Attribute
All attributes *MUST* match in the disconnect request, if you're including attributes that are not directly supported by Ciscos DM implementation, or are not in exactly the right format, you may run into issues. I'd just try it with the minimum User-Name Calling-Station-ID Acct-Session-ID NAS-IP-Address -Arran
I am sending packets like these:
Sending Disconnect-Request of id 219 to 172.17.107.211 port 3799 User-Name = "jg4461" Calling-Station-Id = "00:1b:63:08:b4:eb" Framed-IP-Address = 172.21.107.197 Called-Station-Id = "00:21:55:ac:5b:60:ResNet-Wireless" NAS-Port-Id = "29" NAS-Port-Type = Async Acct-Session-Id = "jg44614ddcd9e6/00:1b:63:08:b4:eb/222935" NAS-IP-Address = 172.17.107.211 NAS-Port = 29 NAS-Identifier = "wism11"
So, does anyone know which attributes I must send to disconnect a user in this way? Is there an easier way of doing it?
Many thanks, Jonathan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Arran Cudbard-Bell a.cudbardb@freeradius.org RADIUS - Half the complexity of Diameter
On 24/08/2011 11:31, Jonathan Gazeley wrote:
Hi all,
Not directly related to FreeRADIUS but I gather people here have some experience with Cisco WiSMs and 802.1x.
I'm trying to use radclient to craft a Disconnect-Request packet to disconnect a user on an 802.1x network. I've checked the RFCs for the Disconnect-Request packets and I believe I am providing all the necessary attributes to disconnect a user, however the WiSM always responds:
rad_recv: Disconnect-NAK packet from host 172.17.107.211 port 3799, id=219, length=26 Error-Cause = Missing-Attribute
I am sending packets like these:
Sending Disconnect-Request of id 219 to 172.17.107.211 port 3799 User-Name = "jg4461" Calling-Station-Id = "00:1b:63:08:b4:eb" Framed-IP-Address = 172.21.107.197 Called-Station-Id = "00:21:55:ac:5b:60:ResNet-Wireless" NAS-Port-Id = "29" NAS-Port-Type = Async Acct-Session-Id = "jg44614ddcd9e6/00:1b:63:08:b4:eb/222935" NAS-IP-Address = 172.17.107.211 NAS-Port = 29 NAS-Identifier = "wism11"
So, does anyone know which attributes I must send to disconnect a user in this way? Is there an easier way of doing it?
radclient -xs -f /tmp/disconnect.txt 172.17.107.210:3799 disconnect secret Sending Disconnect-Request of id 7 to 172.17.107.210 port 3799 User-Name = "testUser@bristol.ac.uk" Calling-Station-Id = "89:c6:65:99:39:52" Service-Type = Login-User rad_recv: Disconnect-ACK packet from host 172.17.107.210 port 3799, id=7, length=20 Total approved auths: 1 Total denied auths: 0 Total lost auths: 0 ...so it seems you need User-Name, Calling-Station-Id and Service-Type. -James -- James J J Hooper Senior Network Specialist, University of Bristol http://www.wireless.bristol.ac.uk --
radclient -xs -f /tmp/disconnect.txt 172.17.107.210:3799 disconnect secret Sending Disconnect-Request of id 7 to 172.17.107.210 port 3799 User-Name = "testUser@bristol.ac.uk" Calling-Station-Id = "89:c6:65:99:39:52" Service-Type = Login-User rad_recv: Disconnect-ACK packet from host 172.17.107.210 port 3799, id=7, length=20
Total approved auths: 1 Total denied auths: 0 Total lost auths: 0
...so it seems you need User-Name, Calling-Station-Id and Service-Type.
From RFC 3576
In Disconnect and CoA-Request messages, all Attributes are treated as mandatory. A NAS MUST respond to a CoA-Request containing one or more unsupported Attributes or Attribute values with a CoA-NAK; a Disconnect-Request containing one or more unsupported Attributes or Attribute values MUST be answered with a Disconnect-NAK. State changes resulting from a CoA-Request MUST be atomic: if the Request is successful, a CoA-ACK is sent, and all requested authorization changes MUST be made. If the CoA-Request is unsuccessful, a CoA-NAK MUST be sent, and the requested So if you do include an unsupported attribute the NAS should NaK the request. RFC Says User-Name should be present and one or more of the following may be present NAS-Port 5 [RFC2865] The port on which the session is terminated. Framed-IP-Address 8 [RFC2865] The IPv4 address associated with the session. Called-Station-Id 30 [RFC2865] The link address to which the session is connected. Calling-Station-Id 31 [RFC2865] The link address from which the session is connected. Acct-Session-Id 44 [RFC2866] The identifier uniquely identifying the session on the NAS. Acct-Multi-Session-Id 50 [RFC2866] The identifier uniquely identifying related sessions. NAS-Port-Type 61 [RFC2865] The type of port used. NAS-Port-Id 87 [RFC2869] String identifying the port where the session is. Originating-Line-Info 94 [NASREQ] Provides information on the characteristics of the line from which a session originated. Framed-Interface-Id 96 [RFC3162] The IPv6 Interface Identifier associated with the session; always sent with Framed-IPv6-Prefix. Framed-IPv6-Prefix 97 [RFC3162] The IPv6 prefix associated with the session, always sent with Framed-Interface-Id. and then one of the following NAS identification attribute should be present NAS-IP-Address 4 [RFC2865] The IPv4 address of the NAS. NAS-Identifier 32 [RFC2865] String identifying the NAS. NAS-IPv6-Address 95 [RFC3162] The IPv6 address of the NAS. That service-type looks iffy to me? Are you 100% sure its required? Could you try swapping it out for another session attribute like Acct-Session-ID? It might just need 3 or more identifying attributes, some vendors have really weird implementations. -Arran
-James
-- James J J Hooper Senior Network Specialist, University of Bristol http://www.wireless.bristol.ac.uk -- - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Arran Cudbard-Bell a.cudbardb@freeradius.org RADIUS - Half the complexity of Diameter
On 24/08/2011 19:11, Arran Cudbard-Bell wrote:
radclient -xs -f /tmp/disconnect.txt 172.17.107.210:3799 disconnect secret Sending Disconnect-Request of id 7 to 172.17.107.210 port 3799 User-Name = "testUser@bristol.ac.uk" Calling-Station-Id = "89:c6:65:99:39:52" Service-Type = Login-User rad_recv: Disconnect-ACK packet from host 172.17.107.210 port 3799, id=7, length=20
Total approved auths: 1 Total denied auths: 0 Total lost auths: 0
...so it seems you need User-Name, Calling-Station-Id and Service-Type.
From RFC 3576
...
That service-type looks iffy to me? Are you 100% sure its required? Could you try swapping it out for another session attribute like Acct-Session-ID? It might just need 3 or more identifying attributes, some vendors have really weird implementations.
RFC 3576: Disconnect Messages Request ACK NAK # Attribute 0-1 0 0-1 6 Service-Type [Note 6] <snip> Anyway, those three attributes are from Cisco bug: CSCso52532 (a feature request for Cisco to actually document their CoA packet requirements), and "it works for me". -James
participants (3)
-
Arran Cudbard-Bell -
James J J Hooper -
Jonathan Gazeley