Dynamic Host Configuration Protocol so they can join a network. Assigns IP addresses to hosts. Main reason was when people started moving devices across networks
Basic Messages
- Discovery, host looks for a DHCP server
- Sender is 0.0.0.0 port 68
- Receiver is 255.255.255.255 port 67 (this is the broadcast address!)
- Router responds with an offer valid for the next seconds
- This is broadcasted (255.255.255.255) as router does not know where receiver is
- Host responds with acceptance
- Broadcast which address picked
- Router responds OK
- ACK message, still broadcast
- Includes
- Unique IP Address for Client
- Netmask for local network
- Lease time
- Routing information
- Host name, domain name (optional)
- Name (DNS) Server
Fields (all UDP)
src
: source IP address (usually 0.0.0.0 for no meaningful IP)dest
: destination IP addressyiaddr
: your IP addresstransaction ID
: for matching request with response