DHCP ( Dynamic Host Configuration Protocal ) is a network protocal used for assigning IP address to network clients dynamically from pre defined IP pool. It is usefull for LAN network, but not generally used for production servers. DHCP works on concept of a ‘lease’ ( amount ) of time that a given IP address will be valid for a network computer. The lease time can vary depending on how long a user is likely to require the Internet connection or DHCP configuration.
Process of IP Assignment by DHCP:
- When a client computer starts, If it is configured to use DHCP Server to get IP address.
Client Computer sends a DISCOVER broadcast request on network.
DHCP server received this request and sends an OFFER packet back to client.
After getting offer packet, Client sends a REQUEST packet to DHCP server to assign his an IP.
DHCP Server assigned the IP to client computer and sends a ACK packet to client.
More About DHCP:
- DHCP is a connectionless protocal.
- DHCP uses destination UDP port 67 for sending data to the server, and UDP port 68 for data to the client.
- DHCP process is often abbreviated as DORA (Discovery, Offer, Request, Acknowledgement).
- DHCP servers and clients initially communicates via UDP broadcasts on the same subnet.
- DHCP Helper or DHCP Relay Agent may be used if servers and client are on different subnet.
- Clients communicate directly via UDP unicast, requesting renewal of an existing lease.