Re: Understanding DHCP server client conversation
- From: "XeDigital" <weamfox@xxxxxxxxxxx>
- Date: Sun, 2 Mar 2008 09:06:44 +0200
Thankx John,
I understand all what you said
But why the DHCP server (BROADCAST) the DHCPOFFER and the DHCPACK???
why not the DHCP server just sends its offer to the client that is requesting the service according to its MAC address????
---------------------------------------------
"John R" <jsr^^^813@zoom^^^internet.net> wrote in message news:emNmD2#eIHA.4056@xxxxxxxxxxxxxxxxxxxxxxx
See comments in line..
"XeDigital" <weamfox@xxxxxxxxxxx> wrote in message news:26449890-937B-443F-9A05-8AEFAA966107@xxxxxxxxxxxxxxxxDear Friends,
..snip..
Now, my questions are :-
1) I understand that the Client is sending a broadcast message because it
doesn't know any concrete DHCP server in order to request an IP address, but
why the DHCP sends also a broadcast message to the client (*) (**)?
Because the client does not yet have a TCP/IP address assigned to it and can only receive broadcast traffic.
2) Let's agree that the DHCP server is broadcasting its offer, what happen
if there is more than one client (lets say 50 or more) is getting same IP
address that's suppose to be offered to a concrete client at the same time?
Doesn't this make a high traffic in the network making all the clients go
back and forth with the DHCPNACK, DHCPDECLINE and the DHCPACK?????
NOTE: I understand that the client sends an ARP request with the offered
IP address if it gets a reply that means that this IP address is in use and
the client sends DHCPDECLINE, this is from the CLIENT side but what about
the server side and the whole network?? :-s
The DHCP packet contains the hardware (MAC) address of the client. This prevents other requesting clients from assuming someone else's offer.
3) Why don't the DHCP server cuts the crap and use the client MAC address to
send the DHCPOFFER and the DHCPACK instate of broadcasting to all clients?
PLEASE NOTE : That the MAC address is in the second layer (Data Link layer)
in the OSI model while the IP address is in the third layer (Network layer)
which make it more reasonable for the DHCP server to use the the MAC address
of the client that is requesting the service to send him the IP address
instate of BROADCASTING the DHCPOFFER and the DHCPACK and making high
traffic.
You have to remember that the client cannot assume the IP address in the offer until it receives the DHCP ACK. Further, the client may have accepted an offer from another DHCP server on the lan. When a server sees a client issue a DHCP Request packet to a different DHCP server, it automatically assumes that the offer it made is not accepted. Since all of this traffic is broadcast based, all DHCP servers (and relay agents) on the lan know what is going on. See RARP for a configuration protocol based on ARP.
Once the client does assume the IP address, maintenance of the lease is the clients responsibility. Typically, after receiving a DHCP offer, the client will issue an ARP request to see if another node responds. If so, the client will assume the address is in use and will issue a DHCP decline, and then another DHCP discover to start all over.
So, in general...
1. Client issues DHCP discover
2. Server responds with DHCP offer
3. Client officially asks for IP from the offer
4. Server responds with DHCP ACK and updates it's lease table
At this point, and this point only, can the client begin to use the IP address. Up to this point, the traffic must be broadcast based so that the client can see it, and other DHCP servers on the LAN (or remotely through DHCP relay agents) can see it. Lease times of as little as 15 minutes can prevent a lan with thousands of clients from becomming overburdened with DHCP traffic.
For a better understanding, google or find a diagram of a DHCP packet. You'll see it includes fields for the client IP, Your IP (which is used separately from client IP, Server IP, router IP, client MAC, server host name, boot file name, and in some cases, vendor specific info.
John R
- Follow-Ups:
- Re: Understanding DHCP server client conversation
- From: John R
- Re: Understanding DHCP server client conversation
- References:
- Understanding DHCP server client conversation
- From: XeDigital
- Re: Understanding DHCP server client conversation
- From: John R
- Understanding DHCP server client conversation
- Prev by Date: Re: Understanding DHCP server client conversation
- Next by Date: Re: Understanding DHCP server client conversation
- Previous by thread: Re: Understanding DHCP server client conversation
- Next by thread: Re: Understanding DHCP server client conversation
- Index(es):
Relevant Pages
|