DYNAMIC HOST CONFIGURATION PROTOCOL
(DHCP)
RELLA TIRUPATHI KELAM BHARADWAZ
B.TECH ECE B.TECH ECE
ROLL NO.164254 ROLL NO.164229
NATIONAL INSTITUTE OF NATIONAL INSTITUTE OF
TECHNOLOGY WARANGAL TECHNOLOGY WARANGAL
Email:tirupathirella1997@gmail.com Email:bharadwazkelam@gmail.com
ABSTRACT :- this paper introduces the to place, which means network
concept of implementing Dynamic Host administrators do not have to manually
Configuration Protocol(DHCP). It is an initially configure each device with a valid IP
application layer protocol used by hosts for address or reconfigure the device with a new
obtaining network setup information. The IP address if it moves to a new location on
DHCP is controlled by DHCP server the network. Versions of DHCP are available
that dynamically distributes network for use in Internet Protocol version 4 (IPv4)
configuration parameters such as and Internet Protocol version 6 (IPv6)
IP addresses, subnet mask and gateway
address. Disadvantage of manually Configuring
the host:
INTRODUCTION:- What is Dynamic host
Configuring a host when it is connected to
configuration protocol?
the network can be done either manually i.e.,
Dynamic – Automatically by the network administrator or by the DHCP
Host – Any computer that is server. In case of home networks, manual
connected to the network configuration is quite easy. Whereas in the
Configuration – To configure a host large networks, the network administrator
means to provide network might face many problems.
information(ip address,subnet Also, the manual configuration is prone to
mistakes. Say a Network administrator might
mask,Gateway address) to a host
assign an IP address which was already
Protocol – Set of rules assigned. Thus, causing difficulty for both
Summing up, a DHCP server dynamically administrator as well as neighbors on
configures a host in a network. network.
DHCP (Dynamic Host Configuration
Protocol) is a network management protocol So, here comes the use of DHCP server.
used to dynamically assign an Internet Before discussing about how DHCP server
Protocol (IP) address to any device, or node, works, lets go through the DHCP entities.
on a network so they can communicate
using IP. DHCP automates and centrally Configuring a host using DHCP:
manages these configurations rather than To configure a host, we require the following
requiring network administrators to manually things:
assign IP addresses to all network devices. Leased IP address :– IP address to a
DHCP can be implemented on small local host which lasts for a particular
networks as well as large enterprise duration which goes for a few
networks. hours,few days or few weeks.
Subnet Mask :– The host can know
DHCP will assign new IP addresses in each on which network it is on.
location when devices are moved from place
Gateway address: – The Gateway is
the Internet Service Provider that number for server is 67 and for the
connects user to the internet.The
client is 68. It is a Client server
Gateway address lets the host know
where the gateway is to connect to protocol which uses UDP services. IP
the internet.
address is assigned from a pool of
DHCP Entities :
addresses. In DHCP, the client and
DHCP server:- It automatically
provides network the server exchange mainly 4 DHCP
information(IPaddress, subnet mask,
gateway address) on lease. Once the messages in order to make a
duration is expired, that network
information can be assigned to other connection, also called DORA
machine. It also maintains the data
process, but there are 8 DHCP
storage which stores the available
IP addresses. messages in the process.
DHCP client:- Any node which
request an IP address allocation to a
network is considered as DHCP These messages are given as below:
client.
DHCP Relay Agent:- In case, we have
only one DHCP server for multiple 1. DHCP discover message :–
LAN’s then this Agent which
presents in every network forwards This is a first message generated in
the DHCP request to DHCP server.
the communication process between
So, using DHCP Relay Agent we can
configure multiple LAN’s with single server and client. This message is
server.
generated by Client host in order to
How DHCP server assigns IP address to discover if there is any DHCP
a host? server/servers are present in a
network or not. This message is
1. Subnet Mask (Option 1 – e.g.,
broadcasted to all devices present in
255.255.255.0)
a network to find the DHCP server.
2. Router Address (Option 3 – e.g.,
This message is 342 or 576 bytes
192.168.1.1)
long
3. DNS Address (Option 6 – e.g., 8.8.8.8)
4. Vendor Class Identifier (Option 43 –
e.g., ‘unifi’ = 192.168.1.9 ##where
unifi = controller)
DHCP is based on a client-server
model and based on discovery, offer,
request, and ACK..DHCP port
As shown in the figure, source MAC address
(client PC) is 08002B2EAF2A, destination
MAC address(server) is FFFFFFFFFFFF,
source IP address is 0.0.0.0(because PC has
no IP address till now) and destination IP
address is 255.255.255.255 (IP address used
for broadcasting). As the discover message
is broadcast to find out the DHCP server or
servers in the network therefore broadcast IP
address and MAC address is used. Now, for the offer message, source IP
address is 172.16.32.12 (server’s IP address
2. DHCP offer message: –
in the example), destination IP address is
The server will respond to host in
255.255.255.255 (broadcast IP address)
this message specifying the unleased
,source MAC address is 00AA00123456,
IP address and other TCP
destination MAC address is FFFFFFFFFFFF.
configuration information. This
Here, the offer message is broadcast by the
message is broadcasted by server.
DHCP server therefore destination IP
Size of message is 342 bytes. If there
address is broadcast IP address and
are more than one DHCP servers
destination MAC address is FFFFFFFFFFFF
present in the network then client
and the source IP address is server IP
host will accept the first DHCP
address and MAC address is server MAC
OFFER message it receives. Also a
address.
server ID is specified in the packet in
order to identify the server. Also the server has provided the offered IP
address 192.16.32.51 and lease time of 72
hours(after this time the entry of host will be
erased from the server automatically) . Also
the client identifier is PC MAC address
(08002B2EAF2A) for all the messages.
3. DHCP request message :–
When a client receives a offer
message, it responds by host broadcast the DHCP request message
broadcasting a DHCP request for the server showing the acceptance of IP
message. The client will produce a address and Other TCP/IP Configuration.
gratitutous ARP in order to find if
4. DHCP acknowledgement
there is any other host present in the
message:–
network with same IP address. If
In response to the request message
there is no reply by other host, then
received, the server will make an
there is no host with same TCP
entry with specified client ID and bind
configuration in the network and the
the IP address offered with lease
message is broadcasted to server
time. Now, the client will have the IP
showing the acceptance of IP
address provided by server.
address .A Client ID is also added in
this message.
Now, the request message is broadcast by
the client PC therefore source IP address is
0.0.0.0(as the client has no IP right now) and Now the server will make an entry of the
destination IP address is 255.255.255.255 client host with the offered IP address and
(broadcast IP address) and source MAC lease time. This IP address will not be
address is 08002B2EAF2A (PC MAC address) provided by server to any other host. The
and destination MAC address is destination MAC address is FFFFFFFFFFFF
FFFFFFFFFFFF. and the destination IP address is
255.255.255.255 and the source IP address is
Note – This message is broadcast after the
172.16.32.12 and the source MAC address is
ARP request broadcast by the PC to find out
00AA00123456 (server MAC address).
whether any other host is not using that
offered IP. If there is no reply, then the client
5. DHCP negative acknowledgement local configuration suitable for the
message: – client without allocating a new IP
Whenever a DHCP server receives a address. This DHCP ack message is
request for IP address that is invalid unicast to the client.
according to the scopes that is
Note – All the messages can be unicast also
configured with, it send DHCP Nak
by dhcp relay agent if the server is present in
message to client. Eg-when the
different network.
server has no IP address unused or
the pool is empty, then this message
is sent by the server to client.
6. DHCP decline: –
If DHCP client determines the offered
configuration parameters are
different or invalid, it sends DHCP
decline message to the server .When
there is a reply to the gratuitous ARP
by any host to the client, the client
sends DHCP decline message to the
server showing the offered IP
address is already in use.
7. DHCP release :–
A DHCP client sends DHCP release
packet to server to release IP address
and cancel any remaining lease time.
8. DHCP inform :–
If a client address has obtained IP
address manually then the client
uses a DHCP inform to obtain other
local configuration parameters, such
as domain name. In reply to the dhcp
inform message, DHCP server
generates DHCP ack message with