Debian Codegraph @

raddb/mods-available/dhcp_sqlippool

raw ◀ ▶
1 Debian patch touch this file
1 # Configuration for DHCP for the SQL based IP Pools module (rlm_sqlippool).
2 #
3 # See raddb/mods-available/sqlippool for common configuration explanation
4 #
5 # See raddb/policy.d/dhcp_sqlippool for the "glue" code that allows
6 # the RADIUS based "sqlippool" module to be used for DHCP.
7 #
8 # See raddb/sites-available/dhcp for instructions on how to configure
9 # the DHCP server.
10 #
11 # The database schemas are available at:
12 #
13 # raddb/mods-config/sql/ippool-dhcp/<DB>/schema.sql
14 #
15 # $Id: 10413ab139350ea4e20b3e660e2d45fba46b92b7 $
16
17 sqlippool dhcp_sqlippool {
18 # SQL instance to use (from mods-available/sql)
19 #
20 # If you have multiple sql instances, such as "sql sql1 {...}",
21 # use the *instance* name here: sql1.
22 sql_module_instance = "dhcp_sql"
23
24 # This is duplicative of info available in the SQL module, but
25 # we have to list it here as we do not yet support nested
26 # reference expansions.
27 dialect = "mysql"
28
29 # Name of the check item attribute to be used as a key in the SQL queries
30 #
31 # define &config:Pool-Name to select which pool will be used for IP address
32 # allocaton.
33 #
34 # If there is no &config:Pool-Name defined, the module will not allocate
35 # any IP addresses.
36 pool_name = "Pool-Name"
37
38 # SQL table to use for ippool range and lease info
39 ippool_table = "dhcpippool"
40
41 # The duration for which a lease is reserved whilst under offer
42 offer_duration = 10
43
44 # IP lease duration. (Leases expire even if no DHCP-Release packet is received)
45 # Either use the value to be sent to the client or a hard coded one.
46 lease_duration = "%{reply:DHCP-IP-Address-Lease-Time}"
47 #lease_duration = 7200
48
49 # The attribute in which the IP address is returned in the reply
50 attribute_name = "DHCP-Your-IP-Address"
51
52 # Assign the IP address, even if the above attribute already exists in
53 # the reply.
54 #
55 # allow_duplicates = no
56
57 # The attribute in which an IP address hint may be supplied
58 req_attribute_name = "DHCP-Requested-IP-Address"
59
60 #
61 # RFC 2132 allows the DHCP client to supply a unique
62 # identifier ("uid") using Option 61 (DHCP-Client-Identifier)
63 # in which case it must be used as the lookup key for
64 # configuration data.
65 #
66 pool_key = "%{%{DHCP-Client-Identifier}:-%{DHCP-Client-Hardware-Address}}"
67 #
68 # The "uid" is generated by the OS which means that clients
69 # whose BMC piggybacks on the main interface (sharing its MAC,
70 # but generating a distinct uid) and dual-booting clients can
71 # be allocated multiple IPs, consuming more pool entries. To
72 # avoid this you can ignore the RFCs and key the configuration
73 # data based only on the client MAC address.
74 #
75 # pool_key = "%{DHCP-Client-Hardware-Address}"
76
77 ################################################################
78 #
79 # WARNING: MySQL (MyISAM) has certain limitations that means it can
80 # hand out the same IP address to 2 different users.
81 #
82 # We suggest using an SQL DB with proper transaction
83 # support, such as PostgreSQL, or using MySQL
84 # with InnoDB.
85 #
86 ################################################################
87
88 # These messages are added to the "control" items, as
89 # Module-Success-Message. They are not logged anywhere else,
90 # unlike previous versions. If you want to have them logged
91 # to a file, see the "linelog" module, and create an entry
92 # which writes Module-Success-Message message.
93 #
94 messages {
95 exists = "DHCP: Existing IP: %{reply:${..attribute_name}} (cid %{DHCP-Client-Identifier} chaddr %{DHCP-Client-Hardware-Address} giaddr %{DHCP-Gateway-IP-Address})"
96
97 success = "DHCP: Allocated IP: %{reply:${..attribute_name}} from %{control:${..pool_name}} (cid %{DHCP-Client-Identifier} chaddr %{DHCP-Client-Hardware-Address} giaddr %{DHCP-Gateway-IP-Address})"
98
99 clear = "DHCP: Released IP %{DHCP-Client-IP-Address} (cid %{DHCP-Client-Identifier} chaddr %{DHCP-Client-Hardware-Address} giaddr %{DHCP-Gateway-IP-Address})"
•100
101 failed = "DHCP: IP Allocation FAILED from %{control:${..pool_name}} (cid %{DHCP-Client-Identifier} chaddr %{DHCP-Client-Hardware-Address} giaddr %{DHCP-Gateway-IP-Address})"
102
103 nopool = "DHCP: No ${..pool_name} defined (cid %{DHCP-Client-Identifier} chaddr %{DHCP-Client-Hardware-Address} giaddr %{DHCP-Gateway-IP-Address})"
104 }
105
106 # This line is commented by default to enable clean startup when you
107 # don't have freeradius-mysql installed. Uncomment this line if you
108 # use this module.
109 #$INCLUDE ${modconfdir}/sql/ippool-dhcp/${dialect}/queries.conf
110 }