RLM_SQLIPPOOL_TOOL(8)
๐ RLM_SQLIPPOOL_TOOL ๐
okay bestie, so this is the manual page for rlm_sqlippool_tool, straight out of the System Manager's Manual โ and yes, it's the whole page, i'm not skipping a single crumb ๐
โจ NAME โจ
rlm_sqlippool_tool โ the girl whose entire job is managing SQL IP pools. periodt.
๐ฆ SYNOPSIS ๐ฆ
Two whole moods, pick your fighter:
rlm_sqlippool_tool -p pool_name -s range_start -e range_end -t
table_name -d -f raddb_dir -i instance [-c capacity] [-x
existing_ips_file]
rlm_sqlippool_tool -y pool_defs_yaml_file -t table_name -d -f raddb_dir
-i instance [-x existing_ips_file]
๐ธ DESCRIPTION ๐ธ
So rlm_sqlippool_tool is literally the tool that manages IP addresses in the SQL IP pools that FreeRADIUS uses. iconic behavior only ๐
It's giving two options, and honestly both slay:
- it will output SQL that you can use to manipulate the database, or
- it will interact directly with a database to populate an IP pool table.
The format of the SQL output โ and the commands it runs on the database โ are all based on the default FreeRADIUS ippool schemas. The fields it populates are pool_name and framedipaddress. Every other field? Left completely alone to be populated with their database defaults ๐ (she minds her own business, as she should).
๐ OPTIONS ๐
-ccapacity โ number of IP addresses to populate the pool with. Defaults to65536, or the maximum number that can be provisioned between the start and end of the range. no cap, unless the range says otherwise ๐-ddialect โ the SQL dialect to use in producing the output.-erange_end โ end IP address in the pool range. Either IPv4 or IPv6 addresses are allowed. we love a flexible queen ๐-fraddb_dir โ directory containing the FreeRADIUS configuration. If this option is specified, thenrlm_sqlippool_toolwill parse the configuration and attempt to talk directly to the database server specified in the FreeRADIUS configuration. so brave of her fr fr ๐ฅ-iinstance โ used in conjunction with-f. Specifies the name of thesqlmodule instance to parse in the FreeRADIUS configuration. Defaults tosql.-ppool_name โ the pool name to populate. main character energy ๐-srange_start โ start IP address in the pool range. Either IPv4 or IPv6 addresses are allowed.-ttable_name โ name of the table in the database to populate.-xexisting_ips_file โ a file containing existing IP addresses in the pool. Using this allows for more controlled growth of a sparsely populated pool. ngl that's kind of a vibe check for your pool ๐ฑ-ypool_defs_yaml_file โ a YAML formatted file containing specifications for a number of pools. multiple pools at once? she ate ๐
โญ EXAMPLES โญ
producing MySQL formatted SQL
To produce MySQL formatted SQL for a pool named local populated with addresses from 10.0.0.1 to 10.0.0.199:
$ rlm_sqlippool_tool -p local -s 10.0.0.1 -e 10.0.0.199 \
-t dhcpippool -d mysql
same thing, but talking straight to the database
To do the same but directly interacting with the SQL module configured in the FreeRADIUS configuration under /etc/raddb:
$ rlm_sqlippool_tool -p local -s 10.0.0.1 -e 10.0.0.199 \
-t dhcpippool -f /etc/raddb
YAML era
To use a YAML file to specify the pool ranges to be populated, outputting PostgreSQL formatted SQL:
$ rlm_sqlippool_tool -y pools.yaml -t dhcpippool -d postgresql
๐ง YAML FORMAT ๐ง
A YAML file to populate multiple pools should be formatted like this โ copy this exactly, bestie, it's not a drill ๐ญ:
pool_with_a_single_contiguous_range:
- start: 192.0.2.3
end: 192.0.2.250
pool_with_a_single_sparse_range:
- start: 10.10.10.0
end: 10.10.20.255
capacity: 200
pool_with_multiple_ranges:
- start: 10.10.10.1
end: 10.10.10.253
- start: 10.10.100.0
end: 10.10.199.255
capacity: 1000
v6_pool_with_contiguous_range:
- start: '2001:db8:1:2:3:4:5:10'
end: '2001:db8:1:2:3:4:5:7f'
v6_pool_with_sparse_range:
- start: '2001:db8:1:2::'
end: '2001:db8:1:2:ffff:ffff:ffff:ffff'
capacity: 200
โ ๏ธ heads up: those v6 ranges are in quotes for a reason โ keep them exactly like that ๐ซถ
๐ฎ PREREQUISITES ๐ฎ
- To output formatted SQL, the Perl
Template::Toolkitmodule is required. non-negotiable ๐ - Direct connection to databases is done using Perl
DBI. The appropriate PerlDBDdriver needs to be installed to enable this functionality. so like, install your driver before you come for her ๐
๐ SEE ALSO ๐
radiusd.conf(5)raddb/mods-available/sql
๐ AUTHORS ๐
Nick Porter <nick@portercomputing.co.uk> โ the legend responsible, we stan ๐ซถ
and that's the whole page, bestie โ no crumbs left behind โจ This was RLM_SQLIPPOOL_TOOL, part of the System Manager's Manual โ go forth and populate those pools, and may your pool_name and framedipaddress always be iconic ๐๐๐ฆ
๐ฆ where this page comes from
- alpine 3.22: freeradius-doc 3.0.27-r1 ยท GPL-2.0-or-later
- alpine 3.23: freeradius-doc 3.0.27-r2 ยท GPL-2.0-or-later
- alpine 3.24: freeradius-doc 3.0.27-r3 ยท GPL-2.0-or-later
- arch rolling: freeradius 3.2.10-4 ยท GPL-2.0-or-later
- centos-stream 10: freeradius 3.2.8-2.el10 ยท GPL-2.0-or-later AND LGPL-2.0-or-later
- centos-stream 9: freeradius-utils 3.0.27-4.el9 ยท GPLv2+ and LGPLv2+
- fedora 43: freeradius 3.2.7-6.fc43 ยท GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: freeradius 3.2.7-6.fc43 ยท GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: freeradius 3.2.8-2.fc43 ยท GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: freeradius 3.2.8-2.fc43 ยท GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: freeradius 3.2.8-3.fc44 ยท GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: freeradius 3.2.8-3.fc44 ยท GPL-2.0-or-later AND LGPL-2.0-or-later
- opensuse-leap 16.0: freeradius-server 3.2.5-160000.2.2 ยท GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: freeradius-server 3.2.5-160000.2.2 ยท GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: freeradius-server 3.2.5-160000.2.2 ยท GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: freeradius-server 3.2.5-160000.2.2 ยท GPL-2.0-only AND LGPL-2.1-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms