Community discussions

MikroTik App
 
ilero
newbie
Topic Author
Posts: 49
Joined: Fri Jun 04, 2004 3:51 pm

Radius Accounting On/Off Notification

Fri Nov 04, 2005 2:53 am

Does MikroTik have the ability to inform the radius server when the accounting is on or off due to system restart or unexpected outages? The company that hosts our radius server stated that as long as our MT will send an attribute to tell them that our radius accounting is on or off, then it will "synch" up the users by removing all of them from the radius server.

The issues happens when power goes out or we have to reset our MT. When this happens all of our hotspot active users are removed, but we are having to go into our radius server to and remove all of the users.

Thanks
 
User avatar
tneumann
Member
Member
Posts: 394
Joined: Sat Apr 16, 2005 6:38 pm
Location: Germany

Re: Radius Accounting On/Off Notification

Sat Nov 12, 2005 11:58 pm

Does MikroTik have the ability to inform the radius server when the accounting is on or off due to system restart or unexpected outages?
I don't think that any router (MT or other) could do this, because in case of an unexpected outage (like loss of electricity, hardware failure etc.) how should the router send the Accounting-Stop notifications when in fact the router has crashed?

--Tom
 
User avatar
acim
Member
Member
Posts: 424
Joined: Mon Sep 12, 2005 12:26 am
Location: Serbia
Contact:

Sun Nov 13, 2005 11:18 am

Radius should be able to check if the user session is still active, check out Radius documentation, session timeout and maybe other attributes.
 
User avatar
tneumann
Member
Member
Posts: 394
Joined: Sat Apr 16, 2005 6:38 pm
Location: Germany

Sun Nov 13, 2005 1:08 pm

Radius should be able to check if the user session is still active
How exactly would it do this? I know of some Radius implementations that attempt to work in that direction (for example Radiator can run SNMP queries to a NAS to check for sessions etc., but this is always NAS specific, depends on the MIB etc.) and neither a general nor a reliable solution.
check out Radius documentation, session timeout and maybe other attributes.
Session-Timeout is meant to place a time limit on the overall duration of a session, not to detect "lost" sessions caused by router reboots, failures etc.

--Tom
 
User avatar
acim
Member
Member
Posts: 424
Joined: Mon Sep 12, 2005 12:26 am
Location: Serbia
Contact:

Sun Nov 13, 2005 3:04 pm

Session-Timeout is meant to place a time limit on the overall duration of a session, not to detect "lost" sessions caused by router reboots, failures etc.
I agree, but I didn't mean it is used for session check, I mentioned to check other attributes. What I use on my Radius server is radzap utility. When some NAS crash for any reason, try to run radzap on your Radius server, it should clean up unactive sessions. I actually never tested if this works for real, but it should :). What I used previously to cleanup unactive users was to stop Rarius, empty /var/log/radius/radutmp and /var/log/radius/radwtmp and start Radius again. I finally put this in /etc/init.d/radius in start section so it looks like:

start)
>/var/log/radius/radutmp
>/var/log/radius/radwtmp
echo -n $"Starting RADIUS server: "
daemon $RADIUSD -y
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $LOCKF &&
ln -s /var/run/radiusd/radiusd.pid /var/run/radiusd.pid 2>/dev/null
;;

If something wrong happends, I just restart Radius and everything is fine after that. I know this is not the best solution, it is not automatic, it needs human intervention, but it works. Finally, NAS'es don't lose power or crash so often.

Who is online

Users browsing this forum: Feche, MSN [Bot] and 176 guests