Dynamic Host Configuration Protocol (DHCP) automatically provides devices with the network configuration needed to communicate on an IP network. It reduces manual configuration and helps prevent conflicting IP addresses.
How DHCP works
DHCP follows a client-server model. When a new client joins a network, it initially lacks an IP address and does not know the DHCP server's address, so it begins by broadcasting a request.
The allocation process is commonly summarized as DORA:
| Stage | What happens |
|---|---|
| Discover | The client broadcasts a DHCP Discover message to locate available DHCP servers. |
| Offer | A DHCP server offers the client an available IP address and other configuration settings. |
| Request | The client broadcasts a request accepting one offer and identifying the chosen server. |
| Acknowledge | The server confirms the allocation and provides the final configuration. |
The configuration supplied may include:
- an IP address, which identifies the device on the network;
- a subnet mask, which distinguishes the network and host portions of the address;
- a default gateway, which allows communication beyond the local network;
- a DNS server address, which enables domain names to be resolved into IP addresses.
The IP address is normally assigned for a limited lease period rather than permanently. The client can renew its lease, while expired addresses return to the server's address pool for reassignment. This makes address management efficient when devices frequently join and leave a network.
A common misconception is that DHCP routes packets or provides internet access. It does neither directly: DHCP supplies configuration settings, while routers forward packets and internet access depends on additional network infrastructure.
IB exam technique
For an A2.1 Network fundamentals question, define DHCP as a protocol that automatically assigns network configuration. For a higher-mark explanation, describe DORA in the correct order and identify at least two settings supplied. Do not state that DHCP permanently assigns every device an address.