External network (eth0) randomly freezing, have to ifdown && ifup

networkingubuntu-10.04

The external network interface (eth0) on one of our servers is periodically freezing up. It also has a local network interface (eth1), so I'm able to connect to the server through one of the other servers in the same network. Any connections through the external network – such as SSH from my local machine, ping from my local machine, SSH from a dev server on a different network – all time out. While connecting through one of the other servers in its local network, I can run sudo ifdown eth0 && sudo ifup eth0 and the interface magically works again. If I try the ifup command first instead of bringing the interface down, it gives me an error message saying the interface is already up.

As a workaround, I've tried adding the following line to my root crontab:

55 1 * * * ifdown eth0 && ifup eth0 &> /dev/null

Confusingly, that doesn't actually resolve the issue. A backup job that runs 5 minutes later is unable to copy the files to a machine outside the local network.

You can see the output of sudo dmesg here.

The server is an HP ProLiant DL360 G5 running Ubuntu Lucid (10.04). Thank you in advance for any help on how to track this issue down and resolve it!

Best Answer

1- You can monitor the traffic on this interface using the command:

sudo tcpdump -i eth0 -s 1518 -XX -vv -n -w /tmp/trace_file.pcap

Try to connect and see if the interface receives any traffic.

2- Check if you can access other machines FROM this server other than to this server using eth0.

3- Check the interface status using: ethtool eth0.

4- Check the interface status using the sys files under /sys/class/net/eth0/*

5- Check your firewall status (active or inactive) and check the rules if any.

6- Check the kernel debug messages using dmesg and check the system log file /var/log/messages for any errors/warnings.

Hope this will help!