Dynamic Host Configuration Protocol (DHCP)

DHCP (Dynamic Host Configuration Protocol) is a protocol and is used to provide quick, automatic, and central management of  the IP addresses within a network.

DHCP is also used to configure the subnet mask, the default gateway, and the DNS server information on the device.

So How DHCP Works

A DHCP server is used to issue unique IP addresses and automatically configure other network information. In most homes and small businesses usually the router acts as the DHCP server. In large networks, a single computer might act as the DHCP server.

In short, the process goes like this: A device (the client-PC,tablet, etc) requests an IP address from a router (the host), after which the host assigns an available IP address to allow the client to communicate on the network.

When a device is turned on and connected to a network that has a DHCP server, it will send a request to the server, called a DHCPDISCOVER request.

After DHCP server takes the DISCOVER packet , the server attempts to hold on to an IP address that the device can use, and then offers the client the address with a DHCPOFFER packet.

Then the device responds back to the DHCP server with a DHCPREQUEST packet to accept it, after which the server sends an ACK that’s used to confirm that the device has that specific IP address and to define the amount of time that the device can use the address before getting a new one.

If the server decides that the device cannot have the IP address, it will send a NACK.

Positives and Negatives of Using DHCP

All the devices (PCs,Smartphones,Tabets etc) that connects to a network (local or internet), must be properly configured to communicate within the network. Since DHCP allows that configuration to happen automatically, it’s used in almost every device that connects to a network including computers, switches, smartphones, gaming consoles, etc.

Because of this dynamic IP address assignment, there’s less of a chance that two devices will have the same IP address, which is very easy to run into when using manually-assigned, static IP addresses.

With the DHCP,  the management of the network is much easier. From an administrative point of view, every device on the network gets an IP address with nothing more than their default network settings.

Though there so many advantages to using DHCP, there are certainly some disadvantages as well. Dynamic, changing IP addresses should not be used for devices that are stationary and need constant access, like printers and file servers.

Moreover, if you need to have permanent remote access to a computer in your home network and DHCP is enabled, that computer will get a new IP address at some point. This creates problems If you’re using remote access software that relies on a IP address-based access and you’ll have to use a static IP address for that device.

n Working Group of the Internet Engineering Task Force created DHCP.