52
C
11: DHCP/BOOTP C
HAPTER
C
LIENT
ONFIGURATION
Figure 22 Interaction between a DHCP client and a DHCP server
DHCP Client
DHCP Client
DHCP Client
DHCP Client
DHCP Client
DHCP Client
DHCP Client
DHCP Client
DHCP Client
DHCP Client
DHCP Client
DHCP Client
To obtain valid dynamic IP addresses, a DHCP client exchanges different information
with the DHCP server in different phases. Usually, the following three modes are
involved:
1 The DHCP client accesses the network for the first time
In this case, the DHCP client goes through the following four phases to establish
connections with the DHCP server.
Discovery. The DHCP client discovers a DHCP server by broadcasting
■
DHCP_Discover packets in the network. Only the DHCP servers respond to this
type of packets.
Offer. Upon receiving DHCP_Discover packets, a DHCP server select an available IP
■
address from an address pool and sends a DHCP_Offer packet that carries the
selected IP address and other configuration information to the DHCP client. The
DHCP client only accepts the first-arrived DHCP_Offer packet (if there are many
DHCP servers), and broadcasts a DHCP_Request packet to each DHCP server. The
packet contains the IP address carried by the DHCP_Offer packet.
Acknowledgement. Upon receiving the DHCP_Request packet, the DHCP server
■
that owns the IP address the DHCP_Request packet carries sends a DHCP_ACK
packet to the DHCP client. In this way, the DHCP client binds TCP/IP protocol
components to its network adapter.
IP addresses offered by other DHCP servers (if any) through DHCP_Offer packets
■
but not selected by the DHCP client are still available for other clients.
r
r
r
DHCP Server
DHCP Server
DHCP Server
DHCP Server
DHCP Server
DHCP Server
DHCP Server
DHCP Server
DHCP Server