9. Application layer protocols

9.7. DHCP protocol

DHCP allows computers connecting to a network to obtain IP addresses, subnet masks, gateway and DNS server addresses and other settings from a pre-configured address pool. A DHCP server can be configured on a separate computer and will be a separate device on the network that assigns IP addresses to client computers, or it can run on an existing server as a separate service, a separate process.

Currently, the router in our home also allows us to configure such a service. Assigning addresses to client computers via the DHCP service (so-called dynamic assignment) is a very convenient solution for administrators, especially in large networks where new computers and their users frequently appear. In a network with 100, 200 or 500 computers and a large number of mobile devices, simply configuring IP addresses would be a tedious and, most importantly, time-consuming task.

Not all devices on the network can obtain addresses in this way, as some, such as application servers, databases, user authentication, network printers or routers, should and must have addresses statically assigned, i.e. distributed manually. A DHCP service configured on a server does not always permanently assign a given IP address to a computer. It only leases such an address for a period of time specified when configuring DHCP, maybe hours, days, but not permanently, although there are exceptions to this.

The deactivated machine returns the leased address, which is returned to the pool. Another machine can then lease this address. When a server, router or network printer leases these addresses, they may have to return them to the pool after a period of time and there is no guarantee that they will receive the same address again. 

In order for a Windows computer to obtain an address from a DHCP server, the option "Obtain an IP address automatically" must be selected in the network configuration.