Primary/secondary ethernet interfaces via NetworkManager in Ubuntu 9.10

Posted by Josh on Super User See other posts from Super User or by Josh
Published on 2010-03-12T20:09:06Z Indexed on 2010/03/13 16:35 UTC
Read the original article Hit count: 237

Filed under:
|
|
|
|

I have an Ubuntu 9.10 machine with three ethernet interfaces, eth0, eth1 and eth2. eth2 is connected to a private network. eth0 and eth2 are connected to two different LANs. Either one will provide access to the internet. All three networks have DHCP servers.

Using Ubuntu's the default settings (And Gnome), when I boot up all the interfaces are active and my system gets three IP addresses. However any attempt to access the internet results in connection timeouts and other weirdness. I suspect that traffic is going out on one NIC (like eth0) and coming back in on another (like eth1). I'm not sure what's going on. The only way I can access the internet at the moment is to bring two of the devices down with ifdown.

How can I configure eth0 as my primary interface so all trafic goes out by default on that interface, while keeping the other two active? Also, I want to make sure Avahi broadcasts properly on all three IPs so that the computers on the LAN of eth1 can still connect to myHostname.local...

EDIT: Here's my routing table:

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
172.16.151.0    0.0.0.0         255.255.255.0   U         0 0          0 eth2
172.16.30.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
10.1.0.0        0.0.0.0         255.255.0.0     U         0 0          0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
0.0.0.0         172.16.30.2     0.0.0.0         UG        0 0          0 eth0
0.0.0.0         10.1.0.1        0.0.0.0         UG        0 0          0 eth1

I want the 172.16.30.2 network to be the primary one and the 10.1.0.0 network to be the secondary one.

EDIT2: My nameservers are also incorrect. It seems like Ubuntu is bringing the networks up in order, eth0, then 1, then 2, and the DHCP information from eth1 is overriding eth0, and eth2 is overriding eth1. How can I reverse this so the DHCP information from eth0 is the "master"?

EDIT3: This seems to be an issue with Gnome's NetworkManager.

© Super User or respective owner

Related posts about ubuntu

Related posts about linux