How DHCP works
DHCP hands a new device its IP address, mask, gateway and DNS servers automatically, in four messages remembered as DORA: Discover, Offer, Request, Acknowledge.
Layer: Application (OSI layer 7) · Port: 67/68 · Transport: UDP · Format: Binary options · Standard: RFC 2131
DHCP packet flow
- DHCP Client → Router: DHCP Discover - 0.0.0.0 → 255.255.255.255
- DHCP Router → Client: DHCP Offer - 192.168.1.10/24, router .1, DNS 8.8.8.8
- DHCP Client → Router: DHCP Request - I'll take 192.168.1.10
- DHCP Router → Client: DHCP ACK - lease 24 h
Other protocols: Ethernet · IP · IPv6 · TCP · UDP · ICMP · ARP · DNS · BGP · NTP · IGMP