Check if an IP Is Taken on Your LAN with arping

Use arping to detect IP address conflicts at the ARP layer, which works even when firewalls block ICMP ping.

LinuxnetworkarpDiagnosticslanMedium risk
Run sudo arping -D -I eth0 192.168.1.50 before assigning the address — if another host answers the ARP probe, the IP is already in use.

01Command

Command
$ sudo arping -D -I eth0 192.168.1.50

02What it does

arping works at layer 2: it asks 'who has this IP?' on the local segment and waits for an ARP reply, so it succeeds even when ICMP ping is blocked by a host firewall. The -D flag puts it in duplicate address detection mode, the same idea RFC 5227 uses when a host claims an address. Exit status is non-zero when a conflict is found, which makes it easy to use in scripts that pick a free static IP.

03Risk

RiskMedium risk
Requirementsiputils-arping (or arp-scan's arping); root for -D duplicate-detection mode
!Warning: ARP only travels within the local broadcast domain — arping cannot probe addresses behind a router, and -D requires root.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • arping(8) — send ARP REQUEST to a neighbour host
    Debian manpages · community · 2026-09-17
    Evidence: Page documents -U/unsolicited ARP mode and duplicate address detection; the string 'conflict' and the '-D' option appear in the man page text, confirming -D (duplicate address detection mode).
  • arping(8) — Linux man page (iputils)
    Ubuntu manpages · community · 2026-09-17
    Evidence: Man page text contains 'arping' usage with -I to select the interface and describes unsolicited ARP mode; confirms arping sends ARP REQUEST at layer 2.

Last verified: 2026-09-19 · Category: Network

06Related solutions