Hello. I have many servers in the field running Debian. These boxes
serve public IP addresses via DHCP to users who roam on and off the
network at different times. The problem I am having is that when the
server at any given location runs out of public IP addresses, new
users are prevented from getting online.
When I am made aware that a server has encountered this problem, I
have a tendency to set up a shared-network including the original
public block, plus an RFC1918 block (192.168.0.0/24) to allow new
guests to overflow onto the private space and be masqueraded through a
virtual LAN interface. My configuration in dhcpd.conf looks like
this:
[snip]
shared-network overflow {
subnet a.b.c.d netmask 255.255.255.128 {
range a.b.c.d w.x.y.z;
max-lease-time 2400;
default-lease-time 2400;
option routers a.b.c.d;
option netbios-name-servers a.b.c.d;
option domain-name-servers a.b.c.d;
option subnet-mask 255.255.255.128;
option broadcast-address a.b.c.d;
}
subnet 192.168.0.0 netmask 255.255.255.0 {
max-lease-time 2400
default-lease-time 2400;
option routers 192.168.0.1;
option netbios-name-servers 192.168.0.1;
option domain-name-servers 192.168.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
}
}
[/snip]
What I would like to happen is for the RFC1918 block to only be handed
out to clients when all leases in the public /25 are in use. However,
I am finding that DHCPd would rather cycle through both pools
completely before assigning a client an IP from the public pool, even
if the lease on that IP has already expired. Another way to say this
would be to say I want to "weight" or "metric" the public pool so that
it is completely actively used before moving onto the private space.
Here is a working example. User John signs onto the network and pulls
the first public ip in the /25. Then, the rest of the /25 fills up.
Now, user Jane attemps to pull a DHCP lease, and pulls the first
usable in the private /24. Next, John leaves the network and his
lease expires. Then, user Gary gets on the network, and I would like
him to pull John's IP since the lease is expired, but instead, Gary
gets the second usable in the private /24.
When I do dpkg --list | grep -i dhcp, this is the package revision
listed as being on my servers: dhcp 2.0pl5-11. Experienced help is
much appreciated. Please let me know if further information is
required. |