Wednesday, October 24, 2012

arping utility in Linux

The arping utility is part of the iputils-arping package in Debian like systems.

It is very useful for finding out if an IP number is already taken in a local network.

The syntax should be:

~$ arping -D -I eth0 -c 3
ARPING from eth0
Sent 3 probes (3 broadcast(s))
Received 0 response(s)

No IP in this case.

~$ arping -D -I eth0 -c 3
ARPING from eth0
Unicast reply from [00:21:70:6A:EA:48]  0.754ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

One IP found.

-D Duplicate  address  detection  mode  (DAD).  See RFC2131, 4.4.1. Returns 0, if DAD succeeded i.e. no replies are received.

No comments: