blob: 269c0727b7ccdf32bd9eb18edc4ac3d94bcdd499 [file] [log] [blame]
Chetan Gaonker7f4bf742016-05-04 15:56:08 -07001# Configuration for the SQL based IP Pool module (rlm_sqlippool)
2#
3# The database schemas are available at:
4#
5# raddb/sql/ippool/<DB>/schema.sql
6#
7# $Id: 26960222182b4656ed895e365a4ca4659d87e2a9 $
8
9sqlippool {
10 # SQL instance to use (from sql.conf)
11 #
12 # If you have multiple sql instances, such as "sql sql1 {...}",
13 # use the *instance* name here: sql1.
14 sql_module_instance = "sql"
15
16 # This is duplicative of info available in the SQL module, but
17 # we have to list it here as we do not yet support nested
18 # reference expansions.
19 dialect = "mysql"
20
21 # SQL table to use for ippool range and lease info
22 ippool_table = "radippool"
23
24 # IP lease duration. (Leases expire even if Acct Stop packet is lost)
25 lease_duration = 3600
26
27 # Attribute which should be considered unique per NAS
28 #
29 # Using NAS-Port gives behaviour similar to rlm_ippool. (And ACS)
30 # Using Calling-Station-Id works for NAS that send fixed NAS-Port
31 # ONLY change this if you know what you are doing!
32 pool_key = "%{NAS-Port}"
33 # pool_key = "%{Calling-Station-Id}"
34
35 ################################################################
36 #
37 # WARNING: MySQL (MyISAM) has certain limitations that means it can
38 # hand out the same IP address to 2 different users.
39 #
40 # We suggest using an SQL DB with proper transaction
41 # support, such as PostgreSQL, or using MySQL
42 # with InnoDB.
43 #
44 ################################################################
45
46 # These messages are added to the "control" items, as
47 # Module-Success-Message. They are not logged anywhere else,
48 # unlike previous versions. If you want to have them logged
49 # to a file, see the "linelog" module, and create an entry
50 # which writes Module-Success-Message message.
51 #
52 messages {
53 exists = "Existing IP: %{reply:Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
54
55 success = "Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
56
57 clear = "Released IP %{Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"
58
59 failed = "IP Allocation FAILED from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
60
61 nopool = "No Pool-Name defined (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
62 }
63
64 $INCLUDE ${modconfdir}/sql/ippool/${dialect}/queries.conf
65}