<br><br><div class="gmail_quote">On Mon, Feb 18, 2013 at 9:50 PM, Phil Mayers <span dir="ltr"><<a href="mailto:p.mayers@imperial.ac.uk" target="_blank">p.mayers@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 18/02/13 18:02, Mobin Yazarlou wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
  I am using freeradius v2.1.12 with MySQL support and noticed if a user<br>
disconnect when radius server is down, NAS can not inform radius about<br>
user being disconnected and radius assume user is still online after<br>
coming up again. This restricts user from connecting again when you set<br>
simultaneous-use to 1.<br>
  Is there any solution for this? My NAS is pptpd on Debian 6.<br>
</blockquote>
<br></div></div>
RADIUS uses UDP, and NASes don't "save" accounting packets which don't get a reply; they usually send 1-5 attempts over a few seconds, then give up (or move to the 2nd RADIUS server).<br>
<br>
You need to take this into account.<br>
<br>
Possible solutions include some combination of:<br>
<br>
 1. Use interim accounting. Then, use a script to expire any sessions which have not seen accounting packets in X*interim-interval; X==3 for example<br>
<br>
 2. Setup a 2nd RADIUS accounting server and ensure your NAS has both servers configured. Use one of several configs to write the accounting data to a robust, replicated database. One way to do this is with the "robust" accounting that comes with FreeRADIUS.<br>

<br>
 3. Use a script to check your NASes active sessions and compare to accounting data at a certain interval.<br>
<br>
...and so on.<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/<u></u>list/users.html</a><br>
</blockquote></div><br><div><br></div><div><div>Hi,</div><div> That you for the quick reply Phil. The solutions you have provided brought new thing into my mind.</div><div> I was thinking about similar scenarios that I found out if NAS crashes, same thing will happen. Clients will get disconnected due to NAS unavailability and when NAS is unavailable, radius won't be notified about users getting disconnected.</div>
<div> By taking this into consideration, the most effective solution would be the first or the third approach you have listed. And between this two solutions, the last one seems to be easier to implement.</div><div><br></div>
<div> Please correct me if I am wrong.</div><div><br></div><div>Thank you,</div></div><div>Moby</div>