Why DHCP client listens on port 68?

avd picture avd · Nov 24, 2009 · Viewed 21.4k times · Source

If suppose client does not listen on 68 port,when DHCP server receives the request, it can send it to the address from where it received request (with ephemeral port chosen by client at time of sending), then why does protocol specifies client to be listening on port 68?

Answer

gigman picture gigman · Mar 11, 2013

The main reason is that the DHCP server might broadcast the "DHCP offer" on the mac level, instead of sending it unicast to the mac address it had received the request. If the port wasn't constant, some hosts that are listening by chance to the this same random port, will accept the packet to layer 5 - the application layer. In other words, an application will get message from completely different application, not an healthy situation.