How DHCP works
DHCP server’s most fundamental task is Providing IP addresses to clients. DHCP uses three different address allocation mechanisms when assigning IP addresses:
- Manual Allocation: The administrator manually assigns a pre-allocated IP address to the client and DHCP only communicates the IP address to the device.
- Automatic Allocation: DHCP automatically assigns a static IP address permanently to a device, selecting it from a pool of available addresses. There is no lease and the address is permanently assigned to a device.
- Dynamic Allocation: DHCP dynamically assigns, or leases, an IP address from a pool of addresses for a limited period of time chosen by the server, or the address will be withdrawn when the client tells the DHCP server that it no longer needs the address.
Dynamic IP address allocation.
DHCP works in a client/server mode and operates like any other client/server relationship. When a PC connects to a DHCP server, the server assigns or leases an IP address to that PC, which enables The PC, connects to the network with that leased IP address until the lease expires.
The host must contact the DHCP server intermittently to extend the lease. This lease mechanism ensures that hosts / clients that are mobile or power off do not hold onto addresses that they do not need. These addresses are return back to the pool by the to be reallocated to other clients when needed.