Network Internet settings in Ubuntu 12.04 - repairing after an upgrade

I preformed the usual upgrade to 12.04, and ended up loosing my Internet accessibility. Turns out you can corrupt the interfaces file in the etc/network directory.

To fix this, you need to make sure that the following content is present in "interfaces" file:

auto eth0
iface eth0 inet dhcp
auto lo
iface lo inet loopback

I found that the first two lines had been removed, and as a result, I could no longer connect to the Internet. I changed the file permissions using the following:

chmod 777 interfaces

I use vim, again running as sudo:

sudo vim interfaces

and add in the missing lines. You have to hit the "insert" key so you can add stuff to the file. When done, hit the "escape" key, and then you can type in the following:

:wq

that saves the file, and exits vim

go ahead and change the permissions back, using

chmod 644 interfaces

and the run the following commands:

sudo ip addr flush eth0
ifup eth0

That should do it! Test your connecting by running the ping command, or just connecting to the Internet
You may also need to restart from a cold boot.

Thanks to the commenter "Wilson" who gave me the tools necessary to fix this problem from a post made on Feb 17th, 2011
http://ubuntuforums.org/showthread.php?t=1485251

Other useful links:
http://www.linuxquestions.org/questions/ubuntu-63/ubuntu-12-04-stopped-c...
http://www.linuxquestions.org/questions/ubuntu-63/i-can%27t-connect-to-i...
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=6997&p=87671
http://www.linuxplained.com/how-to-fix-wireless-problems-in-ubuntu-1204-...
http://serverfault.com/questions/390986/ubuntu-server-12-04-can-access-l...
http://www.makeuseof.com/answers/computer-hang-upgrading-ubuntu-1204/

http://www.zyxware.com/articles/2680/solved-wired-connection-eth0-not-de...

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.