Multiple DHCP One Network

Simon Hobson dhcp at thehobsons.co.uk
Wed Mar 22 08:34:00 UTC 2006


Chinmaya S. Narayana Reddy wrote:

>I have 2 DHCP servers running on my network, please don't ask me why :).
>
>Each DHCP is configured to serve only known-clients, but give away
>random IP address (basically STATIC-DHCP).
>
>The IPs do not overlap.
>my DHCP1 is configured for 10.1.0.2   to 10.1.0.50  IP range
>my DHCP2 is configured for 10.1.0.51 to 10.1.0.200 IP range
>
>DHCP1 serves X number of clients, DHCP2 serves Y number of clients.
>Clients configuration (host declaration) on the DHCP servers do not overlap.
>
>I have a DHCP-Client, trying to DHCP via a relay-agent (10.1.0.1), the
>relay agent is configured to unicast DHCP packets DHCP1 only.
>
>Client sends DHCP discover, DHCP1 sends DHCP-offer,
>Client sends DHCP REQUEST to DHCP1
>DHCP1 sends ACK, before client gets DHCP ACK, DHCP2 sends NACK to client.
>
>Now why did DHCP2 respond? Well I guess it did so because it had the
>subnet configured !! I removed the subnet definition from DHCP2, now I
>don't see NACK.
>
>Can anyone please tell me is DHCP2's behavior acceptable?

Yes, it would be depending on it's configuration.

You appear to have several problems here. The first is that you claim 
to have an unworkable setup :

>my DHCP1 is configured for 10.1.0.2   to 10.1.0.50  IP range
>my DHCP2 is configured for 10.1.0.51 to 10.1.0.200 IP range

>I have a DHCP-Client, trying to DHCP via a relay-agent (10.1.0.1), the
>relay agent is configured to unicast DHCP packets DHCP1 only.

If this really is how it's set up then your Y clients cannot get a 
lease because their requests cannot be sent to dhcp2. Your relay 
agent must forward requests to both servers for both sets of clients 
to be able to get leases.

This assumes that your dhcp servers are not in the 10.1.0.0 subnet, 
in which case you shouldn't have a relay agent there at all.


Now, to your detailed question ...

>"... before client gets DHCP ACK, DHCP2 sends NACK to client.
>
>Now why did DHCP2 respond?"

We're doing this blind since you've given no clue at all how you have 
configured your servers. I'm guessing that you've used something like 
"allow known-clients" somewhere or "deny unknown-clients".

In either case, this means that clients without a host declaration 
will be denied - which means they will be sent a NACK. There are two 
ways of fixing this :

use "ignore unknown-clients" which will silently ignore them (though 
man dhcpd.conf says "The use of this option is now deprecated.")

or, turn off authoritative, though that has side effects which you 
probably don't want.


Hopefully there's enough in here for you to fix your problem, if not, 
then you'll have to give us more information (like the config files 
for the dhcp servers and more information about your network 
topology).

Simon


More information about the dhcp-users mailing list