0

I have a recent install of ubuntu server (all command line) and at the time of the install I was not connected to the internet.

when entering sudo apt-get update I get a bunch of messages saying failed to fetch repos.

I am unable to ping google, askubuntu, or any other site

sudo lshw -class network

indicates both eth0 and eth1 are disabled.

ifup eth0 

results in

ignoring unknown interface eth0=eth0

is there a way to test the connection from cable modem to machine is ok? (I checked a few times and believe my cable/connections are ok, but I can check again)

thanks bp

badperson
  • 259

1 Answers1

2
  1. Check your network interfaces with: cat /etc/network/interfaces
    1. It should look like something like this:

The loopback network interface auto lo iface lo inet loopback

The primary network interface auto eth0 iface eth0 inet dhcp

  1. sudo service network-manager restart
  2. sudo ifconfig eth0 up
  3. sudo dhclient eth0

Now your connection should be fine.

  • another q...I find I have to do this step after restarting. Is there a way to make it automatic? – badperson Jan 25 '13 at 14:21
  • Well, you can put all the commands in a little script, then let cron call the script at every boot. I'll look into this and will look for other ways to win the pot of gold at the end of the rainbow. I've got a daytime job so this might take some time... – C Schilder Jan 29 '13 at 08:14
  • you might take a look here. or here. – C Schilder Jan 30 '13 at 13:16