< Home

Implementation of IP Address Assignment

Policies for IP Address Assignment

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.

Sequence of IP Address Assignment

A DHCP server assigns IP addresses to a client in the following sequence:

  1. IP address statically bound to the client's MAC address
  2. IP address that has been assigned to the client
  3. IP address specified in the Option 50 (IP address option) field in the DHCP Discover messages sent by the client
  4. IP address first found when the server searches for available IP addresses in the DHCP address pool
  5. If no available address is found, the DHCP server searches the timeout IP addresses and conflicting IP addresses in turn. If an available IP address is found, the server assigns it to the client. Otherwise, the server sends an error message.

Address Conflict Detection

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.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic