Quick Tip: Ping an IP Range From the Command Line

A few weeks ago I was finishing up some year-end infrastructure documentation and realized I had a wayward host on my network. Specifically, I’d lost a wireless access point. I had failed to document the access point’s IP address and wasn’t looking forward to aimlessly pinging hosts on my network and navigating to the hosts that responded in hopes of finding a web interface. While tools like Angry IP Scanner, which allows you to ping a pre-determined IP range and reports hosts that respond, exist for Windows I use OS X and CentOS daily and wanted a UNIX-native solution that would be reusable should I ever lose another host. With that goal in mind, I came up with a quick and dirty bit of shell script that’s nothing more than a simple for loop.
Continue reading “Quick Tip: Ping an IP Range From the Command Line”