Troubleshooting network problems in Linux

Expertise level: Medium

Your server might start losing packets or become suddenly unreachable. This can sometimes be attributed to network issues on your ISP network, inside your home or inside our network. Identify if the issue you are facing is due to a network problem and identify where the issue is located.

Run some tests from your machine. You can read this article on network testing as it will provide you with a few tests to run. Additionally, you can run a mtr test from your machine using a program like winmtr (http://winmtr.net) or simply using the mtr command in linux like this :

mtr server IP address or domain

For example : mtr iweb.com

 mtr.png

Each host on the left is a « hop », or network component, if you want. Each one represents one piece of equipment the signal from your computer needs to go through to reach the server. Now, if you find that one host is having packet loss, chances are that it is the piece of equipment that is experiencing problems. The first host the signal has to go through is your home network equipment. Then it's your ISP's equipment and then, at some point, it reaches iWeb's equipment and then your server. If you notice a problem on the first few hops, please first call your ISP. If you notice issues on the last few hops, there are a few things you can do to help narrow down the source of the issue.

Note: on iWeb's site, we are doing traffic rate. When you proceed with a MTR, it is normal to have around 30% of packet loss on the 3 last hops before it reaches your server. The most important thing is the last value, which is to say, on your server IP. This value must be at 0.0%. If not, please open a ticket with the following information:

  • Download speed test http://kb.iweb.com/entries/21138778-network-performance-test
  • MTR from and to your server IP.
  • Specify your source IP (you can have find your IP on http://ping.eu/)

064.jpg

If you can manage to access the server, through a KVM/IP or through SSH, there are a few commands that you can execute to try to find the source of the issue.

First is the ifconfig command. It should give you an output similar to this:

 

 ifconfig.png

 

Now, you should have many more interfaces than this and the first interface should normally be labelled eth0. However, what interests us the most here are the lines about RX packets, TX packets and collisions. If the errors values or collisions values are higher than 0, there might a problem between the switch and the server. If you find that these statistics have a high value, please contact us by technical ticket as soon as possible so that we may investigate this. If the values are 0, there is another command you might want to run. You can run the ethtool command for your main interface, which is usually eth0, like this :

ethtool eth0

 The output should be like this :

 

Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: yes

 

This is an example of a fully working interface. If you see the interface as shutdown, then you can use the command ifup eth0 . If it is something else, please copy the output as well as the result of the MTR test and put them inside a ticket and send it to us. We should be able to finish the investigation and bring your server back up as usual as soon as we can

For more information about the network management via Linux, please consult this link:

http://www.cyberciti.biz/faq/network-statistics-tools-rhel-centos-debian-linux/.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk