request for advice / building dhcpd infraestructure
Simon Hobson
dhcp1 at thehobsons.co.uk
Wed Jun 24 20:55:50 UTC 2015
Leandro <ingrogger at gmail.com> wrote:
> My concern is that, if relay1 still using 1.1.0.1 for gi-addr ; dhcpd can pick a lease from pool4 instead using pool2 since 1.1.0.1 falls into the 1.1.0.0/22 declared on shared network.
That is because the config you have given is BROKEN and will not work.
As Bob has said, you do not define a large shared network.
You start off with a subnet declaration for subnet 1.1.0.0/24 and a subnet declaration for subnet 1.1.2.0/24 - *NO* shared network.
When (say) the 1.1.0.0 subnet starts getting full and you add the 1.1.1.0/24 subnet, you then declare a shared network *for that network only*. Ie :
shared-network public0 {
subnet 1.1.0.0 ...
subnet 1.1.1.0 ...
}
When the 1.1.2.0 subnet gets full, you can add the extra subnet and a second shared network :
shared-network public2 {
subnet 1.1.2.0 ...
subnet 1.1.3.0 ...
}
With this correct setup, you do not need to do anything at all - the DHCP server will take care of things automagically.
Of course, if the relevant IP range is still unused (as in this example) you do not need to add a second subnet and shared network, you can just change 1.1.0.0/24 to 1.1.0.0/23 and expand your range(s) - there really will be no performance issues to worry about.
More information about the dhcp-users
mailing list