9

In the DHCP discover packet, the source IP address field is 0.0.0.0 which means the client does not have an IP address yet. But, in the DHCP offer packet, an unicast address (which will be allocated for this client) is specified as destination address. Since the client does not have an IP address at this moment, how does the packet which has an unicast address reach the client correctly ? How the client identifies that this offer packet is destined for it ? My understanding is that, the client which has no IP can only be reachable with a broadcast IP. I cannot understand how it is reachable with an unicast IP.

8

This is because the DHCP server must reside or have a relay/proxy on the same L2 network as the client.

The DHCP OFFER is sent to the L2 address of the client (i.e. it's MAC address). If the request was relayed/proxied, then the DHCP OFFER goes to the relay/proxy which will then forward it to the correct L2 network.

Broadcast traffic can be problematic for networks, so this reduces the amount of broadcast network that is necessary.

  • 1
    Thanks for the answer.. So, the relay/proxy actually switches the packet using MAC address. If there isn't any relay/proxy, then the server should reside in the same L2 network. Am I right ?? – Ezio Sep 24 '14 at 1:20
  • That would be correct. – YLearn Sep 24 '14 at 1:31
  • 1
    There is a 'broadcast' bit in the BOOTP/DHCP header that indicates a client is unwilling to accept packets sent to the L2 address until an IP address is configured. In this case the DHCP offer will be broadcast. – richardb Sep 25 '14 at 9:05
  • @richardb, good point. I just didn't touch on that because the question was specifically asking about a unicast reply. – YLearn Sep 25 '14 at 11:24

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.