By default, a DHCP client updates its IP address lease automatically by unicasting a DHCP-REQUEST
packet to the DHCP server when half of the lease time elapses. The DHCP server responds with a
ails to update its IP address lease when half of the lease time elapses, it will update
asting a DHCP-REQUEST packet to the DHCP servers again when
ime elapses. The DHCP server performs the same operations as those
described above.
DHC
ts. They have the same format, but the values of some fields in the
packets are different. The DHCP packet format is based on that of the BOOTP packets. The following
length, in bytes):
DHCP-ACK packet to notify the DHCP client of a new IP lease if the server can assign the same IP
address to the client. Otherwise, the DHCP server responds with a DHCP-NAK packet to notify the
DHCP client that the IP address will be reclaimed when the lease time expires.
If the DHCP client f
its IP address lease by broadc
seven-eighths of the lease t
P Packet Format
DHCP has eight types of packe
figure describes the packet format (the number in the brackets indicates the field
Figure 38-2
DHCP packet format
The fields are described as follows:
op: Operation types of DHCP packets, 1 for request packets and 2 for r
z
esponse packets.
z
CP packet passes. For each DHCP relay agent
nt initiates a DHCP request.
o identify that the DHCP response
s are reserved.
z
s that the DHCP server assigns to a client.
relay agent that the DHCP client passes after it sent the
z
dware address of the DHCP client.
z
htype, hlen: Hardware address type and length of the DHCP client.
hops: Number of DHCP relay agents which a DH
that the DHCP request packet passes, the field value increases by 1.
z
xid: Random number that the client selects when it initiates a request. The number is used to
identify an address-requesting process.
z
secs: Elapsed time after the DHCP clie
z
flags: The first bit is the broadcast response flag bit, used t
packet is a unicast (set to 0) or broadcast (set to 1). Other bit
z
ciaddr: IP address of a DHCP client.
yiaddr: IP addres
z
siaddr: IP address of the DHCP server.
z
giaddr: IP address of the first DHCP
request packet.
chaddr: Har
z
sname: Name of the DHCP server.
38-3