≡ Menu

ping command

Q. I'm not able to run tracepath or tracepath6 under Debian Linux. tracepath is default under CentOS Linux. How do I install tracepath command under Debian Linux 4.x server? How do I find out what package owns the command under Debian / Ubuntu Linux?
[click to continue…]

Q. How do I install Netgear WG311 (Marvell 88w8335 Chipset) Rev 03 PCI wireless card driver under Ubuntu / Debian Linux operating system? How do I configure WPA authentication using Netgear wireless router and this card?
[click to continue…]

Q. How do I install NdisWrapper and wpa_supplicant under Ubuntu Linux?
[click to continue…]

Q. How do I change existing name server IP address? How do I configure DNS name server IP address under Ubuntu Linux / Debian Linux? How do I configure DNS name resolution under Ubuntu Linux?
[click to continue…]

Linux Share a Dial Up Internet Connection

Q. My modem is connected to CentOS Linux server. I'm using wvdial to connect to my ISP; I'd like to connect my laptop via same modem. How do I share a dial up Internet account?
[click to continue…]

Q. How do I find out if all host computers on the LAN are alive or dead from a Linux or Windows XP computer? My network subnet range is 192.168.1.0/24 and I'm using dual boot Debian Linux / XP SP2 computer.
[click to continue…]

Q. I run quite large network with different subnets. I'd like to know how can I find out duplicate IP address under Linux / UNIX?

A. You can use arpping command. The arping utility performs an action similar to ping command, but at the Ethernet layer. You can send ARP REQUEST to a neighbor host / computers.

Task: Send ARP request

Let us find out reachability of an IP on the local Ethernet with arping i.e send ARP request 192.168.1.1:
$ sudo arping -I eth0 -c 3 192.168.1.1
Output:

ARPING 192.168.1.1 from 192.168.1.106 ra0
Unicast reply from 192.168.1.1 [00:18:39:6A:C6:8B]  2.232ms
Unicast reply from 192.168.1.1 [00:18:39:6A:C6:8B]  1.952ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)

Where,

  • -I eth0 : Specify network interface i.e. name of network device where to send ARP REQUEST packets. This option is required.
  • -c 3 : Stop after sending 3 ARP REQUEST packets

Task: Find duplicate IP

The -D option specifies duplicate address detection mode (DAD). It returns exit status 0, if DAD succeeded i.e. no replies are received.
$ sudo arping -D -I eth0 -c 2 192.168.1.1
If 192.168.1.1 duplicated you should see zero exit status:
$ echo $?
Always use following syntax for duplicate address detection with arping:
$ sudo arping -D -I <interface-name> -c 2 <IP-ADDRESS-TO-TEST>
$ echo $?

References: