Home » Blogging

How my Linux network unreachable problem got fixed

I had what I thought was a huge problem just before Christmas. The host server that was running my virtual server of Ubuntu (hosting my Blog) fell over and when it came back up Ubuntu loaded but the network connections no longer worked. Trying a ping from the server reported the message connect: Network is unreachable.

I was trying to make a quick post before I went out but instead spent several hours trying to track down the problem. I tried the ifconfig command and it reported an error. Pinging wouldn’t work and re-initialising the network didn’t help either. I spent ages trawling the Internet looking for clues as to what the problem was and it seemed the more I looked the deeper it got and the more sidetracked the issue became.

In what can only be described as a fit of desperation I went right back to basics and started looking at the networking files in the /etc directory. It turned out that the system was now using eth1 not eth0 and as such had requested an IP address from the DHCP server, this was obviously different to what I had been using previously. As soon as I updated the /etc/network/interfaces file to reference eth1 from eth0 and restarted networking the whole thing sprang back into life – phew! The moral of the story – check the obvious things first.

Technorati Tags: , , eth0,
Related Posts with Thumbnails

4 Comments »

  • Jinsong Liu says:

    Meet the same problem and solve it with your method! Thanks for your useful sharing.

  • Tim McGuire says:

    For some reason it didn’t work until I rebooted, but your reminder saved my bacon. Is there a command to re-read that interfaces file instead of rebooting?
    Just to prevent possible confusion for subsequent visitors,

    1. notice that ifconfig says “eth1″ but /etc/network/interfaces references eth0
    2. Change all references of eth0 in /etc/network/interfaces to eth1
    3. maybe have to reboot.

  • Harry M says:

    You are a star. You solution resolved my problem. I changed from eth0 to eth1 and my network came alive. You saved me hours of troubleshooting. Thanks.

  • Phil says:

    Thanks, your solution solved my problem. I did not need to reboot for the network to work again. It worked as soon as I saved the file.
    But why did eth0 became eth1 ?

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.