How to check some host by arping without looking up the corresponding network interface?

Sometimes you have to check if some host replies on ARP “who-has” requests instead of simply pinging it. You probably need it when the host has its firewall configured to deny ICMP “echo” request (as you have probably noticed, most of hosts running Microsoft Windows Server are configured to ignore these requests) to check if the host is up. So, arping really helps, but to use it you have to look up the network interface on which you shall call for this host.

This simple script does it for you: it looks up for the corresponding network interface and calls the arping utility.

Just run it with any parameters you’d like to pass to arping, it will add the “-I” parameter and execute arping.

If I ever update this script, you can get the fresh version from GitHub:

P.S. I’d also suggest you to use arping by Thomas Habets – it doesn’t require you to indicate the interface, as it determines it by itself.

2 thoughts on “How to check some host by arping without looking up the corresponding network interface?

  1. Arping should be looking up the interface automatically.

    There is another, inferior, arping implementation that may not look up the interface, but mine does. At least assuming the machine is on that IP subnet.

    1. Thank you for clarification! As I see now, CentOS, RedHat and some other Linux-based operating systems have another utility that doesn’t have too much common with yours. Alas, it’s being installed by default, so for most of users arping requires the -I argument.

      I’ll edit the post a bit later to vindicate the truth 🙂

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.