Terminating a Lease
A client can give up its lease on an address before the lease expires by sending a
DHCPRELEASE message. A user might want to send a DHCPRELEASE message from a
computer that is about to be moved from one subnet to another, so the server
knows that the computer’s old address is immediately available for reassignment.
Some DHCP clients can be configured to send a
DHCPRELEASE each time the
computer is shut down.
The client sends its current address in the
DHCPRELEASE message and does not wait
for a response. The client stops using its old address as soon as it sends the
DHCPRE-
LEASE message, so the server cannot send a response to the client. And, as a practical
matter, a user won’t want to wait for the server to respond while the computer is
shutting down.
Updating a Client’s Configuration
A DHCP server can use the DHCPFORCERENEW message to update a client’s IP address
and configuration immediately, without waiting for the client to contact the server
with a
DHCPREQUEST or DHCPREBIND message. The server sends the DHCPFORCERENEW
message directly to the DHCP client, as described in the section “DHCPFORCERENEW
Messages” in Chapter 7. After the client receives the message, it goes to the RENEWING
state (refer to Figure 8.1). The client then contacts the server by sending a DHCPRE-
QUEST message. If the server only needs to update the client’s parameters, and not its
IP address, it can simply respond with a
DHCPACK message that contains the new
parameters. Otherwise, it responds with a
DHCPNAK message, forcing the client into
the
INIT state. At this point, the client continues by broadcasting a DHCPDISCOVER
message. Finally, the server responds, as described in the section “Obtaining an
Initial Configuration,” with the client’s new IP address and configuration informa-
tion.
Summary
Several interactions between DHCP clients and servers involve specific sequences of
messages. These interactions are designed to allow the clients to operate without
prior knowledge of the location of DHCP servers and to accommodate responses
from more than one server. The interactions also minimize the effect of network and
server failures on the client. The goal is to provide a robust protocol that enables
clients to function in the event of network problems.
When a DHCP client does not have an IP address, it uses a two-phase process to
locate a DHCP server and obtain an initial address. After the client has obtained an
address, it confirms that its address is still valid whenever the client restarts. A client
can contact the server and extend the lease on its address while the client is still
CHAPTER 16 Working with Graphs120
011 3273 CH08 10/3/02 5:00 PM Page 120