282 CHAPTER 24: DHCP OVERVIEW■ Dynamic assignment. The DHCP server assigns IP addresses to DHCP clients forpredetermined period of time. In this case, a DHCP client must apply for an IPaddress again at the expiration of the period. This policy applies to most clients.Obtaining IP AddressesDynamicallyA DHCP client undergoes the following four phases to dynamically obtain an IPaddress from a DHCP server:1 Discover: In this phase, the DHCP client tries to find a DHCP server by broadcastinga DHCP-DISCOVER packet.2 Offer: In this phase, the DHCP server offers an IP address. After the DHCP serverreceives the DHCP-DISCOVER packet from the DHCP client, it chooses anunassigned IP address from the address pool according to the priority order of IPaddress assignment and then sends the IP address and other configurationinformation together in a DHCP-OFFER packet to the DHCP client. The sendingmode is decided by the flag filed in the DHCP-DISCOVER packet, refer to “DHCPPacket Format” on page 283 for details.3 Select: In this phase, the DHCP client selects an IP address. If more than one DHCPserver sends DHCP-OFFER packets to the DHCP client, the DHCP client onlyaccepts the DHCP-OFFER packet that first arrives, and then broadcasts aDHCP-REQUEST packet containing the assigned IP address carried in theDHCP-OFFER packet.4 Acknowledge: In this phase, the DHCP servers acknowledge the IP address. Uponreceiving the DHCP-REQUEST packet, only the selected DHCP server returns aDHCP-ACK packet to the DHCP client to confirm the assignment of the IP addressto the client, or returns a DHCP-NAK packet to refuse the assignment of the IPaddress to the client. When the client receives the DHCP-ACK packet, it broadcastsan ARP packet with the assigned IP address as the destination address to detectthe assigned IP address, and uses the IP address only if it does not receive anyresponse within a specified period.n ■ After the client receives the DHCP-ACK message, it will probe whether the IPaddress assigned by the server is in use by broadcasting a gratuitous ARPpacket. If the client receives no response within specified time, the client canuse this IP address. Otherwise, the client sends a DHCP-DECLINE message tothe server and requests an IP address again.■ If there are multiple DHCP servers, IP addresses offered by other DHCP serversare assignable to other clients.Updating IP AddressLeaseAfter a DHCP server dynamically assigns an IP address to a DHCP client, the IPaddress keeps valid only within a specified lease time and will be reclaimed by theDHCP server when the lease expires. If the DHCP client wants to use the IP addressfor a longer time, it must update the IP lease.By default, a DHCP client updates its IP address lease automatically by unicasting aDHCP-REQUEST packet to the DHCP server when half of the lease time elapses.The DHCP server responds with a DHCP-ACK packet to notify the DHCP client of anew 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 thatthe IP address will be reclaimed when the lease time expires.