I just installed ubuntu 12.04 and I'm trying to set up my internet access. I just have a wired connection so it should be quite simple.
My computer has two interfaces, eth0
and eth1
.
I'm not sure which one my wire is plugged into right now.
At first it was working correctly, but then I tried to set a static IP address, and from there it's not working anymore, even if I cancel the modifications I made. I even tried the other interface, and it's not working either. Right now I just want it to work regardless of the interface.
Please help me to figure out what is not working properly.
One thing I'm sure of is that both the cable and the router do work, so it's a linux configuration problem.
Here's what I've done:
I've been to /etc/network/interfaces
and I've added the following:
auto eth1
iface eth1 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
I doubled checked that these are the correct values for my network. Then I did:
/etc/init.d/network restart
and even tried:
ifdown eth1
ifup eth1
I sometimes got the message 'RTNETLINK answers: file exists - error when doing ifup on alias eth1:1 on RHEL5.'
Sometimes it works just for a while and I don't understand what's wrong.
Right now it's not working again.
If I ping the gateway I get an answer from one of my own interfaces (apparently) saying icmp host unreachable
I can't copy paste so it's hard to copy the whole output of ifconfig. I would have to do it by hand. But if you ask me for a specific line I can give it to you. It roughly returns:
lo:
127.0.0.1
eth0:
link:ethernet
inet addr: 192.168.1.3 (this address range can only come from the dhcp)
bcast: 192.168.1.255
mask 255.255.255.0
eth1:
192.168.1.100
bcast: 192.168.1.255
mask 255.255.255.0
ifconfig > filename.txt
, this saves the console output in a textfile and makes it easy to copy-paste