Which server's IP address is selected if the client receives the Offer from 2 DHCP servers (on different subnet) at a time?

I searched Google and the answer I got is: which Offer comes first will be selected by the client.

But my doubt is: what if the Offers from the 2 DHCP servers arrive at same time?

If you have two network cards in your PC, then both will have different network settings and get different IPs from different DHCP servers.

On each network card all packets will arrive serialized. The OS will not see two packets at the same time, the packets will be in an order.

So the problem you describe will not arise.

As you wrote in a comment a client does not need to accept the first DHCP answer, the client is free to wait for multiple answers and select one configuration (RFC 2131, section 3.1.3). What could be criteria to select one configuration? Section 4.4.1 gives two: "e.g., the first DHCPOFFER message or the DHCPOFFER message from the previously used server". Other criteria might be based on the DHCP options (RFC 1533). A client might prefer an answer with Router Option, Time Server Option, Name Server Option, Domain Name Server Option or LPR Server Option over an answer without these options. It might also prefer offers with a special Domain Name or depending on the IP address/network offered.

I do not know a good reason to have multiple DHCP servers in a network despite for redundancy. And for this both DHCP servers should be configured identically except for a different range of IPs (in the same subnet) they offer.

  • But the RFC is saying , it is based on configuration parameters . I just want to know those configuration parameters. – user3017432 Dec 4 '13 at 5:55
  • If you tell me which section/sentence of RFC2131 you refer to (comment or edit to question), I might clarify that. – Werner Henze Dec 4 '13 at 8:09
  • The client receives one or more DHCPOFFER messages from one or more servers. The client may choose to wait for multiple responses. The client chooses one server from which to request configuration. parameters, based on the configuration parameters offered in the DHCPOFFER messages. (ietf.org/rfc/rfc2131.txt ; 15 page) – user3017432 Dec 5 '13 at 4:55
  • @user3017432 I updated the answer. – Werner Henze Dec 5 '13 at 14:14

DHCP Client can be configured to request and require certain parameters (dhcp-options) from DHCP Server. Refer link. these parameters are specified in dhcpclient.conf

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.