0% found this document useful (0 votes)
17 views14 pages

DHCP

Computer Network Protocol

Uploaded by

arunasekaran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views14 pages

DHCP

Computer Network Protocol

Uploaded by

arunasekaran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

Network Layer:

Dynamic Host Configuration


Protocol ( DHCP )

19.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
DHCP-Dynamic Host Configuration Protocol

A large organization or an ISP can receive a


block of addresses directly from ICANN and a small
organization can receive a block of addresses from
an ISP.
After a block of addresses are assigned to an
organization, the network administration can
manually assign addresses to the individual hosts or
routers.
However, address assignment in an organization
can be done automatically using the Dynamic Host
Configuration Protocol (DHCP).
DHCP-Dynamic Host Configuration Protocol

A network manager can configure


DHCP to assign permanent IP addresses to
the host and routers.
DHCP can also be configured to provide
temporary, on demand, IP addresses to
hosts.
The second capability can provide a
temporary IP address to a traveller to
connect her laptop to the Internet while she
is staying in the hotel.
DHCP-Message Format

DHCP is a client-server protocol in which the


client sends a request message and the server
returns a response message.
 Before we discuss the operation of DHCP, let
us show the general format of the DHCP
message in Figure 18.25.
Most of the fields are explained in the figure,
but we need to discuss the option field, which
plays a very important role in DHCP.
Figure 19.1 Dotted-decimal notation and binary notation for an IPv4 address

19.5
DHCP-Message Format

The 64-byte option field has a dual purpose. It can carry either
additional information or some specific vendor information.
The server uses a number, called a magic cookie, in the format
of an IP address with the value of 99.130.83.99.
When the client finishes reading the message, it looks for this
magic cookie. If present, the next 60 bytes are options.
An option is composed of three fields:
a 1-byte tag field,
a 1-byte length field, and
a variable-length value field.
There are several tag fields that are mostly used by vendors. If
the tag field is 53, the value field defines one of the 8 message
types shown in Figure 18.26. We show how these message types
are used by DHCP.
Option Format

19.7
DHCP-Operation

The DHCP protocol is four step process

DHCP Discover

DHCP Offer

DHCP Request

DHCP Ack
Option Format
Two Well Known ports

We said that the DHCP uses two well-known ports (68 and 67)
instead of one well-known and one ephemeral. The reason for
choosing the well-known port 68 instead of an ephemeral port
for the client is that the response from the server to the client is
broadcast. Remember that an IP datagram with the limited
broadcast message is delivered to every host on the network. Now
assume that a DHCP client and a DAYTIME client, for example,
are both waiting to receive a response from their corresponding
server and both have accidentally used the same temporary port
number (56017, for example). Both hosts receive the response
message from the DHCP server and deliver the message to their
clients. The DHCP client processes the message; the DAYTIME
client is totally confused with a strange message received
Using FTP

The server does not send all of the


information that a client may need for
joining the network. In the DHCPACK
message, the server defines the pathname
of a file in which the client can find
complete information such as the address
of the DNS server. The client can then use
a file transfer protocol to obtain the rest of
the needed information.
Error Control

DHCP uses the service of UDP, which is not reliable. To


provide error control, DHCP uses two strategies. First, DHCP
requires that UDP use the checksum. As we will see in Chapter
24, the use of the checksum in UDP is optional. Second, the
DHCP client uses timers and a retransmission policy if it does
not receive the DHCP reply to a request. However, to prevent a
traffic jam when several hosts need to retransmit a request (for
example, after a power failure), DHCP forces the client to use a
random number to set its timers..
Transition States

The previous scenarios we discussed for the


operation of the DHCP were very simple. To
provide dynamic address allocation, the DHCP
client acts as a state machine that performs
transitions from one state to another depending
on the messages it receives or sends. Figure
18.28 shows the transition diagram with the
main states.

You might also like