A DHCP (Dynamic Host Configuration Protocol) server is used on networks that allow computers to be automatically configured for network communication. A DHCP server automatically assigns an IP address to a computer connected to a network from a pre-defined range of IP addresses. It ensures that no two computers on a network are assigned the same address. DHCP can be used for both Ipv4 and Ipv6 network addressing. However, lpv4 and lpv6 are considered separate protocols for each model of IP address assignments.

How Does a DHCP Server Work?

When a computer is connected to a network that uses the DHCP protocol, it sends a request called a DISCOVER or DHCPDISCOVER message in an attempt to find a DHCP server on the network. The network router will then send the DISCOVER packet to the best or closest DHCP server to answer the request. The server will then determine an appropriate IP address for the computer based on the administrator-set policies and address availability on the network. Once this assignment is made, it sends an “OFFER” or “DHCPOFFER” packet back to the client computer with the network address information. Once the client computer receives this response, it sends a “DHCPREQUEST” or “REQUEST” packet back to the server to let it know that the address will be used. The DHCP server will then send an “ACK” or “DHCPACK” packet back to confirm the IP address lease and time of the lease.

What Are the Benefits of DHCP?

DHCP’s biggest benefit is that it removes the requirement for a network administrator to manage the available IP addresses on a network. Additionally, DHCP helps eliminate the problem with static IP assignment, where two computers are assigned the same address which ultimately results in a loss of network service. DHCP dynamic assignment of IP addresses helps minimize these conflicts.

What Are the Methods of DHCP Address Allocation?

Depending on the network requirements, there are three ways that DHCP can assign IP addresses to a network computer:

Dynamic Allocation – This is where the administrator assigns an IP address range to the DHCP server. Each client computer on the network must request an IP address from the DHCP server when the network is initialized under the “Lease” concept. When a lease expires, the DHCP server is free to reclaim an address if it is not renewed and it can be assigned to other client computers.

Automatic Allocation – The DHCP server will permanently assign a free IP address from a range set by the admin to a requesting computer. The primary difference with dynamic allocation is that the server keeps a record of past IP assignments and attempts to assign the same address to the same computer on future network connections.

Static Allocation – The DHCP server makes IP address assignments based solely on a table that pairs MAC addresses with IP assignments that are normally filled in manually by a network administrator. If a computer’s MAC address is not listed in the table, it will not be assigned a network address. This is also referred to as Static DHCP.

DHCP Security

The base-line DHCP protocol does not include separate security mechanisms for computers to authenticate themselves. Due to this fact, there are several attacks that can take advantage of the lack of security in the DHCP protocol:

  1. Unauthorized computers that can gain access to network resources,
  2. Unauthorized DHCP servers that give false address assignments to client computers, and
  3. Network resource exhaustion by rogue network computers.

There are DHCP extensions that implement different authentication methods. However, these are not widely adopted in industry. As a result, many network administrators rely on controlling access to a network to help prevent DHCP exploitation.