DHCP for multiple networks with static and dynamic assignments

Wojciech 'Wheart' Penar wheart at lab103.ict.pwr.wroc.pl
Fri Mar 2 16:31:40 UTC 2007


On Sat, 3 Mar 2007, Glenn Satchell wrote:

>
>> Date: Fri, 2 Mar 2007 14:00:56 +0100 (CET)
>> From: "Wojciech 'Wheart' Penar" <wheart at lab103.ict.pwr.wroc.pl>
>> To: dhcp-users at isc.org
>> Subject: DHCP for multiple networks with static and dynamic assignments
>>
>> Hallo.
>> I'm operating network splitted into few physical networks (sometimes
>> containing several logical subnets). There are two DHCP servers working
>> in fail-over configuration.
>>
>> Log looks like:
>> ---begin---
>> Mar  2 13:56:52 server dhcpd: DHCPDISCOVER from 00:16:36:70:f2:34 via
>> x.y.z.254: network net_big: no free leases
>> --end---
>>
>> I'm using ISC DHCPD versions 3.0.1 and 3.0.4 (both linux).
>>
>
> You definitely need to use the same version on both hosts in a failover
> pair. There are many bug fixes between the two version listed above and
> reliable operation cannot be guaranteed. I would suggest the 3.0.1 is
> upgraded to 3.0.4 to match the other host.
>

Failover works fine for about eight months, so different versions are not 
problem in this case.

During my struggle with dhcp I tried to disble failover and run with
only one server but it doesn't change anything - neighter 3.0.1 nor 3.0.4 
won't work if computer with static lease in one network try to obtain
dynamic one in another network. Disabling static lease made things 
better, but static lease in "home" network is very important...

> Generally what you want to do should "just work". Make sure the host
> definitions are in the global scope, that is outside any subnet or
> shared_network declaration.
>

I tried this both with "oryginal" config files (that came from old sun 
machine, that died last summer) - they claim to be "3.0.X" version, and 
rewriten as mentioned in manuals.

> Also with your log, it is hard to diagnose what the error message might
> be without knowing what x.y.z and x.x.x might be. It would be much
> easier to diagnose with real IP addresses in there. If you must
> disguise your addresses, then replace the first number with, say, 10.

I think it's enaugh information to tell, if config structure is OK.
Log information with IP address next to "via" means, that DHCPDISCOVER 
came from dhcp-relay. In case of request from network local to the dhcp 
server you have interface name (eth0 in my case) after "via".
The interesting thing is that shared network is recognized correctly
(computer was physically connected to net_big, and it has another "home" 
network with static lease).

>
> One other thing - make sure all the shared_network statements only
> contain subnets that share the same physical networks. Shared netwrok
> means the server can assign an address from any subnet within the
> shared network.
>

I'm rather sure - nearly 500 computers uses dhcp to determine their IPs -
if something was wrong, I'd rather konw. The only problem is that, when
computer has static lease in some network, won't get dynamic lease in all
other networks. If I add same host (MAC address) to several networks - it
will get proper address for network it is connectet, together with
gateway, DNS etc, but it's impossible to reserve addresses for every 
user-network combination that may occure.

Regards,
Wojciech Penar

-- 
         Wojciech 'Wheart' Penar



More information about the dhcp-users mailing list