DHCP
DHCP
19.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
DHCP-Dynamic Host Configuration Protocol
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
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