Network related issues are common problem in our field and at some point everyone has smaller or larger issue regarding, network connectivity or speed. In this article we will be providing some insights on how to investigate the issue manually and what information is needed in order for us, to check your issue and determine the cause of the problem sooner rather than later.
Manual check
Firstly, once you face the network issue, you should try to identify the origin of the problem. For example, is it local problem, the server’s or it happens somewhere between the server and your location. To check this, you may use tracepath command:
tracepath ip_address
These commands basically return you the route which is used to get from your location to server or vice versa. It will provide you the delay (ms) from source to each of other point on the route. Below is an example of the command tracepath and it’s results:
In the picture above you may see that the ms highly increases from 7th to 8th hoop, this can suggest few things: there is a long distance between these hoops; The server/router at hoop 8 may have some unusual high load or other difficulties and slows things down. It could be temporary due to hardware issues at the point 8th, or it can be permanent due to long distances between 7th and 8th hoops. However, this specific issue can not be solved by a user or a Hosting provider directly, as it is most likely just a middle point and is handled by 3rd party Internet Service Provider (ISP).
Tracepath manual: http://man7.org/linux/man-pages/man8/tracepath.8.html
Another command that could be useful is mtr – it should be installed in our servers additionally, for example:
mtr ip_address
We provide the results of the test below so that we can comment and explain more on the command itself:
This test provides you the full route and specific point that the packets pass when traveling from a server to your location (or vice versa). Also, the percentage of a lost package and the ping (last, average, best, worst). Also, while you performing the test, the packets are constantly being sent so you can see how the information changes in the results – of the pings increase or decreases or stays. Column StDev provides the standard deviation of the latency to each host. The higher the standard deviation, the greater the difference is between measurements of latency. The test allows you to understand if there is a stable connection first if the ping does not jump too much. However, if the ping jumps, it may suggest that the connection is not stable. It also lets you understand and see at which specific point the ping is higher or the packets are lost, which then indicates where could be the origin of the network issue.
The test provides a lot of useful information, so we consider it to be quite informative and useful for us when resolving similar issues.
mtr manual: https://linux.die.net/man/8/mtr
Let’s move on to the next test, which we consider quite useful and effective when determining if the network issues are server related – iperf3, it is very simple and could help you to eliminate some of the possibilities for network issue. We have an article related to this test and how to perform it:
Below is an example of the results of this test:
As you can see, the iperf3 is done within our servers (in this case) to make sure that the network connections and speed is good. You can see that the results are just fine, which would confirm that our network and the servers have no issue related to the network. These tests could simply point you to look for the reason for the network issue elsewhere: on your side, or on the route between your location and server.
There are some other tests you can make to check the network speed, like speedtest-cli. Here is information on how you could download and run it:
Also, below we provide the results of our example test or give you an idea of what to expect:
We have performed the default test, which uses the nearest server to check Download and Upload speeds. However, there are additional options and you could choose to perform the test with servers from other locations. This test simply provides the information on your network speed, it can not always be taken for granted, but it definitely provides the idea if your network speed is currently capable of having a specific network speed.
Other factors
Besides all the tests, which there are probably some more than just these examples, other factors should be taken into account when troubleshooting network issues as well.
* Overall load of the server should be considered as a factor because when downloading something to your server, this action actually writes files to your server, so the more server is overloaded in general, the slower writing might get, which would then could make network speed appear slower. You may use a command like top to check the active services at the moment.
* When facing slow network speed, make sure to check if there is no other network resource-demanding service, like torrent or possibly some other download happening in the background, which may influence a new connection you may just start.
* When you face a network issue, many users try pinging to the server first in order to check it, however, the remote server could have disabled the ping to it, so you may get “no connection” and a similar response, despite the server working just fine, so the command “ping” itself is not always trustworthy, we would recommend skipping it or at least do not base your conclusion on the results of ping alone.
* some commands like “wget” could be used as well to determining the network speed it is a little simpler compared to speedtest, since it does not require you to install anything, you just have to have a link which you will be using to download a file and check the speed.
Note. When opening a support request in our system, you may as well provide results of some of these tests along with your local IP address, so that our double-check and further investigation could be faster.