DHCP Server
Dr.Sudhir Kumar Mohapatra
www.sudhirmohapatra.in
+251-944740135
INTRODUCTION
Each computer that uses the TCP/IP protocol suite
needs to know its IP address. If the computer uses
classless addressing or is a member of a subnet, it also
needs to know its subnet mask. Most computers today
need two other pieces of information: the address of a
default router to be able to communicate with other
networks and the address of a name server to be able
to use names instead of addresses as we will see in the
next chapter. In other words, four pieces of information
are normally needed.
2
•Each host must have an Internet Protocol (IP)
address and a subnet mask, and if communicating
outside the local subnet, each must also have a
default gateway.
•Each IP address must be valid and unique within the
host’s internetwork.
•Manually managing IP addresses is a complex
tedious task.
•The Dynamic Host Configuration Protocol (DHCP)
simplifies this process by automating the assigning,
tracking, and reassigning of IP addresses.
3
DHCP is based heavily on BOOTP.
DHCP can dynamically allocate an IP address
from a pool of addresses and then reclaim it
when it is no longer needed.
Because this process is dynamic, no duplicate
addresses are assigned by a properly
configured DHCP server, and administrators
can move computers between subnets without
manually configuring them.
4
Four Key benefits to DHCP:
Centralized administration of IP configuration.
Dynamic host configuration.
Seamless IP host configuration.
Flexibility and scalability.
5
DHCP Terminology
DHCP client - A computer that obtains its
configuration information from DHCP.
DHCP server - A computer that provides
DHCP configuration information to
multiple clients.
The IP addresses and configuration
information that the DHCP server makes
available to the client are defined by the
DHCP administrator.
6
DHCP lease - This defines the duration
for which a DHCP server assigns an IP
address to a DHCP client.
The lease duration can be any amount of time
between 1 minute and 999 days, or it can be
unlimited.
The default lease duration is eight days.
7
DHCP Messages
All DHCP messages are carried in User
Datagram Protocol (UDP) datagrams
using the well-known port numbers 67
(from the server) and 68 (to the client).
UDP operates at the Transport Layer of
the OSI model and is a low-overhead
protocol because it does not use any type
of packet acknowledgement.
8
9
10
Automatic Private IP Addressing (APIPA)
If the DHCP client is unable to locate a DHCP
server and is not configured with an alternate
configuration, the computer configures itself
with a 169.254.0.0/255.255.0.0 address.
The auto-configured computer then tests to
verify that the IP address it has chosen is not
already in use by using a gratuitous ARP
broadcast.
If the chosen IP address is in use, the computer
randomly selects another address. The computer
makes up to 10 attempts to find an available IP
address. 11
DHCP OPERATION
The DHCP client and server can either be on the same
network or on different networks. Let us discuss each
situation separately.
12
Client and server on the same network
13
Client and server on two different networks
14
Use of UDP ports
15
DHCP packet format
16
Flag format
17
Option format
18
19
CONFIGURATION
The DHCP has been devised to provide static and
dynamic address allocation.
20
Option with tag 53
21
DHCP client transition diagram
22
Exchanging messages
23