10

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.

1 Answer 1

10

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.

4
  • 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
    Commented Sep 24, 2014 at 1:20
  • That would be correct.
    – YLearn
    Commented Sep 24, 2014 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
    Commented Sep 25, 2014 at 9:05
  • @richardb, good point. I just didn't touch on that because the question was specifically asking about a unicast reply.
    – YLearn
    Commented Sep 25, 2014 at 11:24

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