How does DHCP work?

  • Thread starter Thread starter sampo_rasanen
  • Start date Start date
S

sampo_rasanen

How does the computer choose the IP-address if there is multiple DHCP-
servers on the network? Is it best lease-time or what?
 
How does the computer choose the IP-address if there is multiple DHCP-
servers on the network? Is it best lease-time or what?

When you connect your computer to the network the computer sends out a
question to all the other computers on the network asking for an IP number.
The DHCP server on the network sends a reply saying something like " Ok, i
can give you an IP address" and so then your computer sends a request to that
server that answered the question first, to be given an IP address.

So if there are more than one DHCP server running on the network then often
your computer will get an IP number from the server that answers the question
fastest.

Hope this answers your question.
 
Paul said:
When you connect your computer to the network the computer sends out a
question to all the other computers on the network asking for an IP number.
The DHCP server on the network sends a reply saying something like " Ok, i
can give you an IP address" and so then your computer sends a request to that
server that answered the question first, to be given an IP address.

So if there are more than one DHCP server running on the network then often
your computer will get an IP number from the server that answers the question
fastest.

Hope this answers your question.


And... if you are using a router, it pretends to be a primitive DHCP server and does very well. Logging in to your
router allows you to configure settings.

pop
 
Is it always the "fastest" server who gives the IP?
I thought that the PC choose from the the addresses (for example by
the best lease time), and then tell the other servers that "I already
made the decision and I got an IP now".
Am I wrong?
 
It's a bit of a mystery as to which lease the client accepts. Sometimes
it will accept less favorable lease even when better ones are available.

John
 
How does the computer choose the IP-address if there is multiple DHCP-
servers on the network? Is it best lease-time or what?

Ask in a networking group. This really doesn't have anything to do
with WinXP.
 
(e-mail address removed) wrote in
Is it always the "fastest" server who gives the IP?
I thought that the PC choose from the the addresses (for example
by the best lease time), and then tell the other servers that "I
already made the decision and I got an IP now".
Am I wrong?

According to the Standard (RFC 2131):
3. 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. The client broadcasts a DHCPREQUEST message[..]

The key phrase is ... client *may* choose to wait...
The reality is usually that the first one offered is accepted.

<http://www.faqs.org/rfcs/rfc2131.html>

HTH,
John
 
Back
Top