Sunday, April 27, 2008

Detect Duplicate IP Address With arping command

A practical issue, especially for large network. arping sends ARP REQUEST to a neighbor host / computers.

$ sudo arping -I eth0 -c 3

ARPING from ra0
Unicast reply from [00:18:39:6A:C6:8B] 2.232ms
Unicast reply from [00:18:39:6A:C6:8B] 1.952ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)
  • -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

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

No comments: