I recently installed Ubuntu on my windows computer, so now I have a debian computer and an ubuntu computer and they're both set up to access the internet with a wired connection. The debian one works fine, but the ubuntu one either connects to the internet or it doesn't. Sometimes if I run sudo ifup -a, sudo ifdown -a, sudo ifup-a, sudo ifdown -a (etc) for a while, it will eventually connect, but never on the first try. I've tried sudo dhclient eth0 too.
/etc/network/interfaces looks like this on both computers:
Code:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto eth0
sudo ifup -a gives me:
Code:
Listening on LPF/eth0/00:1a:a0:9f:73:ee
Sending on LPF/eth0/00:1a:a0:9f:73:ee
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
and then sudo ifdown -a:
Code:
Listening on LPF/eth0/00:1a:a0:9f:73:ee
Sending on LPF/eth0/00:1a:a0:9f:73:ee
Sending on Socket/fallback
DHCPRELEASE on eth0 to 192.168.1.1 port 67
This is odd. Anyway, usually I have to do this a few times before it finally does communicate with the router, (and sometimes it'll connect without me having to do anything), but today it just won't, no matter what I do.
After ifup -a, even though it doesn't work,
ping 192.168.1.1 gives me:
Code:
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 169.254.10.214 icmp_seq=1 Destination Host Unreachable
but after ifdown -a, pinging results in:
Code:
connect: Network is unreachable
sudo dhclient eth0 seems to do the same thing as ifup.
The ubuntu computer never had problems connecting to the internet when it was the windows computer, and when it does connect, the router gives it the same IP address it used to give it when it was the windows computer.
I think I'm on my fiftieth ifup ifdown dance, so it's time to try something else.