What Is DHCP?

What Is DHCP

Date First Published: 4th April 2022

Topic: Computer Networking

Subtopic: Internet Protocols

Article Type: Computer Terms & Definitions

Difficulty: Advanced

Difficulty Level: 8/10

Learn more about what DHCP is in this article.

Not to be confused with DCCP (Datagram Congestion Control Protocol).

Short for Dynamic Host Configuration Protocol, DHCP is a network configuration protocol that automatically assigns an IP address to devices on a network. Dynamic addressing enables each device to have a different IP address every time it connects to the network and it eliminates the need for manually assigning an IP address to a device. Most routers and other networking equipment use this protocol by default. Dynamic devices can use any communication protocol, such as TCP and UDP as well as network services, such as DNS.

Note: Info Icon

In small businesses and homes, the router acts as the DHCP server. Single computers may have that purpose in large networks. In addition, the period of time that it takes for a device to connect through DHCP varies depending on the speed of the router and type of network and DHCP works in the same way for both wired and wireless connections.

There are times when DHCP should not be used and static IP addresses should be considered. It should not be used for devices that do not move around and need frequent access. Examples include printers. Assigning a printer with a changing IP address would be inconvenient as it would cause every device that is connected to the printer to have to update its settings on a regular basis in order to connect to the printer.

The same goes when remote access is required to a computer in a home network since DHCP will cause the computer to get a new IP address, meaning that the IP address that was recorded for that computer will only be accurate for a short period of time. It is recommended to disable DHCP and use static IP addresses for that device in the event that remote access software that relies on IP address-based is used.

How Does DHCP Work?

DHCP works by using the five steps below.

  1. The client signal sends a DHCPDISCOVER request to the DHCP server or router.
  2. The server or router receives the DHCP request and redirects it to the appropriate DHCP server.
  3. The server will then respond with all the rules and settings of the network as well as an IP address to use, called a DHCPOFFER. This message will be sent if the server accepts the new device and it will contain the MAC address and IP address of the client’s device.
  4. The client asks permission to use the assigned address, known as a DHCPREQUEST message.
  5. Finally, the DHCP server or router acknowledges the request and the client is free to connect to the network. This acknowledgement message is known as a DHCPACK request that confirms that the client has been given access for a certain period of time.

What Can DHCP Configure?

DHCP can be configured to control the range of IP addresses that are available for use. For example, if the IP range was 123.123.123.1 from 123.123.123.100, all available IP addresses would fall in that range and a device assigned to 123.123.123.200 would never be seen. These configuration settings are called IP pool starting address and IP pool ending address. The start IP address, which is 123.123.123.1 would be reserved for the router or server in this example. The advantage of this setting is that it can put a limit on the number of devices that are connected to the router or server at the same time. However, if the range was too small, it would prevent new devices from being connected to each other. DHCP is useful since it allows multiple devices to connect together without the need for a large pool of IP addresses.

Keywords

  • DHCP server – Most likely to be a router. This is the network device that runs the DHCP service.
  • DHCP client – This is the device that gains access to the DHCP service and receives configuration information.
  • IP address pool – The range of IP addresses that are available for DHCP clients.
  • Subnet – A separately identifiable part of a network, often a LAN that consists of all the devices in one building or geographical location.
  • DHCP relay – A host that forwards DHCP packets between clients and servers.
  • DHCP snooping – A layer two security mechanism that blocks any DHCP traffic that it defines as unacceptable. The purpose of this is to prevent unauthorised DHCP servers from providing IP addresses to DHCP clients.
  • Lease – The period of time that a DHCP can hold the IP address information.
  • Client – The device that connects to the DHCP service.
TCP/IP Protocol
Application layer BGPDHCPDNSFTPHTTPIMAPLDAPMGCPNNTPNTPOSPFPOPPTPONC/RPCRTPRTSPRIPSIPSMTPSNMPSSHTelnetXMPP
Transport layer TCPUDPDCCPSCTPRSVPQUIC
Internet layer IPICMPNDPECNIGMP.
Link layer TunnelsPPPMAC


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.