DHCP

Dynamic Host Configuration Protocol (DHCP) is a protocol that is used to provide a responsive, quick, and automatic central-management system intended to distribute IP addresses within a particular network. This also contains several other utility functions such as configuring the appropriate subnet mask, default gateway, and DNS server information on a computer, or any form of device.[1]

Functionality

The DHCP runs at the application layer of the TCP (Transmission control protocol) stack to dynamically assign IP addresses to the different devices, as well as allocate different configuration information to DHCP clients. Users need to be aware that the DHCP is a client-server protocol. This means that the servers manage a list of already pooled unique IP addresses and information about several configuration parameters.

The devices that are configured with DHCP broadcast a request towards the DHCP server in order to request information regarding the network configurations. Then, a device typically broadcasts a query of information a few seconds right after booting up. The DHCP server responds to the device that is making a request by providing configuration information on the IP address that has been specified by the network admin. This also includes specific types of IP addresses for that specific time period, which is actually called a lease, for the valid allocation. Then, the DHCP server refreshes an assignment so that a DHCP device or client can request the same parameters after which the same process can be done again.

Dynamic Lease

A Dynamic Lease is where the client does not necessarily own the IP address assigned to but, instead, ‘leases’ or borrows that IP address for that short period of time. A client may have to go through certain steps in order to terminate the IP address of a certain device while also connecting another IP address to the same device. In most cases, the server will assign a new address rather than using an old IP address. DHCP lease times will depend on the particular location the user is located in. The following cycle is followed when it comes to the leasing.[2]

  1. A device would obtain an IP address through the allocation process of requesting a DHCP server.
  2. If a device already has an existing IP address from a lease, it will have to refresh the IP address right after needing to shut down so that the new IP address will populate.
  3. Once the new lease is now considered active, the device/client is now tied into the lease and IP address.
  4. If a device is migrating towards a different network, the dynamic IP address will be terminated and will eventually request a new IP address from the DHCP of the different network.

To put it simply, the IP address that a device has is bound to the network whether this is a Local Area Network or from a large public network, such as the internet.

DHCP Handshake

When it comes to a DHCP handshake, the following steps are followed:[3]

  1. Discover – The client prompts a DHCP to discover message to identify DHCP servers.
  2. Offer – The DHCP server replies with an IP address that is available as well as the options.
  3. Request – The client requests the IP address from the server.
  4. Acknowledge – The server acknowledges the new IP address that has now been designated to the particular device and completes the handshake cycle.

Benefits

In most cases, the advantages of using DHCP is closely tied to its main function.[1:1]

  1. A device that needs to connect to a network must undergo the appropriate configuration so that it will communicate to that particular network properly. Since DHCP provides an automatic configuration, this has been universally used in almost every device that wants to connect to a certain network. This includes devices like computers, switches, smartphones, gaming consoles, and a multitude of other devices.
  2. Because of the dynamic IP assignment feature of DHCP, the chances of having the same IP address, which would lead to complications, is drastically decreased. This also means that it is easier to run manually-managed static IPs.
  3. Having a DHCP will also make it easier to manage and manipulate a network. This is because every device on the network has the ability to obtain an IP address using their default network configurations which has an automated system that will generate an IP address. The only alternative to this is having to manually assign addresses to each of the devices and computers on that said network.
  4. Since the devices within the network can obtain IP addresses automatically, they are able to move freely from one device to another without much effort. This is actually really helpful when it comes to small hand-held devices used in the workplace.
  5. Usually, when a device obtains an IP address which was generated by a DHCP server, that IP address will be phased out by another one every time that device joins the network again.

There is a multitude of different advantages of using DHCP, and there are certainly a few disadvantages as well. However, the disadvantages are actually quite specific and might not affect the user anyway. An example would be when a user wants a specific manual IP address. The network administrator will have to go through a number of processes, such as checking if the IP address is available, before assigning that device with a new IP address. This actually takes a bit of time to do but is not really that common. Dynamic IP addresses that are changing shouldn’t be used in specific devices that are usually stationary and not hand-held, such as printers, and file servers.

Although these devices are usually being used by a lot of individuals in an office, it’s actually quite impractical for these stationary devices to have a constantly changing IP address. Having an ever-changing IP address for stationary devices will only complicate things.


  1. https://www.lifewire.com/what-is-dhcp-2625848 ↩︎ ↩︎

  2. https://www.howtogeek.com/404891/what-is-dhcp-dynamic-host-configuration-protocol/ ↩︎

  3. https://searchnetworking.techtarget.com/definition/DHCP ↩︎