Re: Understanding DHCP server client conversation



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@xxxxxxxxxxxxxxxx
Dear 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


.



Relevant Pages

  • RE: cannot network client to 2003 server
    ... >client, whenever I try to release and renew ip ... If you are getting a private IP then you will only get that from an DHCP Server set to hand out ... Is the client that is requesting the addresses in the same broadcast domain as the DHCP Server? ... Are thee any other clients on this network that are failing to get the address? ...
    (microsoft.public.windows.server.networking)
  • Re: Domain authentication problem
    ... configuration of Dynamic DNS, hence updates now enabled. ... So that these could be duplicated on both DHCP servers I allocated IP ... restarting DHCP server restores this as default after I ... If DHCP registers the client, DHCP owns the record and will change the ...
    (microsoft.public.windows.server.networking)
  • Re: BSI-Grundschutz
    ... Absicherungen empfehlen? ... Den AP DHCP machen zu lassen ist ja auch eine Dumme Idee. ... dedizierter DHCP Server, den man anders als die meisten APs ordentlich ... nur mit dem echten Client zu reden. ...
    (de.comp.security.misc)
  • [UNIX] Stack-Based Buffer Overflow Vulnerability in OpenBSDs DHCP Server
    ... Get your security news from a reliable source. ... OpenBSD's DHCP server, dhcpd, implements the Dynamic Host Configuration ... effectively implement egress and ingress filtering based on live client IP ...
    (Securiteam)
  • Understanding the DHCP Server Client conversation (very intresting subject)
    ... Through my researches and my studies I tried to understand the DHCP Server client conversation in Windows Server 2003 environment and I'm little bit lost here. ... DHCPsrvr Broadcast DHCPsrvr 255.255.255.255 DHCP Offer ... That the MAC address is in the second layer in the OSI model while the IP address is in the third 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. ...
    (microsoft.public.cert.exam.mcse)