What is DHCP and how does it allocate IP addresses?

Anton P. | July 28, 2021

DHCP is a network management protocol that deals with the allocation of IP addresses. It is one of those processes that users might be unaware of but should be grateful regardless. After all, it makes it possible for you to connect multiple devices to a network instantly. Since each of them must operate with a unique IP address, components like DHCP become essential. Let’s figure out how DHCP works and other traits related to this protocol.

What is DHCP?

DHCP (Dynamic Host Configuration Protocol) is a protocol responsible for distributing IP addresses within a network. Its role also includes helping configure default gateways, subnet masks, and DNS servers. It follows a client/server architecture and runs over UDP protocol.

Due to its instant configuration, DHCP is present in nearly all devices capable of connecting to the internet. It includes smartphones, computers, tablets, or wearables.

At your home, the router is likely the one working as a DHCP server. For networks with more connecting devices, a computer might be performing DHCP-related tasks.

For some context, remember that each time a new device wishes to join a network, it needs several things. One of which is a unique IP address for differentiating between connected gadgets. Thus, an IP address is an identifier permitting the successful data exchange between devices and networks.

DHCP is a system automating this procedure and neatly serving all clients joining networks. Typically, IP addresses are not permanent. In a way, devices temporarily rent them. Such allocation is a lease. And the time during which a device holds an IP address is lease time.

How does DHCP work?

DHCP system consists of two main components:

  1. DHCP server. It can be a router operating as a host and assigning IP addresses.
  2. DHCP clients. These are devices that can connect to networks and communicate with a DHCP server.

By default, the DHCP server manages the pool of available IP addresses and other configuration data. For instance, the server guarantees that each connected device has a unique identifier.

In most cases, clients request an IP address from a router. Then, the DHCP requests necessary information and assigns an appropriate IP address.

There are three main methods of IP address distribution:

  • Dynamic allocation. Each allocated IP address remains assigned for a limited period of time. Thus, the devices’ IP addresses change regularly.
  • Automatic allocation. This method means that each client receives a permanent IP address. DHCP server retains a list of past connections to grant addresses to the same devices.
  • Manual allocation. The last technique means that network administrators assign specific IP addresses to particular clients.

The DHCP server allocation depends on its configuration. Thus, IP addresses might not always follow the dynamic approach.

When it comes to the difference between automatic and dynamic, no human intervention is necessary in both cases. All that differs is how long devices get to retain a specific IP address.

Gains and losses of DHCP

DHCP automatically performs all the preparations necessary for a device to operate on a network. Since this configuration is instant, it is the dominant way of ensuring smooth connectivity. It simplifies network management, and devices can obtain IP addresses without any manual configuration. Devices can also jump from one network to another effortlessly.

However, since DHCP will typically perform dynamic allocation (hence the name), it might be impractical in some cases. For example, dynamic IP addresses are not suitable for all devices.

Stationary gadgets that require constant access (like printers) should operate with static IP addresses instead. The same applies to people that need constant remote access to devices. On such occasions, static addresses are also the way to go.

Luckily, DHCP supports three different address allocation mechanisms (discussed above). Thus, it is a flexible solution in the majority of cases.

Final thoughts

All in all, DHCP is an excellent booster in minimizing the workload for network administrators. It provides a way to automate and manage the communication of devices using TCP/IP protocol.

Here is a quick summary of the three main benefits of enabling DHCP:

  • Fewer network operation tasks. Thus, network managers no longer need to configure each client before it can connect to networks manually.
  • Better management of mobile devices. Clients can connect to any network without much effort and manual configuration.
  • Improves IP addresses usage. DHCP ensures that devices could receive IP addresses that are no longer in use.

The chances are that you already connect using DHCP. You can check this on almost all devices. For instance, on macOS, you need to open Settings and navigate to Network. Then, click Advanced and the TCP/IP section. On Windows, you will find such information via Network and Internet.

Anton P.

Anton P.

Former chef and the head of Atlas VPN blog team. He's an experienced cybersecurity expert with a background of technical content writing.

Tags:

udptcpip address

© 2021 Atlas VPN. All rights reserved.