Friday 27 January 2017

What is DHCP ?

Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to automatically assign an IP address to a computer from a defined range of numbers (EX. a scope) configured for a given network. As long as you're learning about your IP address, you should learn a little about something called DHCP—which stands for Dynamic Host Configuration Protocol. Why bother? Because it has a direct impact on millions of IP addresses. 


How DHCP assigns IP addresses -

DHCP assigns an IP address when a system is started and request for Ip  for example: 

  1. A user turns on a computer with a DHCP client.
  2. The client computer sends a broadcast request (called a DISCOVER or DHCPDISCOVER), looking for a DHCP server to answer.
  3. The router directs the DISCOVER packet to the correct DHCP server.
  4. The server receives the DISCOVER packet. Based on availability and usage policies set on the server, the server determines an appropriate address (if any) to give to the client. The server then temporarily reserves that address for the client and sends back to the client an OFFER (or DHCPOFFER) packet, with that address information. The server also configures the client's DNS servers, WINS servers, NTP servers, and sometimes other services as well.
  5. The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that it intends to use the address.
  6. The server sends an ACK (or DHCPACK) packet, confirming that the client has a been given a lease on the address for a server-specified period of time.

 DHCP Address lease times -

A local area network operates in a similar fashion. Each device on the network must have a unique IP address. A  DHC server leases an address to a new device for a period of time, called the DHCP lease time. When the lease expires, the DHCP server might assign the IP address to a different device.





No comments:

Post a Comment