Hi all,
When querying the IP pool information, sometimes we can see the conflicting IP addresses. In this post, I will share with you why the conflicting IP address exists in the IP pool, what is the impact, and how to avoid this situation.
<Huawei>display ip pool interface vlanif1950 all
Pool-name : vlanif1950
Pool-No : 8
Lease : 1 Days 0 Hours 0 Minutes
Domain-name : -
DNS-server0 : xx.xx.xx.xx
DNS-server1 : xx.xx.xx.xx
NBNS-server0 : -
Netbios-type : -
Position : Interface
Status : Unlocked
Gateway-0 : 10.0.0.1
Mask : 255.255.252.0
VPN instance: --
-----------------------------------------------------------------------------
Start End Total Used Idle(Expired) Conflict Disable
-----------------------------------------------------------------------------
10.0.44.1 10.0.47.254 1021 396 481(299) 142 2
-----------------------------------------------------------------------------
DHCP detects IP address conflict in either of the following ways:
1.Using ICMP detection. After receiving the DHCP discover packet, the DHCP server sends an ICMP packet to detect the conflict before responding to the DHCP offer packet. If the DHCP server receives the ICMP response packet, the DHCP server considers that the IP address is already used by another user and sets the IP address to the conflict state. Then, the DHCP server waits for the client to retransmit the DHCP discover packet and allocates another IP address.
2. Using gratuitous ARP. When a DHCP client goes online in two or four steps, it sends a gratuitous ARP packet after receiving a DHCP ACK packet. If the DHCP client receives an ARP response packet, it considers that the IP address has been occupied by another user. Then the DHCP client sends a DHCP decline packet to the DHCP server and re-applies for an IP address after going online in four steps, after receiving the DHCP decline packet, the DHCP server sets the IP address to the conflict state.
The possible causes of IP address conflict are as follows:
1. The user manually configured a static IP address. However, the DHCP server does not exclude the IP address from the IP pool, causing a conflict.
Locating method: Ping the conflicting IP from the DHCP server. If the IP address can be pinged, search for the ARP entry of the IP address and the corresponding MAC address to check whether a static IP address is configured for the MAC address.
Solution: Run the excluded-ip-address command to exclude the IP address from the IP pool.
2. The IP pool information has been cleared. For example, after the device is powered off and restarted, the IP pool is reset, or the IP pool is deleted, the IP pool information is cleared.
Locating method: View device logs, search for keywords such as reset and ip pool, and check whether the IP pool is cleared or deleted.
Solution: If the device needs to be restarted, run the dhcp server database enable command to save the IP pool information to the hard disk, and run the dhcp server database recover command to restore the IP pool information when the device is restarted. If the IP pool is reset or deleted, the IP address is automatically released after the lease expires.
Impact of conflicting IP addresses in the IP pool:
When the IP pool detects a conflicting IP, it will allocate other free IP addresses to avoid IP conflicts in the network. It is a protection against network IP conflicts and generally does not require attention.
If a few conflicting IP addresses exist in the IP pool, users with fixed IP addresses may exist on the network. You are advised to exclude these IP addresses from the IP pool. If a large number of conflicting IP addresses exist in the IP pool, the IP pool information has been cleared. You are advised to reduce or avoid clearing IP pool information. If the device is frequently powered off and restarted, Configure the IP pool storage function.
Common questions about conflicting IP addresses in the IP pool:
1. Can IP addresses in the conflicting state be allocated in an IP pool?
If no idle IP address exists in the IP pool, the device automatically reclaims the conflicting IP address and assigns it to the user.
Modular switches running V100R002 do not support automatic reclaim. You need to run the reset ip pool name xxx conflicted command to manually reset conflicting IP addresses.
Modular switches of V100R003 and later versions can automatically reclaim conflicting IP addresses. Fixed switches of V100R005 and later versions can automatically reclaim conflicting IP addresses.
2. Is the function of proactive IP pool conflict detection enabled by default? What is the command used for this function?
By default, the ip pool conflict detection function is enabled on fixed switches, modular switches in V200R005 and later versions, AR routers in V200R007 and later versions, and WLAN devices.
You are advised to enable the function. By default, use the following default value:
dhcp server ping packet 2 //Send two ICMP requests.
dhcp server ping timeout 500 //After an ICMP request is sent, if no response is received within 500 ms, the next ICMP request is sent.
This is what I want to share with you today, thank you!