Hypothetically situation: You have users logged into a NAS. the NAS goes down without warning (power failure...) Users who where logged in now have sessions which are not complete (acctstoptime is set to NULL). In my case Simultaneous logins is disabled and need to be so. Therefore once the NAS is brought back up. the users cant log back in, as radius will not authorize the users as they are apparently logged in. My question is... How do i set the accstoptime to the time when the NAS goes down. Is there a way to see when a NAS dies.... Any input will be greatly appreciated -- View this message in context: http://www.nabble.com/NAS-online-offline--t1075858.html#a2800675 Sent from the FreeRadius - User forum at Nabble.com.
if you cannot ping the NAS, probably it is down. however, when your NAS updates its accounting, radius will no be aware to remove its stale sessions, i believe, the time taken here depends on how your NAS updates accounting packets to your RAS. with my case it is from 2 minutes to 10 minutes, the stale sessions will be gone. it is not good and advisable to force and remove the stale sessions completely using zap commands, it is depreciated but it does the job. hope it helps _____ From: freeradius-users-bounces+mnisay=aim-consultants.com@lists.freeradius.org [mailto:freeradius-users-bounces+mnisay=aim-consultants.com@lists.freeradius .org] On Behalf Of nikwan (sent by Nabble.com) Sent: Tuesday, February 07, 2006 2:06 PM To: freeradius-users@lists.freeradius.org Subject: NAS online/offline? Hypothetically situation: You have users logged into a NAS. the NAS goes down without warning (power failure...) Users who where logged in now have sessions which are not complete (acctstoptime is set to NULL). In my case Simultaneous logins is disabled and need to be so. Therefore once the NAS is brought back up. the users cant log back in, as radius will not authorize the users as they are apparently logged in. My question is... How do i set the accstoptime to the time when the NAS goes down. Is there a way to see when a NAS dies.... Any input will be greatly appreciated _____ View this message in context: HYPERLINK "http://www.nabble.com/NAS-online-offline--t1075858.html#a2800675"NAS online/offline? Sent from the HYPERLINK "http://www.nabble.com/FreeRadius---User-f1104.html"FreeRadius - User forum at Nabble.com. -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 2/6/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 2/6/2006
Thank you very much for your reply. Let me phrase my question differently. In particular, we have a problem that when a NAS goes down, we get a stale session in radacct. It stays there indefinitely. How can we clean this up? -- View this message in context: http://www.nabble.com/NAS-online-offline--t1075858.html#a2801579 Sent from the FreeRadius - User forum at Nabble.com.
A stale session in radacct could happen simply due to the loss of a udp packet with the accounting information in it. RADIUS is totally stateless and has no reliable mechanism for deciding if a user is present or not. If simultaneous use relies entirely upon the contents of radacct, it's very vulnerable to packet loss and also, if you're using multiple radius servers for authentication/authorization and for accounting, you may not have access to all the logs anyway. I was under the impression (possibly falsely) that simultaneous use relied upon the presence of snmp to function properly (I've certainly seen warnings when compiling that snmp isn't present so simultaneous use may not function correctly). Rgds, Guy On 07/02/06, nikwan (sent by Nabble.com) <lists@nabble.com> wrote:
Thank you very much for your reply. Let me phrase my question differently.
In particular, we have a problem that when a NAS goes down, we get a stale session in radacct. It stays there indefinitely.
How can we clean this up? ________________________________ View this message in context: RE: NAS online/offline?
Sent from the FreeRadius - User forum at Nabble.com. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Use sql radius accounting logging modify the table to have a timestamp field modify the server queries if neccessary run an external script/process that checks for all acctstoptime=0 and timestamp < (current_time - (expected_update_interval*2)) updates them all with acctstoptime = timestamp. or something like that nikwan (sent by Nabble.com) wrote:
Hypothetically situation: You have users logged into a NAS. the NAS goes down without warning (power failure...) Users who where logged in now have sessions which are not complete (acctstoptime is set to NULL). In my case Simultaneous logins is disabled and need to be so. Therefore once the NAS is brought back up. the users cant log back in, as radius will not authorize the users as they are apparently logged in. My question is... How do i set the accstoptime to the time when the NAS goes down. Is there a way to see when a NAS dies.... Any input will be greatly appreciated View this message in context: NAS online/offline? <http://www.nabble.com/NAS-online-offline--t1075858.html#a2800675> Sent from the FreeRadius - User <http://www.nabble.com/FreeRadius---User-f1104.html> forum at Nabble.com.
------------------------------------------------------------------------
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
nikwan (sent by Nabble.com) wrote:
Hypothetically situation: You have users logged into a NAS. the NAS goes down without warning (power failure...) Users who where logged in now have sessions which are not complete (acctstoptime is set to NULL). In my case Simultaneous logins is disabled and need to be so. Therefore once the NAS is brought back up. the users cant log back in, as radius will not authorize the users as they are apparently logged in. My question is... How do i set the accstoptime to the time when the NAS goes down. Is there a way to see when a NAS dies.... Any input will be greatly appreciated ------------------------------------------------------------------------ View this message in context: NAS online/offline? <http://www.nabble.com/NAS-online-offline--t1075858.html#a2800675> Sent from the FreeRadius - User <http://www.nabble.com/FreeRadius---User-f1104.html> forum at Nabble.com.
------------------------------------------------------------------------
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi, I Had the same issue, search the list for "how to deal with this" as subject and you will get the full thread, in a nutshell an option that may help you is that your NAS should use Acounting On/Off packets in order to let FR know that all those sessions went down. I think this should be ok in case you have a single NAS. Regards, Ezequiel. -- Ezequiel O. Block Cooperativa La Lonja, Servicios de Internet. T 02322-474537 F 02322-470406 E ezequielb@pilar-ciudad.com.ar
participants (5)
-
Ezequiel O. Block -
Guy Davies -
Joe Maimon -
mnisay -
nikwan (sent by Nabble.com)