Best Packet Loss Tools for Network Engineers

Packet Loss Definition

Packet loss of a digital transmission occurs when the data packets transmitted across a network fail to reach their destination. When this happens, the amount of data packets that reach the destination is a fraction of what was originally sent. Packet loss has a negative impact on applications and digital services as it causes data transmission to be inconsistent and unpredictable.

Packet loss

It’s crucial to be proactive by testing packet loss to identify issues early enough to take appropriate measures to resolve them. Discover all you need to know to test packet loss, including:

Effects of packet loss

Packet loss can have several negative implications on network performance and end-user experience. When packet loss happens, it will cause:

  • A reduction in throughput and page loading time due to the required retransmissions in the case of TCP connections.
  • Disruption of UDP communications in the case of real-time voice, video calls, etc.

For this reason, it’s important to detect and remediate packet loss as soon as possible. There are several tools and troubleshooting techniques available. Each one of them has a specific function, goal, and requirements.

Causes and possible solutions for packet loss

There are several possible causes of packet loss. When troubleshooting, it’s important to consider all of them. The troubleshooting process will help eliminate those that don’t apply to a specific case. Here are some of the most common causes and corresponding solutions for packet loss.

CAUSEPOSSIBLE SOLUTION
Hardware failures
Faulty network equipment or bad cabling such as dirty/faulty connectors or fiber optics.
Hardware upgrade or recabling.
Network congestion
When the traffic originated is higher than what the network can forward. Buffers will start filling up, and packets will get dropped.
Bandwidth or hardware upgrade.
Interferences
In wireless communications, interferences and obstacles induce packet loss.
Remove interference sources, change channels, or consider extenders/repeaters.
Configuration issues
For example speed-duplex mismatches between two neighbors, incorrect QoS parameters, etc.
Reconfiguration or QoS changes.

Tools for testing packet loss

Packet loss can be detected in different ways, and each method here listed has a specific context. It’s important to understand when it makes sense to use one or more approaches. In this section, we’ll introduce the tools that are capable of running packet loss tests:

Ping

Ping is the go to packet loss testing tool against a remote host. This packet loss test can be executed from any computer’s console, as almost any operating system supports it. When you execute ping, by default it sends one packet every second to the destination host that you passed as argument. If the destination host is up and running, reachable, and allowed to respond, it will reply with an echo_reply packet to each echo_request by the sender. If the network between the two hosts has packet loss, some of these echo_request/echo_reply packets will be lost. That’s what goes into the packet loss calculation.

The following output from a ping test against netbeez.net with 10 packets (option -c as count). The source receives only 9 out of 10 replies, so the packet loss is 10%.

% ping -c 10 netbeez.net
PING netbeez.net (141.193.213.10): 56 data bytes
64 bytes from 141.193.213.10: icmp_seq=0 ttl=59 time=8.135 ms
64 bytes from 141.193.213.10: icmp_seq=1 ttl=59 time=15.771 ms
64 bytes from 141.193.213.10: icmp_seq=2 ttl=59 time=16.383 ms
64 bytes from 141.193.213.10: icmp_seq=3 ttl=59 time=17.835 ms
64 bytes from 141.193.213.10: icmp_seq=4 ttl=59 time=9.219 ms
64 bytes from 141.193.213.10: icmp_seq=5 ttl=59 time=15.211 ms
64 bytes from 141.193.213.10: icmp_seq=6 ttl=59 time=8.148 ms
64 bytes from 141.193.213.10: icmp_seq=7 ttl=59 time=16.280 ms
Request timeout for icmp_seq 8
64 bytes from 141.193.213.10: icmp_seq=9 ttl=59 time=8.001 ms
--- netbeez.net ping statistics ---

10 packets transmitted, 9 packets received, 10.0% packet loss
round-trip min/avg/max/stddev = 8.001/12.905/17.835/3.817 ms

In Windows, just open a command prompt by typing cmd in the search bar next to the start menu. Once the command prompt opens, type ping followed by the remote IP or hostname. By default the windows ping runs 4 pings and then exists, reporting the packet loss. If you want to discover more ping options, read the article we wrote.

windows ping for packet loss

Iperf

Iperf is another packet loss test available that generates TCP or UDP traffic from one host to another. To use iperf, you need to run the iperf client on the sender host (iperf -c <server_address>), and the iperf server on the receiving host (iperf -s). When running in UDP mode (-u flag), iperf returns the amount of packets transmitted, and the packet loss. Iperf in UDP mode calculates the packet loss between two hosts. Read more about iperf in a previous article we wrote.

In the following example you can see a 10 Mbits/sec transfer with 0% packet loss.

------------------------------------------------------------
Client connecting to 10.0.20.5, UDP port 5001
Sending 1470 byte datagrams, IPG target: 1121.52 us (kalman adjust)
UDP buffer size: 0.16 MByte (default)
------------------------------------------------------------

[ 3] local 10.0.10.5 port 60603 connected with 10.0.20.5 port 5001
[ ID] Interval Transfer Bandwidth

