Overview

Dynamic host configuration protocol (DHCP) is used to automatically assign IP addresses to hosts in a network. DHCP is defined in rfc2131.

DHCP

DHCP uses UDP as its transport protocol. Messages are passed on ports 67 (client to server) and 68 (server to client).

There are four types of DHCP messages:

  • DISCOVER
  • OFFER
  • REQUEST
  • ACKNOWLEDGE

The DHCP message types where named after a popular cartoon character who likes to explore named DORA.

DHCP Operation
blog/dhcp/dhcp.svg
Note

Not factual information, but makes it easy to remember

DHCP Relay

DHCP messages from the client to the server are broadcasts, if the DHCP server is located in another network segment behind a Layer 3 gateway DHCP relay agent will be required.

blog/dhcp/dhcp-helper.svg

Packet Captures

Various DHCP PCAPs can be found here.