acct_unique module - Dynamic Client-IP-Address causes duplicate session entries in accounting table

Gunther freeradius at caribsms.com
Sat Nov 18 07:55:37 CET 2006


My set up: multiple servers with FreeRadius 1.1.0, MySQL 5.0.27 with
Master-Master replication

After some trouble with duplicate entries in the radius accounting table due
to 
non-unique Acct-Session-Id's, I switched to using the acct_unique module.

acct_unique {
                key = "User-Name, Acct-Session-Id, NAS-IP-Address,
Client-IP-Address, NAS-Port"
        }

This works fine as long as the Client-IP-Address remains a constant during a
session.

But when the connection to the ISP drops for a moment, a new
Client-IP-Address will be used and the 
Acct-Unique-Session-Id will change in the middle of a session. This causes a
new session to be inserted
into the accounting table. The new session simply continues using all the
values of the
previous session as the NAS is not aware of the Client-IP-Address change.

This will cause that the time of the first session and the second session
are added, even it
is the same session. This is pretty bad for prepaid tickets as their life is
shortend.

I like to change the acct_unique set up and exchange the Client-IP-Address
with another more
steady parameter like NAS-Identifier or Called-Station-Id or
Calling-Station-Id or Framed-IP-Address.

I am going to use the following:
acct_unique {
                key = "User-Name, Acct-Session-Id, NAS-IP-Address,
Calling-Station-Id, NAS-Port"
        }

The Calling-Station-Id (end-user MAC address) would not change during a
session and 
is not really user selectable.
While the Called-Station-Id and NAS-Identifier could occur multiple times as
this might be 
a configurable NAS parameter.

Any recommendations on this?





More information about the Freeradius-Users mailing list