DHCP (Dynamic Host Configuration Protocol) Explained

Rashmi Bhardwaj | Blog,Protocol
Google ADs

Introduction to DHCP

DHCP stands for Dynamic Host Configuration Protocol. DHCP is an application layer protocol. It is used to control the network configuration of a host through a remote server. It comes installed as a default feature in most of the contemporary operating systems. DHCP is an excellent alternative to the time-consuming manual configuration of network settings on a host or a network device.

DHCP works on a client-server model. It uses UDP i.e. User Datagram Protocol. It uses:

  • UDP port number 67 – DESTIANTION SERVER
  • UDP port number 68 –  CLIENT

Being a protocol, it has its own set of messages that are exchanged between client and server. In DHCP, 4 main messages are exchanged between the client and the server namely:

Google ADs

  1. Discovery
  2. Offer
  3. Request
  4. ACK

That is the reason, it is also called DORA process.

 

DORA Process

1. DHCP Discover Message

This is the first message generated by the DHCP Client/host to discover  if there is any DHCP server/servers present in a network or not. Discover message is broadcasted to all devices present in the network to find out the presence of DHCP server/servers.

A client boots and initiates its network hardware
client sends out a DHCPDISCOVER message :
Source MAC  is – Client’s MAC
Destination MAC is – Hardware-layer broadcast (FFFFFF-FFFFFF) all 1’s
Message type is – DHCPDISCOVER   

2. DHCP Offer Message

The Server hears the DHCPDISCOVER request and responds

Source MAC is – Server’s MAC
Destination MAC is – Client’s MAC
Message type is – DHCPOFFER containing:
Server-provided IP address from pool of free addresses (the server should but is not required to check for address conflicts before offering the  address).
List of DHCP configuration parameters

3. DHCP Request Message

After receiving  DHCP Offer message, the client responds by broadcasting a DHCPREQUEST

Client responds with DHCPREQUEST message and does one or more of the following:
requests values for the server-offered parameters from a single server (rejecting all offers from other servers)
confirm the correctness of the previously allocated IP address (after the client had rebooted or lost connection to the network)
requests extension of the lease on the specific address already supplied.

4. DHCP ACK Message

After receiving DHCPREQUEST message, the server may respond in different ways-

1. a DHCPACKnowledge to confirm the server-offered options and IP previously confirmed by the client –
– or-
2. a DHCPNOACKnowledge to reject the server-offered options.
– or –
3. a DHCPDECLINE message to indicate to the server the address is in use.
The client retains the information throughout the period of its lease.
The client sends a DHCPRELEASE message to release its IP address at the DHCP server when it is leaving the network.

Advantages Of DHCP

  • It simplifies the process of IP Address Management.
  • It is reliable as the automation helps in minimizing the errors that may arise due to manual IP address configuration.
  • It supports large networks as the DHCP server uses multithreading, that can process many client requests simultaneously.
  • Set up is less time consuming as the manual configuration is not required.
  • It offers a Centralized network client configuration as the configuration information is stored in one place, in the DHCP data store.

Disadvantages of DHCP

  • The client is unable to access the network in the absence of a DHCP Server.
  • Major drawback is in terms of security as there is no secure mechanism of authentication for the client.
  • DHCP Server can be a single point of failure.
  • DHCP client implementations may not work properly with Windows Server 2003’s DHCP server.

Related Articles: DHCP vs RAR, P Snooping

  • Is DHCP a TCP?
  • No, DHCP doesn’t use TCP as transport protocol. A TCP requires unique IP addresses at both the end-points. While a DHCP uses 0.0.0.0 as the source IP address and 255.255.255.255 (broadcast) as the destination IP address, these IP addresses are not unique.
  • Name three types of address allocations supported by DHCP.
  • The three types of address allocations supported by DHCP are : Automatic allocation, Dynamic allocation and Manual Allocation.
  • What do you understand by the term DHCP relay agent?
  • The term DHCP relay agent is used for any host that forwards DHCP packets between DHCP clients and DHCP servers.
  • Should I keep the DHCP ON/OFF?
  • DHCP should be kept ON unless you have second DHCP server or you want to  configure each device manually.
  • Is DHCP good for gaming?
  • A streamlined network is the key in gaming, DHCP is good for gaming. DHCP automatically assigns the IP address to the network device (gaming console) with a physical network. But you need to be watchful of the unauthorized devices that can connect to the service.

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart