What are the port numbers for DHCP?
DHCP = ports 67 (server) and 68 (client), both UDP.
DHCP = Ports 67 and 68 (UDP)
DHCP (Dynamic Host Configuration Protocol) hands a host its IP address and network settings automatically when it joins a network. Unusually, it uses a fixed port on both ends rather than a dynamic client port:
- Port 67: DHCP Server listens here
- Port 68: DHCP Client listens here
Why fixed ports on both sides? A normal client picks a random ephemeral source port - but a host requesting DHCP has no IP address yet, so it must broadcast its request (to 255.255.255.255). For the server's reply to find its way back, the client has to be listening on a known, fixed port (68), since there is no established connection to route the answer to. That is the reason DHCP breaks the usual "dynamic client port" rule.
Memory tip: "67-68" - server is one less than client. Think "Server = 67 = Six-Seven = Serving addresses."
Why UDP?
- Client doesn't have an IP yet, so it relies on broadcast - which TCP cannot do
- The exchange is short and self-correcting: if a message is lost, the client simply retries
- Speed and simplicity matter more than guaranteed delivery for a few setup packets
Go deeper:
Dynamic Host Configuration Protocol — Wikipedia overview confirming UDP port 67 (server) and 68 (client) and the broadcast bootstrap.
List of TCP and UDP port numbers — the broader lookup table placing 67/68 among the well-known ports.