2

An arriving client sends a DHCP discover with source IP 0.0.0.0:68 and destination IP 255.255.255.255:67 and the server replies with an offer having its IP to destination 255.255.255.255:68, then the DHCP request and ack happen the same way.

What if 2 (or more) clients arrive to the network at the same time? How do they communicate? How do the server and the clients distinguish between the packets?

4

They differentiate with a MAC address identifying a unique NIC.

  • uuuuh right LOL wasn't that simple XD – Mina Michael Dec 25 '16 at 21:49
  • Lol no problem, Ron gave a full answer – helyousa Dec 25 '16 at 21:55
  • More precisely: IPv4 DHCP servers differentiate by the MAC address of the client. IPv6 DHCP servers differentiate by a unique identifier called the DUID provided by the client. If a DHCP relay is used then the relay can also provide information such as which switch port the client is connected to, a configured subscriber id etc. – Sander Steffann Dec 25 '16 at 22:46
5

The DHCP server knows the layer-2 (MAC) address of the requesting host because of the CHADDR (Client hardware address) field in the DHCPDISCOVER message. The DHCPOFFER message also contains a CHADDR field.

For DHCP requests to a DHCP server on a different LAN, a DHCP relay is used, and the DHCP server gets the DHCPDISCOVER message that includes DHCP Option 82 that tells the DHCP server to send the DHCPOFFER back to the DHCP relay. The DHCP relay stands in for the DHCP server on the host LAN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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