Different hosts may have different requirements for the IP address lease. Servers need to use fixed IP addresses for a long time, while some PCs need temporarily assigned IP addresses.
To satisfy the preceding requirements, the DHCP server provides the following address allocation policies:
Manual address allocation: An administrator assigns fixed IP addresses to a few specific hosts, such as the WWW server.
Automatic address allocation: A server assigns fixed IP addresses to some hosts during their first entry to the network. The hosts can use these IP addresses for a long time.
Dynamic address allocation: A server assigns IP addresses with leases to clients. The clients need to apply for new IP addresses when the leases expire. Most hosts obtain IP addresses using this policy.
A DHCP server assigns IP addresses to a client in the following sequence:
Before assigning an IP address to a client, a DHCP server needs to ping the IP address to avoid an address conflict.
You can check whether there is a ping response of the address to be assigned within the specific time using the ping command. If no response is received after a specific time, the IP address is not in use and the server assigns it to the client, ensuring that the IP address assigned to the client is unique.
By default, two ping packets can be sent and the longest time to wait for a response is 500 ms.