Multiple DHCP One Network

Chinmaya S. Narayana Reddy chinmayareddy at gmail.com
Thu Mar 23 00:15:46 UTC 2006


Simon, thanks for the replay, I have provided more info
On 3/22/06, Simon Hobson <dhcp at thehobsons.co.uk> wrote:
> 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.
I forgot to mention, I have another relay-agent which forwards certain
clients
requests to dhcp2.

>
> 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.
>
Yes My DHCPs are in different net 10.2.0.0/24
>
> 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".
>

Right dhcp1 and dhcp2 are configured only for known-clients
I use deny unknown-clients under each pool declaration

> 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.")
>

I am little configured here, what is the difference between "ignore
unknown-clients"
and "deny unknown-clients"?

I am still wondering why did dhcp2 picked packet when it was sent to dhcp1?
For the whole dhcp-cycle of the client, dhcp2 should not be in the picture,
is it because both dhcp1 and dhcp2 was configured as authoritative?

> 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).
>

This is CM/CMTS network. My CM is the dhcp-client, CMTS is relay-agent.

When CM sends a DHCP discover, CMTS is configured to forward to only to one
dhcp.
I have 2 CMTSs, cmts1 pointing to dhcp1 and cmts2 pointing to dhcp2.

I have cm1, cm2, cm3, cm4 as clients. dhcp1 has host declration of cm1, cm2
and
dhcp2 has host declaration for cm3 and cm4.
cmts1 connects with with cm1, cm2
cmts2 connects with with cm3, cm4.

Now in this case, I have only cm1, cmts1, dhcp1 in the picture. Other CMs
are down,
but cmts2 and dhcp2 are up and running but they have no work to do.

I boot my cm1, its sends DHCP-DISCOVER, cmts1 relays it dhcp1.
dhcp1 responds with offer, cm1 sends DHCP-REQUEST, cmts1 forwards ito dhcp1.
dhcp1 sends ACK, and my "dhcp2" sends NACK.


---- dhcp1 config ---
authoritative;
options ...

# local subnet
subnet 10.2.0.0 netmask 255.255.255.0 { }

# client subnet
subnet 10.1.0.0 netmask 255.255.255.0 {
      option routers 10.1.0.1;
      pool {
            range 10.1.0.2 10.1.0.50;
            deny unknown-clients;
      }
}

# host declarations
host cm1 {
    hardware ethernet ...;
    hostname abcd;
    option ...
}
host cm2 {
    hardware ethernet ...;
    hostname xyz;
    option ...
}

}

---- dhcp2 config ---
authoritative;
ddns configuration ...
options ...

subnet 10.2.0.0 netmask 255.255.255.0 { }

subnet 10.1.0.0 netmask 255.255.255.0 {
      option routers 10.1.0.1;
      pool {
             range 10.1.0.51 10.1.0.200;
             deny unknown-clients;
      }
}

host cm3 {
    hardware ethernet ...;
    hostname ijkl;
    option ...
}
host cm4 {
    hardware ethernet ...;
    hostname mnop;
    option ...
}

}


> Simon
>
>


--
thanks
chinmaya swaroop



More information about the dhcp-users mailing list