• Books
  • Movies
  • Sports
    • Football
    • Hockey
  • Tech
    • Apps
    • Networking
    • Virtualization
    • Linux
      • CentOS
      • Ubuntu
    • MacOS
    • Microsoft
  • Recipes
  • Family
  • About
  • Home.Lab Project
    • Home.Lab Hardware
      • Storage CentOS Server (Phoenix)
      • Centos Hypervisor (Cyclops)
      • CentOS Hypervisor (Wolverine)
      • Homegrown SuperMicro ESXi Hypervisor (Deadpool)
    • Networking
      • Hypervisor Network
      • Juniper SSG5 Configuration
      • Security Zone Configuration
    • Virtual Machines
      • Black Widow (RHEL 6.4)
    • Hypervisor Technologies
    • Tutorials
      • Creating an iSCSI Target in CentOS 6.4
      • Managing Linux Hypervisors through Windows
Home » Tech » Linux » How to detect duplicate IPs in linux

How to detect duplicate IPs in linux

Posted on August 10, 2013 by Vitaly Posted in Linux, Networking, Tech

While tools like nmap are excellent for scanning for IPs (specifically ports) sometimes you have to take it to the next level in case you get very slow or erratic responses from hosts on your network. Using the ARP layer, you can check to see the actual MAC addresses that are responding to your requests. The command that does this is called arping.

Example syntax:

sudo arping -I eth0 -c 3 192.168.1.175

This will ping the IP 192.168.1.175 (the -I means use ethernet port eth0) and request the MAC address (3 times, which is the -c modifier) back:

ARPING 192.168.1.175 from 192.168.1.165 eth0
Unicast reply from 192.168.1.175 [00:25:90:53:CA:F8]  0.694ms
Unicast reply from 192.168.1.175 [00:25:90:53:CA:F8]  0.760ms
Unicast reply from 192.168.1.175 [00:25:90:53:CA:F8]  0.761ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)

Obviously check to make sure you get the same MAC address each time. If not, then you have a dup. If you do see a different MAC then obviously you have two machines with that same IP. But if you want to lookup which ARP-to-IP of any machine is, try running:

arp -n | grep -i "00:25:90:66:28:FC"

Which in my personal case returns (this was not a duplicate IP, just showing the output of the command; if you run just arp -n on a small network, you can track down the dup. On a large network, this can be a pretty long chart).

Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.1.165            ether   00:25:90:66:28:FC   C                     eth0
« Configure MacOS to act as NTP Time Server
Resetting lost password on MacOS Lion or Mountain Lion »

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *

Around the Way

August 2013
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Jul   Jan »

Recent Posts

  • Getting spice client console working in Virt-Manager for Mint 19
  • Using RealVNC in Windows to connect to a KVM session
  • Switching the default user when using SSH
  • X-Men Apocalypse Movie Review
  • Getting Virt-Manager working in Ubuntu 16.04 LTS bypassing openssh-askpass

Old School

  • September 2018
  • August 2016
  • July 2016
  • June 2016
  • April 2016
  • February 2016
  • January 2016
  • August 2013
  • July 2013
  • April 2013
  • February 2013
  • December 2012
  • November 2012

Archives

  • September 2018
  • August 2016
  • July 2016
  • June 2016
  • April 2016
  • February 2016
  • January 2016
  • August 2013
  • July 2013
  • April 2013
  • February 2013
  • December 2012
  • November 2012

Recent Posts

  • Getting spice client console working in Virt-Manager for Mint 19
  • Using RealVNC in Windows to connect to a KVM session
  • Switching the default user when using SSH
  • X-Men Apocalypse Movie Review
  • Getting Virt-Manager working in Ubuntu 16.04 LTS bypassing openssh-askpass
© Chubby Apple