System Design
2. Networking FundamentalsAnimated
DHCP
Automatically assigns IP addresses to devices joining a network.
The idea
A new device asks for an address and a DHCP server leases one, along with the gateway and DNS settings.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
A device with no address shouts to find a DHCP server.
- step:
- 1/4
- from:
- New device
- to:
- DHCP server
1/4
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Client broadcasts a discover
- 2Server offers an address
- 3Client requests it
- 4Server acknowledges the lease
Where it is used
Home Wi-Fi, offices and cloud networks.
Watch out for
Leases expire. Servers that need a fixed address should use a reservation.