What is the process a DHCP client uses to obtain an IP address and other IP information from a DHCP server?

The server will quickly and automatically assign an IP address and some related network configuration parameters. Once the device has accepted the assignment, it can communicate with both the internal network and the public internet.

Relevant parameters

In addition to assigning IP addresses, these servers also provide relevant parameters, known as DHCP options. The Internet Assigned Numbers Authority (IANA), the global coordinator of IP addresses, defines available DHCP parameters.

Options number in the hundreds. Key among them is how long the IP address can be used—known as the lease time. They also include the default gateway, its subnet mask, and its DNS server.

Some additional definitions

To clarify, let’s quickly define some of these terms we just mentioned:

  • A default gateway transfers data back and forth between the local network and the internet, or between local subnets.
  • IP networking uses a subnet mask to separate the host address and the network address portions of an IP address.
  • A DNS server resolves names to IP addresses, translating domain names that we easily remember, like bluecatnetworks.com, into IP addresses like 104.239.197.100.

Dynamic IP addressing with DHCP

The assignment of IP addresses happens dynamically within a given address range. As a result, a device connected to the network doesn’t have a forever address. The IP address can periodically change as its lease time expires unless the lease is successfully renewed.

For services that always need to be on, a static IP address is often a better option. Corporate enterprises commonly use static IP addresses for hardware like mail servers. Certainly, a DHCP server should have a static IP address.

However, there are drawbacks to dedicating a specific IP address to a device or service. A network administrator must manually assign, configure, and track the IP address. It’s a time-consuming task. Oftentimes, it requires the admin to physically be with the device.

Meanwhile, dynamic IP addresses are usually the preferred choice because they:

  • Cost less to manage than static IP addresses;
  • May offer more privacy and security with a constantly changing IP address; and
  • Don’t require manual administration when a device roams from one subnet to another.

DHCP communications protocol

Communications to fulfill a DHCP request involves both the server and client. Furthermore, a relay agent or IP helper often facilitates communication between the two. Relay agents receive broadcast DHCP messages from clients and then re-send those messages with configuration information to servers.

What is the process a DHCP client uses to obtain an IP address and other IP information from a DHCP server?

Communication happens via small units of data, called packets, that are routed through a network. Networking protocols like IP govern all its rules.

Most of the time, communication occurs in four steps. Briefly, they are:

  1. A discover packet is sent from the client to the server.
  2. The server replies to the client with a DHCP offer packet containing an IP address.
  3. The client receives and validates the offer, then sends a request packet back to the server to accept the address.
  4. The server sends an acknowledgement packet back to the client to confirm the chosen IP address.

With this in mind, one final point: DHCP alongside DNS and IP address management (IPAM) are together known as DDI. Want to know how to define DDI or how it works to form a complete management solution? The BlueCat platform is the place to start.

What is the process a DHCP client uses to obtain an IP address and other IP information from a DHCP server?

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 is the process a DHCP client uses to obtain an IP address and other IP information from a DHCP server?

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 is the process a DHCP client uses to obtain an IP address and other IP information from a DHCP server?

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.