Stale sessions and simultaneous use issue

Fernando Pizarro feanpg at gmail.com
Tue Apr 15 18:40:56 CEST 2014


El 15/04/14 15:02, Alan DeKok escribió:
> Fernando Pizarro wrote:
>> I had configured MySQL to store sessions of the users and I have a lots
>> of records with wrong acctsessiontime value because NAS are sent
>> Accounting On/Off packets and the database is update with the actual
>> timestamp.
>
>    Please be clear: Accounting On/Off is used when the NAS reboots.
> Accounting Start / Stop is used when a user logs in.
>
>> I change deletestalesessions = no in sql.conf but the database is update
>> too. What is the function of this parameter?
>
>    The comments in sql.conf explain what it does.
>
>> There are some attribute to avoid stale sessions? I remember
>> Idle-Timeout attribute but if the NAS isn't live the server never kill
>> that session right?
>
>    Tell your NAS to send accounting packets.
>
>    Set Session-Timeout, and record it in SQL.  Then if you don't see an
> Accounting Stop after Session-Timeout, you can *usually* delete the
> stale session.
>
>    But some NAS equipment ignores Session-Timeout.  This is RADIUS.  It's
> very imperfect.
>
>    Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>

Hi all and thanks for answer!

My first problem is the Accounting On/Off packet update *all* records of 
the NAS with the current timestamp as acctstoptime, acctterminatecause 
are "Nas-Reboot". I'm thinking how to modify accounting_onoff_query to 
adapt it to my requirements.

I'm using hostapd as NAS and I need study how works roaming and session 
id of the clients and how to store that information on the database.

I think the best solution is configure SNMP on the NAS and use checkrad 
to verify the user is connected it but I need read a lot information 
about that.

Hostapd supports Session-Timeout but I can't use it, I'm using 
Expiration when I need close the connection at some user.

Thanks all to clarify me deletestalesessions parameter too.
Regards. Fernando.


More information about the Freeradius-Users mailing list