← Back to team overview

ubuntuforums-unanswered team mailing list archive

[Question #78504]: Default gateway set for each eth device

 

New question #78504 on Ubuntu:
https://answers.launchpad.net/ubuntu/+question/78504

I have an ubuntu jaunty (Desktop) that will act as a router/proxy for a small hadoop cluster.
I have two ethernets, one connected to the normal Office network (eth0) and another to the Hadoop network (A gigabit one) eth1.
Everything works well, except for one glitch that will make me write some scripts and making all the setup very "unpolished".
I've configured the two network using the /etc/network/interfaces, the external eth0 gets its configuration from our main dhcpserver, the internal one (eth1) is statically configured. This is my interfaces file:

auto lo eth1 eth0
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet static
	address 192.168.100.1
	netmask 255.255.255.0
	broadcast 192.168.100.255
	network 192.168.100.0

Everything looks right, and on a network restart everything gets configured except the default gateway. After reloading the network this is what I get on "route":

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.100.0   0.0.0.0         255.255.255.0   U     1      0        0 eth1
192.168.10.0    0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
0.0.0.0         192.168.100.1   0.0.0.0         UG    0      0        0 eth1
0.0.0.0         192.168.10.1    0.0.0.0         UG    100    0        0 eth0

As you can see, something somewhere is creating one default gateway for each ethernet device.
This is obviously incorrect, there must be only one gateway per machine. 
If the 10.1 were on top, It will look bad, but will work. But unluckilly, is not the case, and my machine and all the ones behind it, gets no internet access.
I'm running a dhcpd server on eth1 for the internal machines, and also firestarter for firewall setup.

What is causing this? 


-- 
You received this question notification because you are a member of UF
Unanswered Posts Team, which is an answer contact for Ubuntu.