What is DHCP?

Hey everyone! In this article, I will explain what DHCP is and how it works under the hood.

Let's get started!

What is DHCP?

  • DHCP (Dynamic Host Control Protocol) is a protocol/procedure that dynamically assigns IP addreses to devices on a network.

  • It would be huge pain if we had to configure and set up the IP address to connect to the network every single time. So, the DHCP server does that for us!

How does DHCP Work?

  • The DHCP server maintains a pool of available IP addresses ready for use and "leases" an address to any DHCP-enabled client when it starts up on the network.

  • Because the IP addresses are dynamic rather than static, when an IP address is no longer being used, it is automatically returned to the pool maintained by the DHCP server.

  • Usually, the network administrator established DHCP servers that maintain TCP/IP configuration information and provide address configuration to DHCP-enabled clients in the form of a "lease" offer.

  • This information is stored in a database as well.

  • What do I mean by "leasing"? Well, the DHCP server allows a device to "rent" an IP address to that specific network.

  • These leases have expiration dates as well. Typically, in an enterprise environment with wired devices, you will see a leasing period of 8 days. With wireless devices, you would typically use 24 hours because how often the devices leave that network and come back.

  • During the half-way point of this lease, this device will sent a request to the DHCP server to renew this lease. So, with wired devices in an enterprise environment, this would be the 4 day mark and for wired devices, it could be the 12 hour mark.

  • It is important to note, this is not set in stone at all. This is completely configurable. It is up to you.

  • It is also important to note, that sometimes the DHCP will renew that lease and let you keep that IP address, and sometimes it will give you a brand new one. It depends. The DHCP server does it's best to play kind with others.