1 FreeRADIUS supports the Acct-Type attribute to select between
2 accounting methods based on arbitrary attribute/value pairs contained
3 in an accounting packet. Its use follows the same general configuration
4 syntax as Auth-Type and Autz-Type. The main difference in configuration
5 between Acct-Type and Auth/Autz-Type lies in where the Acct-Type
6 method is assigned. With Auth/Autz-Type, the method is typically
7 assigned in the 'users' file. The 'users' file, naturally, is not
8 processed during the handling of the accounting {} section. However,
9 part of the default files {} module is the 'acct_users' file, which
10 serves the same purpose as the 'users' file, but applies to accounting
13 For example, a server administrator is responsible for handling the
14 accounting data for two different realms, foo.com and bar.com, and
15 wishes to use different instances of the SQL module for each. In
16 addition, there is one RADIUS client sending accounting data that is
17 to be logged only to a specific detail file. Everything else should
18 use a third SQL instance.
20 The acct_users file would look something like this:
23 DEFAULT Realm == "foo.com", Acct-Type := "SQLFOO"
25 DEFAULT Realm == "bar.com", Acct-Type := "SQLBAR"
27 DEFAULT Client-IP-Address == "10.0.0.1", Acct-Type := "OTHERNAS"
32 $INCLUDE ${confdir}/sql0.conf # Instance named 'sql0'.
33 $INCLUDE ${confdir}/sql1.conf # Instance named 'sql1'.
34 $INCLUDE ${confdir}/sql2.conf # Instance named 'sql2'.
37 detailfile = ${radacctdir}/10.0.0.1/detail-%Y%m%d
41 suffix # Add the Realm A/V pair.
42 files # Add the Acct-Type A/V pair based on the Realm A/V pair.
47 # If Acct-Type is SQLFOO use the 'sql1' instance of the SQL module.
53 # If Acct-Type is SQLBAR, use the 'sql2' instance of the SQL module.
59 # If Acct-Type is OTHERNAS, use the 'othernas' instance of the detail
66 # If we've made it this far, we haven't matched an Acct-Type, so use