Dynamic Host
Configuration
Protocol (DHCP)
DHCP Definition
The network capacity usually is limited and controlled by subnet
masking configurations.
No of machines to be
Class of network Network addresses
connected
254 or less C 92.168.0.0 to 192.168.255.0
255 to 65,534 B 172.16.0.0 to 172.31.0.0
65,535 to 16,777,214 A 10.0.0.0
10/03/2025 2
DHCP Definition
In this example,
if your network is within class A subnet mask, you can connect 65534 -16
millions devices
if your network is within class B subnet mask, you can connect 255- 65,534
devices.
if your network is within class C subnet mask, you can connect no more than
255 devices.
Usually, the small networks follows Class C configurations.
UTAR follows the class B
10/03/2025 3
DHCP Definition
Within this limited network capacity, Assigning IP address statically
to users is a waste.
Sometimes, I need the IP address for shorter time e.g.: during my office
hours or during drinking my coffee in Starbucks.
Therefore, the best option in such situation is to assign the IP
addresses among the users dynamically and on-demand.
DHCP is the responsible technique to do the dynamic assignment.
10/03/2025 4
DHCP
Let DHCP Definition
gives you
a dynamic
IP address
Rather
than Set it
up by
urself.
10/03/2025 5
DHCP Definition
DHCP is a client/server protocol that:
automatically and dynamically provides the connected hosts with : IP
addresses, subnet mask and default gateway configurations.
DHCP Server is the server that control the DHCP process.
DHCP is based on Bootstrap Protocol (BOOTP)
( RFCs 2131 and 2132)
Bootstrap Protocol (BOOTP) automatically assign an IP address to network
devices from a configuration server.
10/03/2025 6
DHCP vs. BOOTP
BOOTP
- Static IP
assignment
- Less
parameters DHCP
- Longer - Dynamic IP
process assignment
- More
parameters
- Fast process
10/03/2025 7
DHCP vs. BOOTP
Both protocols configure the same basic parameters:
IP address
net mask
the address of a default router
the address of a name server.
However,
BOOTP is static: the clients are unable to
rebind/renew the configurations except when the
system restarts
DHCP support additional parameters like flags to check
the status of client.
10/03/2025 8
DHCP vs. BOOTP
However, (cont’d)
DHCP performs the configuration is a single phase
Request offer Assign IP directly
BOOTP performs the configuration in two phases
(longer time) Phase 2
Phase 1
10/03/2025 9
How does DHCP work?
10/03/2025 10
How does DHCP work?
DHCP Client
DCHP DISCOVER 00:a0:24:71:e4:44 DHCP Server
The client broadcast a
DHCPDISCOVER
Sent to 255.255.255.255
request to all the available
servers within the network
DHCP Server
DHCP Client
DCHP OFFER 00:a0:24:71:e4:44 DHCPOFFER DHCP Server
The servers send back DHCPOFFER
their offers to the client
within the network
DHCP Server
11
How does DHCP work?
DHCP Client
DCHP REQUEST 00:a0:24:71:e4:44 DHCP Server
The client sends a
DHCPREQUEST
request to a particular
DHCPACK
server to accept using
this server’s DHCP Server
configuration.
Hi serverX, Do you
agree to use your
DHCP Client
configuration ? 00:a0:24:71:e4:44 DHCP Server
DHCPREQUEST
DCHP ACK
DHCPACK
The servers reply to
that
Atclient
this an
time, the DHCP client DHCP Server
acknowledgement
can start to use“Ithe IP 12
agree to use my
DHCP Renewal Operation
DHCP Client
DCHP REQUEST 00:a0:24:71:e4:44 DHCP Server
The client sends a
DHCPREQUEST
request before the
DHCPACK
leasing period expired
for renewal DHCP Server
DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCPREQUEST
DCHP ACK DHCPACK
The servers reply to
that client an
The client can now
acknowledgement to update DHCP Server
his/her
approve theTCP/IP configuration
renewal. 13
DHCP Release Operation
Renewal Request should be sent when 50%
of lease has expired;
if DHCP server sends DHCPNACK, then
address is released.
DHCP Client
DCHP RELEASE 00:a0:24:71:e4:44 DHCP Server
The client sends a
DHCPRELEASE
release request to free
up the IP address
DHCP Server
At this time, the DHCP client
has released the IP address 14
DHCP
Message
Messages Types
Function
DHCPDISCOVER Broadcast by a client to find available DHCP servers.
DHCPOFFER DHCP server’s Response offering IP address.
DHCPREQUEST Client’s message to request parameters from server, verify
previously allocated address, request extension.
DHCPDECLINE Client’s message informing the server that the offered address
is already in use.
DHCPACK Server’s Acknowledgement with IP and other parameters
DHCPNAK Negative Server’s Acknowledgement indicating that the client's
lease has expired or that a requested IP address is incorrect.
DHCPRELEASE Message from client to server canceling remainder of a lease
and relinquishing network address.
DHCPINFORM Message from a client that already has an IP address (manually
configured for example), requesting further configuration
parameters from the DHCP server.
10/03/2025 15
DHCP Message Format
Hardware Address
OpCode Hardware Type Hop Count
Length
Unused (in BOOTP)
Number of Seconds
Flags (in DHCP)
Transaction ID
Client IP address
Your IP address
Server IP address
Gateway IP address
Client hardware address (16 bytes)
Server host name (64 bytes)
Boot file name (128 bytes)
Options
10/03/2025 16
DHCP Pros
DHCP minimizes the administrative burden for manual Assignment.
IP reusability and Mobility support.
There is no chance to conflict IP address
DHCP servers are easy to administer and can be set-up in just a few
minutes
Client addresses are assigned automatically
By using DHCP relay agent, DHCP server can provide IP address to
another network
10/03/2025 17
DHCP Cons
Uses UDP, which is an unreliable and insecure protocol.
Some machines on the network need to be at fixed addresses, for
example servers and routers
You need to be able to assign a machine to run the DHCP server
continually as it must be available at all times when clients need IP
access.
18
Thank
you
10/03/2025 19