[ 3] 0.0- 1.0 sec 1.22 MBytes 10.2 Mbits/sec
[ 3] 1.0- 2.0 sec 1.28 MBytes 10.8 Mbits/sec
[ 3] 2.0- 3.0 sec 1.25 MBytes 10.5 Mbits/sec
[ 3] 3.0- 4.0 sec 1.24 MBytes 10.4 Mbits/sec
[ 3] 4.0- 5.0 sec 1.26 MBytes 10.5 Mbits/sec
[ 3] 5.0- 6.0 sec 1.25 MBytes 10.5 Mbits/sec
[ 3] 6.0- 7.0 sec 1.25 MBytes 10.5 Mbits/sec
[ 3] 7.0- 8.0 sec 1.25 MBytes 10.5 Mbits/sec
[ 3] 8.0- 9.0 sec 1.25 MBytes 10.5 Mbits/sec
[ 3] 0.0-10.0 sec 12.5 MBytes 10.5 Mbits/sec
[ 3] Sent 8917 datagrams

[ 3] Server Report:
[ 3] 0.0-10.0 sec 12.5 MBytes 10.5 Mbits/sec 0.009 ms 0/ 8917 (0%)

MTR

MTR, which stands for Matt’s Traceroute, is another command line tool used to measure packet loss. This utility merges the functionalities of traceroute and ping. Like traceroute, it discovers all the routers between the source and destination, those at least that reply to requests. Like ping, it runs ping tests against all the discovered routers, and reports latency and packet loss.

MTR can be used to pinpoint issues at various points along the path(s) to the destination. In the following screenshot you can see that hops 3, 4, and 5 are having more than 25% of packet loss. That could indicate performance issues along the Internet path. Read about MTR in a previous article we wrote.

Testing packet loss with MTR tools

Speed test

NDT is a speed test utility that runs download and upload speed tests over an internet connection. Along with latency, download and upload speed, NDT also reports the TCP retransmissions. TCP retransmissions are an indication of packet loss. The consortium for open measurements called the M-LAB (Measurement Lab) hosts the majority of the NDT servers. Some servers are also hosted by third parties around the world. You can also host your own server if interested.

TCP retransmissions NDT

Interface statistics

If you manage a node that you discovered is dropping packets, check the interfaces counters on the interfaces where the traffic flows. The command or method to see interfaces’ counters errors changes based on the vendor and platform. The good news is that you may be able to find the root cause of packet loss.

The following example illustrates the show command on a Cisco switch returns the number of frames with alignment, FCS (checksum), transmit, receive, and undersize errors.

#show interfaces counters errors 

Port        Align-Err    FCS-Err   Xmit-Err    Rcv-Err UnderSize
Fa0/1               0          0          0          0         0
Fa0/2               0          0          0          0         0
Fa0/3               0          0          0          0         0
Fa0/4               0          0          0          0         0
Fa0/5               0          0          0          0         0
Fa0/6               0          0          0          0         0
Fa0/7               0          0          0          0         0
Fa0/8               0          0          0          0         0
Fa0/9               0          0          0   10112735         0
Fa0/10              0          0          0          0         0
Fa0/11              0          0          0          0         0
...

To monitor interface errors, an SNMP management tool like SolarWinds or Nagios would work.

Network monitoring tools

A network monitoring tool allows you to monitor network performance metrics automatically, and get alerts when network packet loss is detected. The following screenshot shows a ping test run by a NetBeez endpoint: the test reports packet loss rate and other statistics.

A network performance monitoring solution like NetBeez provides real-time visibility into remote worker network issues, including performance monitoring across WAN and VPN connections, and quality assessment of ISP and Wi-Fi connectivity. NetBeez simplifies packet loss monitoring.

NetBeez request demo

Packet Loss Detection in NetBeez

NetBeez provides a simple method to detect and troubleshoot packet loss issues. The network administrator installs network monitoring agents in key network locations. The agents can be hardware, software, or virtual appliances. The agents then can be configured to start test packet loss by using the following commands:

  • ping
  • iperf

The network administrator assigns alert profiles to these tests to receive alerts when there’s high packet loss. Alert profiles define the rules, or conditions, upon which an alert is triggered and associated notifications are delivered. For example, in the following screenshot reports an alert profile that triggers if the value exceeds 5% in a 5 minute window.

packet loss alert profile

When a high packet loss alert is triggered, the network administrator can receive notifications via email, third-party integration, or standard protocol (e.g. Syslog, SNMP).

Simulating Packet Loss

Sometimes it’s required to simulate packet loss to test network configurations, or verify how an application behaves under such situation. If you need to simulate packet loss, Linux offers a relatively simple to use utility called Traffic Control (TC). Without explaining the syntax in detail, here is now to introduce a packet loss of 10% with tc:

tc qdisc add dev eth0 root netem loss 10%

To delete the rule and remove packet loss, use the following command:

$ tc qdisc del dev eth0 root

If you want to learn more about this, we wrote an article explains how to use Traffic Control in Linux.

Conclusion

Packet loss measurements provide key insights into the health of a network infrastructure. By proactively identifying packet drop issues, network administrators can take appropriate measures to resolve them. Addressing packet loss promptly will significantly improve end-user experience and prevent disruptions in critical activities. There are many ways to run packet loss tests available via command line, such as ping or iperf. However, if you are looking for a way to measure packet loss and troubleshoot network problems, request a demo or a free trial of NetBeez network performance monitor. NetBeez provides packet loss monitoring and much more.

decoration image

Request a demo now

Spot VPN, ISP, WiFi issues and more with Netbeez

You can share

Twitter Linkedin Facebook

Let's keep in touch

decoration image