DHCP Configuration 281
Figure65 Typical DHCP Application.
To obtain valid dynamic IP addresses, the DHCP client exchanges different types of
information with the server at different stages. One of the following three situations
may occur:
■A DHCP client logs into the network for the first time
When a DHCP client logs into the network for the first time, its communication
with the DHCP server includes these four stages:
■Discovery stage, the stage when the DHCP client looks for the DHCP server.
The client broadcasts the DHCP_Discover message and only the DHCP server
can respond.
■Offer stage, the stage when the DHCP server allocates the IP address. After
receiving the DHCP_Discover message from the client, the DHCP server
chooses an IP address still available in the IP address pool for the client, and
sends to the client the DHCP_Offer message containing the leased IP address
and other settings.
■Select stage, the stage when the client selects the IP address. If several DHCP
servers send DHCP_Offer messages to the client, the client only accepts the first
received one and then broadcasts DHCP_Request messages respectively to
those DHCP servers. The message contains the information of the IP address
request from the selected DHCP server.
■Acknowledge stage, the stage when the DHCP server acknowledges the IP
address. When receiving the DHCP_Request message from the client, the
DHCP server sends the DHCP_ACK message containing the allocated IP address
and other settings back to the client. Then the DHCP client binds its TCP/IP
components to the NIC (network interface card).
Other DHCP servers not selected still can allocate their IP addresses to other clients
later.
■A DHCP client logs into the network for a second time
When DHCP client logs into the network for a second time, its communication
with the DHCP server includes these stages:
■The client broadcasts the DHCP_Request message containing the IP address
obtained last time, other than the DHCP_Discover message.
■After the reception of the DHCP_Request message, the DHCP server returns
the DHCP_ACK message if the requested IP address is still not allocated, to
indicate the client to continue use of the IP address.
■If the requested IP address becomes unavailable (for example, having been
allocated to another client), the DHCP server returns the DHCP_NAK message.
After receiving the DHCP_NAK message, the client sends the DHCP_Discover
message to request another new IP address.
LAN
DHCP Server
DHCP Client DHCP Client
DHCP Client DHCP Client