DHCP Process
The Dynamic Host Configuration Protocol (DHCP) provides an automatic method for allocating an IP address, subnet mask, and optional parameters, such as default gateway and DNS server addresses, when a host joins a network.
4 Step Process
- DHCP Discover
- when a DHCP client initializes, it broadcasts a DHCPDISCOVER packet to find a DHCP server
- communications are sent using UDP
- server listens on port 67, client on port 68
- DHCP Offer
- if it has an IP address available, DHCP server responds to the client with a DHCPOFFER packet
- contains the address and other configuration information
- DHCP Request
- client may choose to accept the offer using a DHCPREQUEST packet
- broadcast onto the network
- DHCP Acknowledge
- assuming offer is still valid, server will respond with a DHCPACK packet
- client broadcasts an ARP message to check that the address is unused
- if so, will start to use the address and options
- if not, declines the address and requests a new one
- IP address is leased by the server for a limited time
- client can attempt to renew or rebind the lease before it expires
- if lease cannot be renewed, client must release the IP address and start discovery process again
Info
DHCP lease process is also called the DORA process
- discover, offer, request, acknowledge
