How DHCP works? from Jack prabha's blog

Without entering to the related technical information (DORA process) the DHCP client request from the DHCP server IP address for a while, the length of time that the DHCP client can use the dynamic IP address that the DHCP Server provided can be called lease, just like the name: lease means that the client “rent” an IP address for a specific time from the DHCP server, if the client wants to continue using the specific IP address the client needs to re-assign the address by renew the lease, this will happen before the expiration time of the lease if the client is still in the network.

More in depth, the DHCP service works by using the DORA (Discover, Offer, Request and Acknowledgment) process (you can trace on the whole process using a network monitor utility):

  1. DHCPDISCOVER – The client broadcast a DHCPDISCOVER packet in order to locate a DHCP server in the network, in some cases that the DHCP server isn’t in the same subnet of the client, you’ll need to configure in your network devices (usually routers) a DHCP Relay Agent, in order to transfer the DHCPDISCOVER packet to the DHCP server.
  2. DHCPOFFER – The DHCP server broadcast a DHCPOFFER packet to the client which includes an offer to use a unique IP address for the client.
  3. DHCPREQUEST – The client broadcast a DHCPREQUEST packet to the DHCP server with an answer, and “asks” from the server to “rent” the unique address that the server offer to her.
  4. DHCPACK – The DHCP server broadcast a DHCPACK packet to the client, in this packet the server acknowledge the request from the client to use the IP address, and provide to the client the IP address lease and other details such as DNS servers, default gateway, etc. if the server cannot provide the requested IP address or from some reasons the address is not valid the server sends DHCPNACK packet in stand of DHCPACK, more information about DHCPNACK is under the specific subject – DHCPNACK.

Previous post     
     Next post
     Blog home

The Wall

No comments
You need to sign in to comment