Member • Jun 3, 2011
About DHCP
DHCP stands for dynamic host configuration protocol. It's a protocol that lets network admin to automate the assignment of IP addresses in network. Each machine connecting to internet using TCP/IP needs unique IP address. Without DHCP, the ip address must to be entered manually at each machine and if that machine moves to other subnet, a new ip adress must be entered. When DHCP is used, new ip address is assigned automaticaly when computer connects to network.
How it works :
- When DHCP client needs an ip address, it broadcasts DHCP Discover packet i.e. a requests for configuration information.
- In response to this message all servers on that subnet unicast a DHCP Offer packet to that client.
- Client selects one of these servers and broadcasts a DHCP Request packet which contains host name of selected DHCP server and its ip address.DHCP Request packet also contains mac address of client machine.Other servers treat this as rejection.
- Server then respnds with DHCP Ack packet.This packet contains ip address for client, lease time and other configuration info which is requested by client.
- When client wants to disconnect it sends DHCP Release packet.Server then marks that ip address as unused.
- When half the lease time is over, client broadcasts anothoer DHCP Request packet containing current ip address and server address in configuration.
- Client can remember last used ip address in non volatile memory.Next time when it boots it can request for same ip address.This way client may have same ip address over long period of time.