You are on page 1of 24

DHCP Protocol

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000


18-1 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.
TCP/IP Protocol Suite 2
DHCP

TCP/IP Protocol Suite 3


DHCP
 DHCP is a client server application

 DHCP server hands out configuration data, based on the


administrator’s policy, to a requesting client

 DHCP provides four pieces of information to a system


 IP address of computer

 Subnet mask of computer

 IP address of router

 IP address of DNS server

TCP/IP Protocol Suite 4


Predecessors to DHCP

 RARP
 BOOTP

TCP/IP Protocol Suite 5


Predecessors to DHCP
 RARP – deprecated because
 First, RARP used the broadcast service of the data link layer,
which means that a RARP server must be present in each
network.
 Second, RARP can provide only the IP address of the computer
not other information that DHCP provides

 BOOTP
 Client- server program
 Static binding between physical address and IP address
 Binding is pre-determined

TCP/IP Protocol Suite 6


18-2 DHCP OPERATION

The DHCP client and server can either be on the


same network or on different networks.

TCP/IP Protocol Suite 7


Figure 18.1 Client and server on the same network

TCP/IP Protocol Suite 8


DHCP – same network

TCP/IP Protocol Suite 9


Figure 18.2 Client and server on two different networks

TCP/IP Protocol Suite 10


DHCP – different network

TCP/IP Protocol Suite 11


DHCP – different network

TCP/IP Protocol Suite 12


Figure 18.3 Use of UDP ports

TCP/IP Protocol Suite 13


Questions….
 Only servers use well known port. Why UDP port 68 for
client instead of ephemeral port?

 Say, DHCP client uses ephemeral port, what problems


could it cause?

 When 2 DHCP clients send broadcast message how will


they know which server response corresponds to which
client?

TCP/IP Protocol Suite 14


Figure 18.4 DHCP packet format

TCP/IP Protocol Suite 15


Figure 18.5 Flag format

TCP/IP Protocol Suite 16


Figure 18.6 Option format

TCP/IP Protocol Suite 17


TCP/IP Protocol Suite 18
18-3 CONFIGURATION

The DHCP has been devised to provide static and


dynamic address allocation.

TCP/IP Protocol Suite 19


Figure 18.7 Option with tag 53

TCP/IP Protocol Suite 20


DORA process in DHCP

TCP/IP Protocol Suite 21


DHCP Configurations
 Static address allocation

 Dynamic address allocation

TCP/IP Protocol Suite 22


Figure 18.8 DHCP client transition diagram

TCP/IP Protocol Suite 23


Figure 18.9 Exchanging messages

TCP/IP Protocol Suite 24

You might also like