[Kea-users] Subnet Addresses via Kea API?
Tomek Mrugalski
tomasz at isc.org
Wed Jan 3 19:25:11 UTC 2018
W dniu 03.01.2018 o 20:16, Duane Wylie pisze:
> I'm attempting to put together a process that would report DHCP pool
> utilization. Per-subnet numbers are easy via the API:
>
>
> "command": "statistic-get-all"
>
>
> I get data in this format:
>
> ...
>
> "subnet[152].total-addresses": [ [ 13, "2017-12-27 10:38:52.086719"
> ] ] }
>
> ...
>
>
> But what I'm not finding is a way to derive the actual network
> information for the subnet (What is the network address? subnet mask?
> etc...)
Kea 1.3.0 now supports subnet4-list and subnet6-list commands. See
https://jenkins.isc.org/job/Kea_doc/guide/kea-guide.html#subnet-cmds
These commands are part of the subscription package.
> For my deployment, the intention is to manually number all subnets in my
> kea-dhcp4.conf file, but in a broader sense it is legitimate to not do
> so, and have Kea number them automatically on startup. In the automatic
> ID assignment scenario, how could I programmatically discover the
> ID-to-subnet assignments?
This is what the call returns:
{
"result": 0,
"text": "2 IPv4 subnets found",
"arguments": {
"subnets": [
{
"id": 10,
"subnet": "10.0.0.0/8"
},
{
"id": 100,
"subnet": "192.0.2.0/24"
}
]
}
Tomek
More information about the Kea-users
mailing list