1

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
23
  • Check your DHCP range in the router, and try to assign a static IP outside that range.
    – Mitch
    Jun 19, 2012 at 18:04
  • I did, it's out of the range.
    – timZEI
    Jun 19, 2012 at 18:05
  • type: ifconfig > filename.txt, this saves the console output in a textfile and makes it easy to copy-paste
    – fschl
    Jun 19, 2012 at 18:09
  • You wrote you are "not sure which one my wire is plugged into right now". If you get an address from DHCP on eth0, wouldn't eth0 be the interface which is connected?
    – elmicha
    Jun 19, 2012 at 18:10
  • I would first figure out which interface you are using, and just configure that one. You have a link light?
    – belacqua
    Jun 19, 2012 at 18:12

2 Answers 2

1

I would first figure out which interface you are using, and just configure that one. Do you have a link light?

Link light assumes you are looking at the actual system -- most ether adapters have lights for various things -- protocol up, speed, etc.. Usually, checking that you've got green lights where the line is plugged is the first step.

You can also plug/unplug the cable and check dmesg.

Here's what I see from dmesg when I unplug/replug my ethernet cable:

[16661.901920] e1000e: eth0 NIC Link is Down
[16666.460518] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx

You might want to at first go back to a known good configuration. Perhaps test thaqt you can still get DHCP. Here's my basic /etc/network/interfaces for dhcp:

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

Also see How do you configure desktop for a static IP address? .

1
  • yeah that's the sad thing it appears I can't even get back to a known good configuration. As stated above in my comment, the link light is amber. dmesg actually told me something: the link I am right now is eth0. If I unplug and plug back my wire, I get a dmesg that says r8169 0000:0a:00.0: eth0: link down (and then link up)
    – timZEI
    Jun 19, 2012 at 18:38
0

Network Manager is the issue. You need to set your network settings in Network Manager (in the right upper corner of your screen) instead of via /etc/network/interfaces.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .