DHCP Discover : why don't other hosts reply with ICMP 'port unreachable'

When a host sends a DHCP Discover (port 67, UDP), why don't all the hosts (except the DHCP server) reply with an ICMP 'port unreachable' message. This would cause a huge amount of useless data going through the network.


Solution 1:

This would cause a huge amount of useless data going through the network.

Well, that's exactly why they don't reply.

This is stated as an explicit requirement in RFC 1122 ("Re­quire­ments for Internet Hosts -- Com­mu­ni­ca­tion Layers"), section 3.2.2, and the commentary specifically points out UDP broadcasts as the reason:

An ICMP error message MUST NOT be sent as the result of receiving:

  • an ICMP error message, or
  • a datagram destined to an IP broadcast or IP multicast address, or
  • a datagram sent as a link-layer broadcast, or
  • a non-initial fragment, or
  • a datagram whose source address does not define a single host -- e.g., a zero address, a loopback address, a broadcast address, a multicast address, or a Class E address.

DISCUSSION:

These rules will prevent the "broadcast storms" that have resulted from hosts returning ICMP error messages in response to broadcast datagrams. For example, a broadcast UDP segment to a non-existent port could trigger a flood of ICMP Destination Unreachable datagrams from all machines that do not have a client for that destination port. On a large Ethernet, the resulting collisions can render the network useless for a second or more.

IPv4 DHCP "discover" packets match both the 2nd and 3rd conditions.