Dynamic Host Configuration Protocol(DHCP) uses the DORA. Dynamic Host Configuration Protocol is the protocol of the application layer. It is used to provide Subnet Mask, Router Address, DNS Address, and Vendor Class Identifier. In fact, DHCP provides an automatic IP address to Hosts which want to connect to a network.
DORA is the process that is used by DHCP. DORA helps in providing an IP address to hosts or client machines. DORA is the process that follows some steps between the server and client. It gets the IP address from the centralized server. It consists of four-stage:
- Discover
- Offer
- Request
- Acknowledge
Now let’s see what happens when DHCP clients request a DHCP server an IP address. Let’s see what messages are exchanged between them in the process.
Note: In the network layer, DHCP messages are always broadcast. In the data link layer also DHCP messages are broadcast.
Step 1: DHCP Discover Message
This is the first message in the DORA process which helps in finding the DHCP server of the network. DHCP client will find the server by sending DHCP discover message. The broadcast message is sent to the network. As the DHCP client doesn’t know the IP address of the server so the message is broadcast with a destination IP is 255.255.255.255. And the source IP will be 0.0.0.0 as the client does not have any IP address. Here the DHCP discover message in the data link layer and network layer is always broadcast.
Source IP address: 0.0.0.0
Destination IP address: 255.255.255.255
Source MAC address: MAC address of DHCP clients
Destination MAC address: FF:FF:FF:FF:FF:FF
Step 2: DHCP Offer Message
DHCP server receives the discover message and it replays the DHCP client with the DHCP offer request. The server sends a DHCP offer message with filled information. It has information about the IP address and duration of time that a host can use. Here destination IP address will be 255.255.255.255 as the DHCP client still does not have its IP address. But this DHCP offer message is broadcast in the network layer and unicast in the data link layer.
Source IP address: IP Address of DHCP Server
Destination IP address: 255.255.255.255
Source MAC address: MAC address of DHCP Server
Destination MAC address: MAC address of DHCP clients
Step 3: DHCP Request Message
DHCP clients send the request message to the server when it receives a DHCP offer message from the server. This message tells the server that it accepts the IP address given by the server. Here destination address will be 255.255.255.255 means it’s again broadcast. The reason for this is there might be many DHCP servers in the network so the client may receive multiple offer messages and it will accept the request that reaches him first and send a broadcast message to eliminate other DHCP servers. Here source IP address will be 0.0.0.0 as the DHCP server hasn’t yet assigned an IP address to the client. DHCP Request Message is also a broadcast message.
Source IP address: 0.0.0.0
Destination IP address: 255.255.255.255
Source MAC address: MAC address of DHCP clients
Destination MAC address: MAC address of DHCP server
Step 4: DHCP Acknowledge Message
This is the last step or message in the DORA process. The DHCP server sends Acknowledge Message to the client when it receives the request message from the DHCP client. This message will contain the IP address and subnet mask that the server assigns to the client. Source IP address will be the IP address of the server. This will be again broadcast message as the destination IP address is 255.255.255.255. But it is unicast in the case of the data link layer.
Source IP address: IP Address of DHCP Server
Destination IP address: 255.255.255.255
Source MAC address: MAC address of DHCP server
Destination MAC address: MAC address of DHCP clients
So, this is the DORA process and when this process is over DHCP client will get its IP address. Here things to remember is
- DHCP Discover Message – Broadcast
- DHCP Offer Message – Broadcast in the network layer and unicast in the data link layer
- DHCP Request Message – Broadcast in the network layer and unicast in the data link layer
- DHCP Acknowledge Message – Broadcast in the network layer and unicast in the data link layer
Similar Reads
How does AI work?
Artificial Intelligence is a complex area of study with the number of technologies and methods combines in its structure making it rather vast field. What all of us should know about AI is its use of machine learning, deep learning, and neural networks cutting across. An AI systems generally apply a
7 min read
How does Frame Relay Work?
Frame Relay is a packet-switching network protocol that is designed to work at the data link layer of the network. It is used to connect Local Area Networks (LANs) and transmit data across Wide Area Networks (WANs). It is a better alternative to a point-to-point network for connecting multiple nodes
4 min read
How Does Solidity Works?
Solidity is a programming language that helps developers create special programs called smart contracts. These contracts are used on the Ethereum blockchain, Which is like a giant computer that runs Decentralized Applications (DApps). In this article, We will explain how Solidity works in a simple w
6 min read
How Does Devin AI Works ?
Devin AI is an autonomous software engineer, creÂated to change the way teÂams build any project. This AI can do reasoning, long-term planning, and keeÂp learning. Devin tackles hard engineering tasks on its own. It learns neÂw tech, builds apps from start to finish, finds and fixes code bugs, and
5 min read
How does an API Work ?
API stands for Application Programming Interface which helps software applications communicate with each other to exchange data, features, and functionality. This exchanged data is in the form of HTML, JSON, XML, and Text. In this article, we will discuss the workings of API. We will discuss the fol
4 min read
How does FTP Server Works?
Answer: An FTP server works by listening on a network for connection requests from FTP clients, allowing users to upload, download, and manage files on the server.An FTP (File Transfer Protocol) server operates as a central file storage location that can be accessed over a network using FTP, a stand
2 min read
How Does Google Map Works?
Google Maps is a unique web-based mapping service brought to you by the tech giant, Google. It offers satellite imagery, aerial photography, street maps, 360° panoramic views of streets, real-time traffic conditions, and route planning for traveling by foot, car, bicycle, or public transportation. A
10 min read
How ping commands work?
Answer: Ping is a network utility Command which helps to measure the round-trip time for messages sent to that host, and tests whether another computer or device on a network can be reached. In its operations, it makes use of Internet Control Message Protocol (ICMP) to send âecho requestâ packets ai
2 min read
How Does Dual Band WiFi Work?
Answer: A wireless router or access point's ability to work at the same time in two distinct frequency bands: 2.4 GHz and 5 GHz is what is referred to as dual-band WiFi. This function increases the flexibility plus performance of a WiFi network that interferes with fewer other devices while also acc
2 min read
How DNS Works Step by Step?
Answer: DNS stands for Domain Name System and is the important element of internet that is used to match the domain names provided by users to a IP address of that domain. Below is the working of DNSStep 1: Query from client to DNS ServerWhen the client sends the request with the target domain name,
2 min read