[Kea-users] CIDR or range notation in relay lists when using shared-networks?

Simon dhcp1 at thehobsons.co.uk
Wed Feb 22 14:32:07 UTC 2023


Darren Ankney <darren.ankney at gmail.com> wrote:

> In addition to what Peter said, another option would be to use shared
> networks and add the subnet for relays along with the subnet of
> addresses that you wish to allocate to the clients to a shared
> network.  See: https://kea.readthedocs.io/en/kea-2.2.0/arm/dhcp4-srv.html#shared-networks-in-dhcpv4
> 
> Example:
> 
> {
> "Dhcp4": {
>    "shared-networks": [
>        {
>           "subnet4": [
>                {
>                    // relays
>                    "subnet": "10.1.0.0/21"
>                },
>                {
>                    // client subnet
>                    "subnet": "192.0.2.0/24",
>                    "pools": [ { "pool":  "192.0.2.100 - 192.0.2.199" } ]
>                }
>            ]
>        }
>     ]
>  }
> }

That won’t work in the sort of situation I think the OP is referring to - but I admit it’s not completely clear.
You can only associate the relays subnet with one client subnet. So once you introduce more than one client subnet, it breaks.


PM Klaus Steden <klausfiend at gmail.com> wrote:

>> In some of our environments, we deal with DHCP relays, and their addresses seem to proliferate faster than we can update our configs, which leads to delays with DHCP service.
>> 
>> However, they have reserved an entire /21 for relay IPs, and ideally, I would like to be able to add that entire network as a relay instead of what I'm currently doing, which is adding individual IPs when I notice them reported in the log.

Can you clarify exactly what’s going on here ?
Is it that there is a client network with “many” relays on it; or many client networks with one or two relays on each, but the relay addresses are not part of the client subnet ?

If it’s the latter, then this is a “very poor” network config and not compliant with how things are supposed to work.

Some more clarity of the network topology and config would enable a better answer.

Simon



More information about the Kea-users mailing list