oping - Tutorial on How to Use oping With Examples

Printer-friendly versionPDF version
oping - Tutorial on How to Use oping With Examples

oping uses ICMPv4 or ICMPv6 ECHO_REQUEST packets to measure a hosts reachability and the network latency. In contrast to the original ping utility, oping can send ICMP packets to multiple hosts in parallel and wait for all ECHO_RESPONSE packets to arrive. In contrast to the fping utility, oping can use both, IPv4 and IPv6 transparently and side by side. oping also includes noping, an ncurses-based version.

To install, run the following command:

Ubuntu: sudo apt-get install oping

openSUSE: sudo zypper install oping noping

In its most simple form you can use oping just like ping:

oping 8.8.8.8

You can ping a list of hosts by adding the "-f" switch and providing a host-list file. By default, it will ping each host in the list consecutively, once every second:

oping -f host_list.txt

oping - Tutorial on How to Use oping With Examples 1

You can also assign QOS for your outgoing packets by adding the "-Q" switch. There are several predefined "per-hop behaviors" listed in the man file. In this example, we're using 'ef' (Expedited Forwarding):

oping -Q ef 172.31.0.251

Perhaps my favorite feature of oping is the ncurses-based version named noping. You can use noping to show colors and real-time statistics in the terminal:

noping 4.2.2.1

oping - Tutorial on How to Use oping With Examples 2

You can send 10 ping packets by adding the -c switch. You can also specify the packet send interval in seconds by adding the -i switch. This example sends 10 ping packets at an interval of .5 seconds:

oping - Tutorial on How to Use oping With Examples 3

Post new comment