|
The DHCP client configuration process uses the following steps:

-
A client must have DHCP configured when starting the network
membership process. The client sends a request to a server
requesting an IP configuration. Sometimes the client may suggest
the IP address it wants, such as when requesting an extension to a DHCP lease. The client locates a DHCP server by sending a broadcast
called a DHCPDISCOVER.
-
When the server receives the broadcast, it determines whether it can
service the request from its own database. If it cannot, the server
may forward the request on to another DHCP server. If it can, the DHCP server offers the client IP
configuration information in the form of a unicast DHCPOFFER. The
DHCPOFFER is a proposed configuration that may include IP address,
DNS server address, and lease time.
-
If the
client finds the offer agreeable, it will send another broadcast, a DHCPREQUEST, specifically requesting those particular IP parameters.
Why does the client broadcast the request instead of unicasting it
to the server? A broadcast is used because the first message, the DHCPDISCOVER, may have reached more than one DHCP server. If more
than one server makes an offer, the broadcasted DHCPREQUEST allows
the other servers to know which offer was accepted. The offer
accepted is usually the first offer received.
-
The server that
receives the DHCPREQUEST makes the configuration official by sending
a unicast acknowledgment, the DHCPACK. It is possible, but highly
unlikely, that the server will not send the DHCPACK. This may happen
because the server may have leased that information to another
client in the interim. Receipt of the DHCPACK message enables the
client to begin using the assigned address immediately.
-
If the client detects that the address is already in use on the
local segment it will send a DHCPDECLINE message and the process
starts again. If the client received a DHCPNACK from the server after
sending the DHCPREQUEST, then it will restart the process again.
-
If the client no longer needs
the IP address, the client sends a DHCPRELEASE message to the
server.
Depending on an organization's policies, it may be possible for an end
user or an administrator to statically assign a host an IP address
that belongs in the DHCP servers address pool. Just in case, the Cisco
IOS DHCP server always checks to make sure that an address is not in
use before the server offers it to a client. The server will issue an
ICMP echo request, or will ping, to a pool address before sending the
DHCPOFFER to a client. Although configurable, the default number of
pings used to check for a potential IP address conflict is two.
|