1RLM_SQLIPPOOL_TOOL(8)       System Manager's Manual      RLM_SQLIPPOOL_TOOL(8)
2
3
4

NAME

6       rlm_sqlippool_tool - manage SQL IP pools
7

SYNOPSIS

9       rlm_sqlippool_tool  -p  pool_name  -s  range_start  -e range_end -t ta‐
10       ble_name  -d  -f  raddb_dir  -i  instance  [-c  capacity]  [-x   exist‐
11       ing_ips_file]
12
13       rlm_sqlippool_tool -y pool_defs_yaml_file -t table_name -d -f raddb_dir
14       -i instance [-x existing_ips_file]
15
16

DESCRIPTION

18       rlm_sqlippool_tool is a tool to manage IP address in SQL  IP  pools  as
19       used  by FreeRADIUS.  It will either output SQL that can be used to ma‐
20       nipulate the database or will interact directly with a database to pop‐
21       ulate an IP pool table.
22
23       The  format  of the SQL output or the commands operated on the database
24       are based on the default FreeRADIUS ippool schemas.  The  fields  popu‐
25       lated  are pool_name and framedipaddress.  All other fields are left to
26       be populated with their database defaults.
27
28

OPTIONS

30       -c capacity
31              Number of IP addreses to populate the pool  with.   Defaults  to
32              65536, or the maximum number that can be provisioned between the
33              start and end of the range.
34
35       -d dialect
36              SQL dialect to use in producing the output.
37
38       -e range_end
39              End IP address in the pool range.  Either IPv4 or IPv6 addresses
40              are allowed.
41
42       -f raddb_dir
43              Directory  containing the FreeRADIUS configuration.  If this op‐
44              tion is specified, then rlm_sqlippool_tool will parse  the  con‐
45              figuration  and  attempt to talk directly to the database server
46              specified in the FreeRADIUS configuration.
47
48       -i instance
49              Used in conjuction with -f.  Specifies the name of the sql  mod‐
50              ule instance to parse in the FreeRADIUS configuration.  Defaults
51              to sql.
52
53       -p pool_name
54              The pool name to populate.
55
56       -s range_start
57              Start IP address in the pool range.  Either  IPv4  or  IPv6  ad‐
58              dresses are allowed.
59
60       -t table_name
61              Name of the table in the database to populate.
62
63       -x existing_ips_file
64              A  file  containing  exsiting  IP addresses in the pool.  Use of
65              this allows for more controlled growth of a  sparesly  populated
66              pool.
67
68       -y pool_defs_yaml_file
69              A  YAML formatted file containing specifications for a number of
70              pools.
71
72

EXAMPLES

74       To produce MySQL formatted SQL for a pool named  local  populated  with
75       addresses from 10.0.0.1 to 10.0.0.199:
76
77              $ rlm_sqlippool_tool -p local -s 10.0.0.1 -e 10.0.0.199 \
78                  -t dhcpippool -d mysql
79
80       To  do the same but directly interacting with the SQL module configured
81       in the FreeRADIUS configuration under /etc/raddb:
82
83              $ rlm_sqlippool_tool -p local -s 10.0.0.1 -e 10.0.0.199 \
84                  -t dhcpippool -f /etc/raddb
85
86       To use a YAML file to specify the pool ranges  to  be  populated,  out‐
87       putting PostgreSQL formatted SQL:
88
89              $ rlm_sqlippool_tool -y pools.yaml -t dhcpippool -d postgresql
90

YAML FORMAT

92       A YAML file to populate multiple pools should be formatted like this:
93
94              pool_with_a_single_contiguous_range:
95                - start:    192.0.2.3
96                  end:      192.0.2.250
97
98              pool_with_a_single_sparse_range:
99                - start:    10.10.10.0
100                  end:      10.10.20.255
101                  capacity: 200
102
103              pool_with_multiple_ranges:
104                - start:    10.10.10.1
105                  end:      10.10.10.253
106                - start:    10.10.100.0
107                  end:      10.10.199.255
108                  capacity: 1000
109
110              v6_pool_with_contiguous_range:
111                - start:    '2001:db8:1:2:3:4:5:10'
112                  end:      '2001:db8:1:2:3:4:5:7f'
113
114              v6_pool_with_sparse_range:
115                - start:    '2001:db8:1:2::'
116                  end:      '2001:db8:1:2:ffff:ffff:ffff:ffff'
117                  capacity: 200
118

PREREQUISITES

120       To output formatted SQL, the Perl Template::Toolkit module is required.
121
122       Direct connection to databases is done using Perl DBI.  The appropriate
123       Perl DBD driver needs to be installed to enable this functionality.
124
125

SEE ALSO

127       radiusd.conf(5), raddb/mods-available/sql
128

AUTHORS

130       Nick Porter <nick@portercomputing.co.uk>
131
132
133
134                                                         RLM_SQLIPPOOL_TOOL(8)
Impressum