Table of Contents
We have talked about what is DHCP (Dynamic Host Configuration Protocol) before. Here we will focus on DHCP Messages and their meanings. Like many other network protocols, DHCP also uses Messages to do its job. Let’s see How DHCP Works and what is the Role of DHCP Messages in DHCP IP Allocation Operation.
Here, firstly we will explain the main DHCP Messages for a successful DHCP IP Allocation Operation. In this operation four DHCP Message is used.
You can also learn Packet Tracer DHCP Configuration
You can watch DHCP Everview lesson also on Youtube!
For IP allocation, firstly, DHCP Client sends a Broadcast DHCP Discover Message. This DHCP Discover Messege ask this question :
DHCP Client ask this question to all the nodes. Because DHCP Discover Message is sent as Broadcast. Here, the destination port is UDP 68. In this message, there are some other required fields but the most important one is the MAC address of DHCP Client.
There is also one more important flag in DHCP Discover Message. This flag is “Broadcast Flag”. If this flag set to “1”, this means that DHCP Client is waiting Broadcast responses from the DHCP Server. But if it set to “0”, this means that DHCP Client is waiting Unicast responses from the DHCP Sercer. Even if this flag, the DHCP Server acts as its capability. In most cases, the responses of DHCP Server is Unicast.
All the nodes in the network receive the DHCP Discover Message. But, only the DHCP Server reply to this message with DHCP Offer Message. This DHCP Offer Message is sent as Unicast or Broadcast, according to the Broadcast Flag in DHCP Discover Message and DHCP Server capability.
The meaning of this message is :
When DHCP Client gets the DHCP Offer Messages, it determines one of the DHCP Server and sends a Broadcast DHCP Request Message that says, it select a DHCP Server. In this DHCP section, DHCP Client can get many offers from the different DHCP Servers. But, it selects only one of them. This is generally the first sender.
This message means that:
At this stage, accepted DHCP Server sends a DHCP Ack Message.In this messages assigned IP address and other IP informations are send to the DHCP Client. This message is again can be unicast or broadcast according to the Broadcast Flag in DHCP Discover Message and DHCP Server capability.
This message means that:
The scenario above is the scenario if everything is going good. But what if a DHCP Client request an IP addres and the requested IP address is not available in DHCP Server? At this time, DHCP Server sends a DHCP NAK Message.
This message means:
The other message is DHCP Release Message. This message is used when the DHCP Client want to release the associated IP address.
This message means:
DHCP Decline Message is sent from DHCP Client to DHCP Server when the IP that is offered is alread in use.
This means that :
“I can not use this IP, it is alredy in use.”
DHCP Inform Messages is sent from DHCP Client to Server that it has already ahs IP address but needs additional IP information.
This means that :
You can find the detailed DHCP Messages and Their Meanings below. This list will be your guide for DHCP IP Allocation Operation.
Basically, DHCP IP Allocation Operation is achieved with this messages like above.
IP addresses are assigned to the DHCP Clients for a lease time. In this lease time the IP address that is assigned by DHCP Server, needs to be renewed.
For renew process, there are some important time periods. Think about it. If we say X to the Lease time, at the half of this time (x/2),at X1, DHCP Client must renew this address with its DHCP Server.
At the 7/8 of this time, at X2, DHCP Client must renew this IP address with any DHCP Server.
If these processes unsuccessful, at the lease time, the IP address is expired and can not be used.
X = Lease Time
X1=X/2 = Own DHCP Server Renewal
X2=7X/8 = Any DHCP Server Renewal