How my Linux network unreachable problem got fixed
Saturday, 2 February 2008
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.

Get in touch with me, about this site, or to let people know about your software, hardware, or services. Write to hello@jasonslater.co.uk, or 
Meet the same problem and solve it with your method! Thanks for your useful sharing.
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.
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.
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 ?