What protocol assigns IP addresses?

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 protocol assigns IP addresses?

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.

What protocol assigns IP addresses?

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.

What protocol assigns IP addresses?

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.

What protocol assigns IP addresses?

Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to automate the process of configuring devices on IP networks, thus allowing them to use network services such as DNS, NTP, and any communication protocol based on UDP or TCP. A DHCP server dynamically assigns an IP address and other network configuration parameters to each device on a network so they can communicate with other IP networks. DHCP is an enhancement of an older protocol called BOOTP. DHCP is an important part of the DDI solution (DNS-DHCP-IPAM).

This video is an abstract of our DHCP demystified training available in our DDI introduction cursus composed of DHCP, DNS and IPAM. By watching it, you will learn the role of DHCP, the principles of the DHCP protocol and the message flows between a client and a server.

The basic flow is that a DHCP server hands out configuration data, based on the administrator’s policy, to a requesting client. Common network parameters (sometimes referred to as “DHCP Options“) requested include subnet mask, router, domain name server, hostname and domain name.

As the requesting client has no IP address when joining the network, it broadcasts the request. The protocol is thus used in a very early stage of IP communication. If such dynamic protocol is not used to get an IP address, the client has to use a predefined IP address generally called “static IP address”, which is manually configured on the client network interface in configuration files or with a specific command.

The DHCP service brings three key values: 1) Operation tasks are reduced: the network administrator no longer needs to manually configure each client before it can use the network 2) The IP addressing plan is optimized: addresses no longer being used are freed up and made available to new clients connecting 3) User mobility is easily managed: the administrator doesn’t need to manually reconfigure a client when its network access point changes.

What protocol assigns IP addresses?

The IP address information assigned by DHCP is only valid for a limited period of time, and is known as a DHCP lease. The period of validity is called the DHCP lease time. When the lease expires, the client can no longer use the IP address and has to stop all communication with the IP network unless he requests to extend the lease “rent” via the DHCP lease renewal cycle. To avoid impacts of the DHCP server not being available at the end of the lease time, clients generally start renewing their lease halfway through the lease period. This renewal process ensures robust IP address allocation to devices. Any device asking for a new IP version 4 address at arrival on the network and not receiving an answer will use automatic private internet protocol addressing (APIPA) to select an address. These addresses are in the network range 169.254.0.0/16.

There are four key DHCP usage scenarios: 1. Initial Client Connection: the client requests from the DHCP server an IP address and other parameter values for accessing network services 2. IP Usage Extension: the client contacts the DHCP server to extend usage of its current IP address 3. Client Connection After Reboot: the client contacts the DHCP server for confirmation that it can use the same IP address being used before reboot 4. Client Disconnection: the client requests the DHCP server to release its IP address.

What protocol assigns IP addresses?

DHCP options can be used to automatically provide clients with information on the network services it can use. This is a very efficient way to push the IP address of the time server, the mail server, the DNS server and the printer server. This can also be used to provide a file name and a file server that will be used by the client to start a specific boot process – mainly used for IP phones and Wi-Fi access points, but can also be used for auto-installing clients and servers with PXE (Preboot eXecution Environment).

The original and most comprehensive implementation of the DHCP service is offered by the Internet Systems Consortium (ISC). Supporting both IPv4 and IPv6, ISC DHCP offers a complete open source solution for implementing DHCP servers, relay agents, and clients. Other DHCP Server products include the Microsoft DHCP server.

The DHCP service can be enhanced by DHCP failover to bring high availability and load balancing of traffic. The ISC DHCP Failover relies on having a pair of collaborating servers – a primary (master) server and a secondary (backup) server. A TCP-based communication channel, called a failover channel, then has to be set up between the two servers.