
Layer 2 Ping – Using the arping Tool
Introduction
The arping tool for Linux is the Layer 2 equivalent of the ping command. It is used to send ARP (Address Resolution Protocol) request messages to a destination host in a Local Area Network (LAN) . This is useful to test whether a particular IP address is in use and online in the network. The arping tool operates at OSI Layer 2, so it can only be used in local networks: ARP messages cannot be routed across routers or gateways. Many Linux distributions, including Backtrack, include arping by default.
When arping is run without parameters it will not do anything – except display the command line options:
$ arping ARPing 2.09, by Thomas Habets <thomas@habets.pp.se> usage: arping [ -0aAbdDeFpqrRuv ] [ -w <us> ] [ -S <host/ip> ] [ -T <host/ip ] [ -s <MAC> ] [ -t <MAC> ] [ -c <count> ] [ -i <interface> ] <host/ip/MAC | -B> For complete usage info, use --help or check the manpage.
Arping with an IP Address Argument
Now let’s see arping in action by supplying it with an IP address to probe. This is the most common way to use arping. Say we want to send…