DHCP is an acronym for dynamic host configuration protocol, a mechanism which gives network devices an IP address. When a new device joins a network DHCP recognises the devices and gives it an IP address automatically, according to DHCP rules for the network.
This makes matters easier for administrators: this is because the network administrator does not have to manually assign an IP address to a new network device whenever a device is added. In some instances, including public Wi-Fi, new devices are regularly added to a network so manual IP assignment would be unpractical.
Your home network router, for example, will automatically make use of DHCP to assign IP addresses. However just because it is enabled for DHCP does not mean that it acts as a DHCP server.
Understanding how DHCP works
It’s fantastic when everything on a network simply works, including your local network printer for example – and you might wonder what it is that makes sure that network devices are always addressable.
First, every network device has a unique identifier called the MAC address which is assigned in the factory. It’s possible to assign a static IP address on a server to a specific MAC address. So, whenever a device such as a printer reboots it simply resumes the static IP address that’s been assigned to it.
Printing the network configuration of your printer will show you that DHCP is enabled, and that there is no static IP address assigned – this is because IP assignment is in fact done by the DHCP server.
Advantages and disadvantages of DHCP
Using DHCP to handle IP address assignment is very convenient, but DHCP is also known for being very reliable. DHCP’s stability comes from a couple of built-in techniques applied by the protocol: failover, renewal and rebinding.
The DHCP server gives each DHCP client a “lease” on an IP address, and this lease must be renewed at some point. A client will try to renew the DHCP lease halfway through the lease period. If the DHCP server is down the client will keep trying to renew the lease by sending repeated renewal requests.
However there are some security concerns with DHCP because the DHCP protocol does not have any authentication procedures. For this reason DHCP is vulnerable to a range of cyber attack strategies.