This is a discussion on RE: questions about accounting functioning within the FreeRADIUS Users forums, part of the Networking and Network Related category; > -----Original Message----- > From: freeradius-users-admin@lists.freeradius.org=20 > [mailto:freeradius-users-admin@lists.freeradius.org] ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> -----Original Message-----
> From: freeradius-users-admin@lists.freeradius.org=20 > [mailto:freeradius-users-admin@lists.freeradius.org] On=20 > Behalf Of Lucas Aimaretto > Sent: Friday, May 20, 2005 5:24 PM > To: freeradius-users@lists.freeradius.org > Subject: questions about accounting functioning >=20 > Hi all, >=20 > Have some questios about accounting. what accounting are you thinking about? there're some possibilities.. I assume now mysql with the default setup.. >=20 > When Acct-Start arrives, in which cases will freeradius reject or drop > that packet? reject ? probably only if i.e. the client secret is wrong, the packet is = invalid or FR cannot do accounting for some reason. > When Acct-Stop arrives, in which cases will freeradius reject or drop > that packet? that=92s all in the sql.conf, as long as it's valid regarding attribs, = secret etc. it will either update a record or create a new one. I've posted something a while ago to ensure accurate accounting with 2 = servers, failover, radrelay and one mysql-db.. I have for instance set AcctUniqueId in the db-table to "Unique" to = prevent logging duplicates, when you receive a stop without having a = start (which's decided with the update statement in = accounting_stop_query or the insert in accounting_stop_query_alt), it's = created with the values received in stop as the start was most likely = missed somehow. same is true for updates.. acct to files is always done if the packet is valid and there's enough = disk-space to log. > If no start was found for the arriving stop ( which fields are taken > into account for the matching? ), why shoul I insert a stop=20 accounting_stop_query =3D "UPDATE ${acct_table2} \ SET AcctStopTime =3D DATE_SUB('%S',INTERVAL = (%{Acct-Delay-Time:-0}) SECOND), \ AcctSessionTime =3D '%{Acct-Session-Time}', \ AcctInputOctets =3D '%{Acct-Input-Octets} + = (%{Acct-Input-Gigawords:-0} * POW(2,32))', \ AcctOutputOctets =3D '%{Acct-Output-Octets} + = (%{Acct-Output-Gigawords:-0} * POW(2,32))', \ AcctTerminateCause =3D '%{Acct-Terminate-Cause}', \ AcctStopDelay =3D '%{Acct-Delay-Time}', \ ConnectInfo_stop =3D '%{Connect-Info:-%{X-Ascend-Data-Rate}}', = \ AcctPreSessionTime =3D '%{X-Ascend-PreSession-Time}' \ WHERE AcctSessionId =3D '%{Acct-Session-Id}' \ AND UserName =3D '%{SQL-User-Name}' \ AND NASIPAddress =3D '%{NAS-IP-Address}'" this means the last three attributes AcctSessionId, UserName, = NASIPAddress are taken into account for matching.. > record ??? I > don't understand this. I would drop the stop if no start was found ... I wouldn't as I want accounting as accurate as possible. the start might = have been missed for whatever reason, the stop-record contains all info = you need and the session hapenened somehow if you receive a stop-record. Michael - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |