swanctl --list-pools
Description
This swanctl
subcommand lists all configured IPv4
and/or IPv6 address pools and the actual state of the leases
Options
--leases (-l) list leases of each pool --name (-n) filter pools by name --raw (-r) dump raw response message --pretty (-P) dump raw response message in pretty print --debug (-v) set debug level, default: 1 --options (-+) read command line options from file --uri (-u) service URI to connect to --help (-h) show usage information
Examples
-
List all configured pools
$ swanctl --list-pools pool_v4 10.3.0.0 1 / 0 / 14 pool_v6 fec3:: 1 / 0 / 254
-
List the leases of all configured pools
$ swanctl --list-pools --leases pool_v4 10.3.0.0 1 / 0 / 14 10.3.0.1 online 'carol@strongswan.org' pool_v6 fec3:: 1 / 0 / 254 fec3::1 online 'carol@strongswan.org
-
List the leases of
pool_v4
in pretty format
$ swanctl --list-pools --leases --name pool_v4 --pretty get-pools reply { pool_v4 { base = 10.3.0.0 size = 14 online = 1 offline = 0 leases { 0 { address = 10.3.0.1 identity = carol@strongswan.org status = online } } } }