Troubleshooting network problems in Linux

Posted:  May 14th, 2016

 

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

 

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 : Network Performance Tests

 

> MTR from and to your server IP.

 

> Specify your source IP (you can have find your IP on http://ping.eu/)

 

 

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:

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/.