590 CHAPTER 56: 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 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. Each DHCP server thatreceives the DHCP-DISCOVER packet chooses an unassigned IP address from theaddress pool based on the IP address assignment policy and then sends aDHCP-OFFER packet (which carries the IP address and other configurationinformation) to the DHCP client. The transmission mode depends on the flag fieldin the DHCP-DISCOVER packet. For details, see “DHCP Packet Format” on page590.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: Upon receiving the DHCP-REQUEST packet, the DHCP serverreturns a DHCP-ACK packet to the DHCP client to confirm the assignment of theIP address to the client, or returns a DHCP-NAK packet to refuse the assignment ofthe IP address to the client. When the client receives the DHCP-ACK packet, itbroadcasts an ARP packet with the assigned IP address as the destination addressto detect the assigned IP address, and uses the IP address only if it does not receiveany response within a specified period.n The IP addresses offered by other DHCP servers (if any) are not used by the DHCPclient and are still available 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.If the DHCP client fails to update its IP address lease when half of the lease timeelapses, it will update its IP address lease by broadcasting a DHCP-REQUEST packetto the DHCP server again when seven-eighths of the lease time elapses. The DHCPserver performs the same operations as those described in the previous section.DHCP Packet Format DHCP has eight types of packets. They have the same format, but the values ofsome fields in the packets are different. The DHCP packet format is based on that