This post highlights the DHCP IP address conflict troubleshoot process. Please have a read below.
[Problem description]
A customer finds some users that have duplicate IP addresses. The IP addresses were assigned by the switch configured as DHCP Server. The example configuration is as below:
interface Vlanif3000
ip address 10.10.10.1 255.255.255.224 // Only 29 available IP addresses
dhcp select interface
dhcp server dns-list 172.16.0.2
[Analysis]
Found the following logs indicating the IP conflict:
Oct 1 2018 18:54:59-03:00 DC-S12704-01 %DHCP/4/DHCP_DHCP_ALLOC_ADDRESS(l)[1]:Result of IP address allocation from the DHCP server to wireless users. [WLAN_STA_INFO_IP_CONNECTION]ACMAC:XX-XX-XX-XX-XX-XX;ACNAME:ACNAME;APMAC:XX-XX-XX-XX-XX-XX;APNAME:APNAME;USER:X;MAC:XX-XX-XX-XX-XX-XX;TIME:1538430899;ZONE:UTC-0300;DAYLIGHT:false;ERRCODE:105;RESULT:INCORRECT REQUEST IP OR MAC;
Also the command display ip pool shows many IP addresses in conflict:
<DC-S12704-01>display ip pool
-------------------------------------------------------------------------------
Pool-name : Vlanif3000
Pool-No : 0
Lease : 1 Days 0 Hours 0 Minutes
Position : Interface Status : Unlocked
Gateway-0 : -
Network : 10.10.10.0
Mask : 255.255.255.224
VPN instance : --
Conflicted address recycle interval: -
Address Statistic: Total :29 Used :24
Idle :0 Expired :0
Conflict :5 Disable :0
-------------------------------------------------------------------------------
[Root cause]
There are many possible root causes:
1. Addresses are assigned manually;
2. The IP pool is very small;
3. Lease time is too long.
[Suggestions]
To avoid the IP address conflict, we suggest your to check the following:
1. Verify if no IP address is assigned manually. If so, make sure that the IP address is available.
2. The moment the switch detects a conflict, renew the IP address from the terminal device.
3. Decrease lease time in order to reduce the IP Address conflict incidences:
<HUAWEI>system-view
[HUAWEI]interfave vlanif3000
[HUAWEI-Vlanif3000]dhcp server lease minute Z
4. Configure an IP address conflict detection system, sending the X number of ICMP packets with Y timeout to an IP before assigning it:
<HUAWEI>system-view
[HUAWEI]dhcp enable
[HUAWEI]dhcp server ping packet X
[HUAWEI]dhcp server ping timeout Y