IP address conflict

On this page 8

An IP address conflict is the condition in which two or more hosts on the same broadcast domain use the same IP address at the same time, so that traffic meant for one device reaches the other or is lost. In networking, it is one of the most common faults of address configuration, because every IPv4 and IPv6 interface must hold an address that is unique within its subnet for delivery to work.

The fault is rarely total. Instead, it produces intermittent connectivity, dropped sessions and confusing symptoms that depend on which device answered the most recent address resolution request, which is why administrators often misdiagnose it as a cabling, Wi-Fi or application problem.

How an IP address conflict disrupts delivery

An IP address conflict disrupts delivery because the local network maps each IP address to exactly one hardware address. On IPv4, the Address Resolution Protocol (ARP) translates an IP address into a MAC address, and every host and router keeps the answer in an ARP cache for seconds to minutes.

When two hosts share one address, both reply to ARP requests. Neighbors then store whichever reply arrived last, and that entry can flip back and forth as each host sends traffic or gratuitous announcements. The result is ARP cache flapping: a TCP session established with one machine suddenly receives segments from the other, which answers with resets, and the connection drops.

On IPv6, the same role belongs to the Neighbor Discovery Protocol, which replaces ARP with Neighbor Solicitation and Neighbor Advertisement messages. IPv6 includes a built-in safeguard, described below, yet conflicts still occur when that safeguard is disabled or when a duplicate appears after the address has already been accepted.

The following table summarizes how the conflict appears at each layer of the stack.

LayerWhat happensTypical symptom
Data linkSwitch MAC table and ARP caches point to alternating hostsPacket loss, duplicate replies to ping
NetworkRouter forwards inbound traffic to the wrong machineRemote services unreachable at random
TransportTCP segments reach a host with no matching sessionConnection resets, stalled downloads
ApplicationClients authenticate against the wrong serverLogin failures, certificate warnings
Symptoms of a conflict by network layer

Common causes of duplicate addresses

Most conflicts arise when two independent assignment mechanisms hand out addresses from the same pool without knowing about each other. The classic case is a static IP address configured manually inside the range that a DHCP server also leases dynamically.

The table below lists the causes that practitioners encounter most often and the mechanism behind each one.

CauseMechanismHow common
Static address inside the DHCP scopeDHCP server leases an address already set by handVery common
Rogue DHCP serverConsumer router or test VM serves overlapping leasesCommon in offices
Two DHCP servers with overlapping scopesFailover configured without split or synchronizationOccasional
Cloned virtual machineImage copied with its static configuration intactCommon in labs
Lost lease databaseServer restarts and reissues addresses still in useOccasional
Device resuming from sleepLaptop keeps an expired lease that was reassignedOccasional
Frequent causes and their mechanism

A related but distinct fault is a MAC address conflict, in which two interfaces share one hardware address. It produces similar flapping in the switch forwarding table, but the fix lies at the data link layer rather than in address configuration.

Built-in duplicate detection in IPv4 and IPv6

Modern operating systems test an address before using it, a process known as duplicate address detection. On IPv4, a host sends an ARP probe with a sender address of 0.0.0.0, as specified in RFC 5227, and abandons the address if any other host replies. Afterward it sends a gratuitous ARP announcement so that neighbors update their caches.

On IPv6, Duplicate Address Detection (DAD) is mandatory under the SLAAC specification. The host places a new address in a tentative state, sends a Neighbor Solicitation to the solicited-node multicast group and only marks the address as preferred if no answer arrives, typically within about one second.

Detection also exists on the server side. Many DHCP servers send an ICMP echo request to an address before offering it, and clients may send a DHCPDECLINE message when their own ARP probe reveals that the leased address is already taken.

MechanismProtocol familyWho performs itMain limitation
ARP probeIPv4Host before using an addressMisses hosts that are offline at test time
Gratuitous ARPIPv4Host after configuring an addressAnnounces but does not prevent a clash
IPv6 DADIPv6Host for every new unicast addressCan be disabled or lost on lossy links
DHCP ping checkIPv4DHCP server before an offerFirewalled hosts do not answer ICMP
DHCPDECLINEIPv4Client after receiving a leaseDepends on client support
Detection mechanisms compared

The essential weakness of all these methods is timing: they detect a duplicate only at the moment of configuration. If one device is powered off during the test and returns later, both machines may run with the same address until a user notices the symptoms.

Diagnosing an IP address conflict

Diagnosis aims to identify both MAC addresses that claim the contested IP address and then find the physical or virtual devices behind them. Operating systems often report the conflict directly; Windows, for example, logs a system event naming the other hardware address.

  1. Clear the local ARP cache and ping the contested address repeatedly while watching which MAC address appears.
  2. Use a tool such as arping with duplicate detection mode, which sends ARP requests and reports more than one responder.
  3. Check the DHCP server log and lease table for the address and compare it with known static assignments.
  4. Look up each MAC address in the switch MAC address table to locate the access port, and use the vendor prefix to identify the device type.
  5. Review security features such as DHCP snooping and dynamic ARP inspection logs, which often record the second claimant.

A packet capture filtered for ARP traffic is the most conclusive evidence, because it shows two different senders replying for the same address within a short interval.

Preventing conflicts in address planning

Prevention depends on one authoritative source of truth for address assignment. Administrators separate the subnet into ranges reserved for infrastructure, static servers and the dynamic DHCP pool, and they document every manual assignment in an IP address management system.

The decision table below matches typical situations with the preventive measure that addresses them.

SituationRecommended measureReason
Printers and servers need fixed addressesUse a DHCP reservation outside or inside the poolServer knows the address is taken
Manual static assignments are unavoidableExclude a dedicated static range from the scopePools never overlap
Unauthorized routers appear on the LANEnable DHCP snooping on access switchesUntrusted ports cannot send offers
Two DHCP servers provide redundancyConfigure failover or split scopesLeases stay synchronized
Virtual machines are cloned oftenUse DHCP or regenerate configuration on first bootImages carry no fixed address
Preventive measures by situation

Misconceptions and edge cases

  • A conflict involving the default gateway address affects every host on the subnet and can look like a complete outage.
  • Restarting the affected computer may appear to fix the problem only because it wins the ARP race temporarily.
  • Addresses in different subnets or behind different routers do not conflict; uniqueness is required only within one broadcast domain.
  • Intentional sharing is not a conflict: protocols such as VRRP and anycast designs deliberately assign one address to several devices with coordinated control.

In plain words

Every device on a network needs its own address, much like every apartment in a building needs its own number. An IP address conflict happens when two devices end up with the same number. Mail for one apartment then lands at the other door, or bounces between both.

The key point is that each address must belong to only one device on the local network. When it does not, connections work for a moment and then fail. The usual fix is to give one device a different address and make sure that only one system hands out addresses.

A real-world example

A small accounting office uses a router that leases addresses from 192.168.1.100 to 192.168.1.199. A technician installs a new network printer and sets it by hand to 192.168.1.120 inside the pool because that address seems free at the time. Two weeks later, a staff laptop returns from vacation and receives 192.168.1.120 from the DHCP server.

From then on, print jobs sometimes vanish and the laptop loses its file share connection several times an hour. The administrator pings the address, sees two alternating MAC addresses in the ARP cache and finds the printer through the switch port table. She moves the printer to 192.168.1.20, outside the dynamic pool, and records it as a reservation. Both devices work reliably again within minutes.