One DHCP Server, Multiple routed subnets, roaming clients

James Jalbert jjalbert at
Wed Oct 28 10:39:15 UTC 2009

This is exactly what I want. So if I understand right, I need to setup a pool, and define a range in that pool, not just define the range in the subnet deceleration? I have tried with ranges set up, but not pools, I will see what that does. Does it matter were the host deceleration is? I have all my hosts in a database, that exports to the ip.hosts file, and is loaded at the beginning of my dhcpd.conf file. Should that be fine?

James Jalbert
Network Administrator
Caribou School Department
Phone: 207-493-4246
E-Mail: jjalbert at

>>> Sten Carlsen <stenc at> 10/27/2009 8:28 PM >>>

Do you need two host statements? I seem to remember that:
1 - if a host has a host statement it is "known".
2 - if the host statement has a fixed address that matches the subnet it
is in, it will get that address.
3 - if the host statement does not have any address in the subnet, it
will get one from the pool.

So if I am right, one host statement with the addresses you want fixed
and no addresses for the subnets you want it to have a dynamic address
and "allow known hosts" in all pools.
That should do what you want, fixed addresses in some subnets and
dynamic in the rest and no other hosts can get an address.

If you want to allow others to get an address, leave out the "allow
known hosts".

Glenn Satchell wrote:
> Hi James
> Just to recap, you want fixed-address in some subnets, and dynamic in
> others for the same host? You need two host declarations, one with a
> comma separated list of fixed-address and a second host declatation
> with *no* fixed-address statement. The name of the host declration
> needs to beunique, so something like this:
> # RoamingSystem1
> host RoamingSystem1 {
> 	hardware ethernet 00:25:4B:9B:28:F1;
> 	fixed-address 
> 	ddns-hostname "RoamingSystem1";
> 	option host-name "RoamingSystem1";
> }
> # RoamingSystem1
> host RoamingSystem1-dynmic {
> 	hardware ethernet 00:25:4B:9B:28:F1;
> 	ddns-hostname "RoamingSystem1";
> 	option host-name "RoamingSystem1";
> }
> dhcpd will only offer one of the fixed addresses if it is valid for the
> subnet where hte DHCPDISCOVER came from. otherwiseit will use a dynamic
> address. In both cases the client is "known" due to the existance of
> the host statement.
> Remember that dhcp doesn't enforce security, someone could still walk
> in off the street and rather than using dhcp they could manually set
> the IP address and router and connect.
> regards,
> -glenn
>> Date: Tue, 27 Oct 2009 18:59:52 +0000
>> To: Users of ISC DHCP <dhcp-users at>
>> From: Simon Hobson <dhcp1 at>
>> Subject: Re: One DHCP Server, Multiple routed subnets, roaming clients
>> X-BeenThere: dhcp-users at 
>> James Jalbert wrote:
>>> I have a DHCP server in my main building. This building also 
>>> connects to 6 other building through a WAN. I have one DHCP Server 
>>> (Ubuntu server9.04, DHCP 3.1) with multiple subnet decelerations, 
>>> and one large host file, added with an include. Everything works 
>>> great. I have machines that roam between buildings, and as long as I 
>>> use comma separated fixed address, everything works great.
>>> Now I would like to be able to set up the server so that, if a 
>>> machine has a deceleration with a fixed address, but is requesting 
>>> an ip form another building, it would be assigned a dynamic address, 
>>> however if there is no Host deceleration(an unknown client) it will 
>>> not be assigned any address.
>> Try this :
>>   pool {
>>     range .... ;
>>     allow known clients;
>>   }
>> If a client doesn't have a host declaration then it is not known, and 
>> will be denied a lease. If it does have a host declaration then it is 
>> known, and will get a dynamic address (unless it has a fixed address 
>> valid in the subnet).
>> -- 
>> Simon Hobson
>> Visit for books by acclaimed
>> author Gladys Hobson. Novels - poetry - short stories - ideal as
>> Christmas stocking fillers. Some available as e-books.
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at 
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at 

Best regards

Sten Carlsen

No improvements come from shouting:


dhcp-users mailing list
dhcp-users at

More information about the dhcp-users mailing list