Sending and receiving data from the Internet has become such an integral part of our lives that we don’t even think about the nitty-gritty details of how it is transported, until a problem comes up in the form of slow connections, dropped calls, or no response to your requests.
When these problems occur, you’d want to fix them right away because they are annoying and frustrating, to say the least. But how do you know what’s the cause of the slow or dropped connections? Without knowing the cause of the problem, how can you fix it?
That’s why in this article, we’ll take you on a trip to the basics, so you’ll know how to identify the connection issues within just a few minutes.
What are Data Packets?
When you read a piece of news online, send or receive emails, check your messages on social media, shop, bank, or do just about any online activity, what you’re essentially doing is sending and receiving small packets of data.
The underlying protocol that enables you to send and receive messages is called TCP/IP and this protocol divides every message into small chunks called data packets. When these packets arrive at their destination, the TCP/IP protocol of the destination system reassembles them to get the original message.
When you examine the data packet closely, you’ll find that it contains not just the data that you send and receive, but also other identifying information that helps the receiving protocol to reassemble the packets in the right sequence.
Here’s some of the other information that these data packets contain.
Header
The header contains control information and instructions about the data contained in the packet. It includes,
- Length of the packet
- Synchronization bits that help to match the packet and the network through which it is sent.
- Sender’s IP address
- Receiver’s IP address
- Protocol that defines the type of packet that’s being transmitted. For example, emails, videos, etc.
- Packet number to identify the sequence
Typically, the header takes about 96 bits.
Payload
‘Payload’ is the actual data or the body of the packet. If the length is of a fixed size, then blank data bits may be added to pad it up to reach the prescribed length.
Footer
The ‘footer’, also called the ‘trailer’, contains a few bits to tell the receiving device that it has reached the end. Most data packets also have bits for error checking, with the most common method being the Cyclic Redundancy Check (CRC).
Thus, this is how communication takes place between any two computers on the Internet.
Reasons for Packet Loss
As you may have guessed, when one or more packets fail to reach the receiver, it’s called packet loss. This is a potentially serious situation that impacts the performances of websites and applications and can impede access to them. It results in slow connections, dropped calls, no response to your requests, and more.
Below are some of the causes of packet loss.
Network Congestion
Network congestion is a situation where the network has more packets than it can deliver and if the connection is extremely slow, some of the data packets are discarded because there is a limit to how much a network can store. Further, the network may discard the remaining to keep pace with the sending rate.
Outdated Hardware
The underlying hardware must be competent enough to handle the rate of transmission of these data packets. Outdated firewalls, networks, and routers can slow down the network greatly and increase congestion. In turn, this leads to lags and resultant packet loss.
Errors and Bugs
Errors and bugs in software can impact the network and the way it routes data packets. So, if there are any untested or unresolved bugs in your software application, it can cause changes in network behavior, that could eventually cause packet loss.
Cyberattacks
One form of cyberattack called the packet drop attack causes the loss of data packets. During this attack, a hacker takes charge of the routers and intentionally drops a few packets to disrupt the communication.
While these are not an exhaustive list of reasons for packet loss, it sure gives you an idea of the possible ways by which packets can fail to reach the destination.
So, the next question is how do you test for packet loss on Windows?
Testing for Packet Loss on Windows
The first step is to identify that there is a packet loss. Some of the possible ways to identify them are:
- Slow speed of transmission
- High latency
- Lag while playing video games or watching streaming content
- High levels of buffering while watching multimedia content
- Dropped voice and video calls when connecting through the Internet
While these signs are indicators of a packet loss, the most foolproof way to recognize a packet loss is through the TCP/IP protocol.
While sending data through the TCP/IP protocol, the sender keeps a track of the number of packets and their sequence. The receiver, on the other hand, acknowledges the receipt of each packet. Based on these acknowledgments, the sender can estimate if there has been a packet loss and if so, what percent of packets have been lost.
So, you can know the rate of packet loss from the sender’s TCP/IP protocol and to get this information, you can use two tools that come built into the Windows operating system.
These two tools are – ipconfig and ping.
Though both these tools may seem similar, in reality, they gather data in different ways. Let’s now take a detailed look at both these tools.
Ipconfig
Ipconfig is an acronym for Internet Protocol Configuration. This is a console command that displays the current configuration of TCP/IP. It is often used with different parameters to get an idea of the health of the IPv4 and IPv6 addresses, gateway adapters, and subnet masks.
How to Run ipconfig?
Below are step-by-step instructions on how you can run ipconfig.
- Open the Run dialog box by pressing the Windows and “R” key
- Type “cmd” and press Enter
- Alternatively, you can navigate to the start menu and click on the command prompt
- When the command prompt window opens, type “ipconfig” and press Enter
- This will display information about your default gateway, mask, and other pertinent information.
You can also use this tool with its many parameters for specific actions or to get the results you want. Some of the possible options are:
Accordingly, you can decide which ones are appropriate for you.
Ping
Ping is a useful utility that allows you to check the health and reachability of the receiving device. Essentially, it sends an ICMP echo request and expects to get an echo reply from the receiver. Based on the response and time taken, you can identify the cause of delays.
How to Run ping?
Like ipconfig, you can run ping also from the command prompt. However, note that you can use this command only if TCP/IP is installed as a component in the network adapter.
It also supports a host of parameters that you can use to get specific information. Some of those parameters are:
/t - Sends the echo request messages until they are explicitly interrupted with the CTRL + ENTER command
/a - Provides reverse name resolution for the destination IP address
/n <number> - Specifies the number of echo request messages the system should send. The default value is 4
/l <size> - Specifies the length of the data field in the messages. This value is in bytes and the default is 32.
/f - This parameters adds the "Do Not Fragment" flag in the IP address, so routers don't fragment the message
/l <seconds> - Specifies the maximum time-to-live for each message. The default value is set by the host and the maximum is 255.
/v <number> - Gives the type of service and it is specified as a decimal value from 0 to 255
/r <number> - Records the number of hops in the path
/s <time> - Specifies the Internet timestamp for the message
/w <seconds> - Specifies the amount of time to wait for the echo reply message
/4 - Uses only IPv4
/6 - Uses only IPv6
/? - Displays help
With these different parameters, you can get precise information about the time taken to send and receive messages and the possible source of the problem.
Testing With ipconfig and ping
For the optimal testing for packet loss on Windows, you have to use both ipconfig and ping.
Check the Default Gateway’s Availability
Firstly, use the ipconfig command to get the IP address of the default gateway. Next, use ping to send a certain number of ICMP messages to the gateway. Make a note of the rate of packet loss, the time taken for transmission, etc, as this information can help you zero in on the source of the problem.
With this series of actions, you can know if there’s a problem with your gateway, routers, and adapters. When there are no problems, it’s time to check the external network.
Pinging the External Network
The idea behind pinging the external network is to understand if packet loss is due to network congestion.
It has become a standard practice to send a ping message to google.com because these servers score high on stability and reliability.
From the above results, it’s clear that there was no network congestion and no packet loss.
To get accurate results, consider running both these tests at different times of the day. It even makes sense to run them from different places to understand the strength of Wi-Fi signals, possible network congestion, faulty hardware equipment, and more.
Possible scenarios
Below are some possible scenarios and the conclusions you can make them. Remember, this is not an exhaustive list, but one that aims to give you an idea of how to use ipconfig and ping to test for packet loss.
Internet cabling or Wi-Fi strength
When you run the same tests from different parts of your house, you may experience differential rates in packet loss. This could indicate that the Internet cabling is flawed.
On the other hand, if you’re using wireless networks for connectivity, it could indicate that the strength of the Wi-Fi network varies greatly in different parts of your house. Accordingly, you can decide the optimal place for setting up your work desk or move your router to a different part of the house.
Network congestion
When the rate of packet loss varies greatly from one time of the day to another, it could indicate network congestion. It is likely because at some times of the day, more people are accessing the Internet and as a result, the packets are getting queued and eventually lost or discarded.
This information can help you to better plan your Internet usage, and possibly move the Internet-heavy tasks to the lean times of the day when there is no network congestion.
Hardware issues
If the packet loss rates vary while trying at the same time and location, but with different devices, it is an indication of faulty hardware. Outdated versions or models can also be the cause of these differences.
Software bugs
When some applications are slower than others, ping to the specific application. For example, if it takes a lot of time for The New York Times page to load, do a ping to nytimes.com to see if there’s any problem. Sometimes, the problem can lie with the browser or even the receiver’s network. Likewise, software bugs can cause some applications to load more slowly or worse, even disrupt communication.
Conclusion
All the data that you send and receive from the Internet are transmitted by the TCP/IP protocols that divide the data into small packets and send them. For every packet sent, the protocol waits for an acknowledgment from the receiver, and the packet is deemed to be lost if there’s no acknowledgment from the receiver.
Using this feature, we can determine the packet loss rate and the possible reason for the same. Some of the scenarios mentioned above can help to determine the possible cause of the problem, so you can fix it right away to ensure an uninterrupted connection to your favorite online applications.