Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I am trying to setup an Ubuntu hosting server, currently just for development, and the server has two NICs, each sitting on a different network. eth0 is on 192.168.200.* and eth1 is on 192.168.101.* and each one has a static IP. eth0 is the public facing NIC card and eth1 is strictly for internal access to the server. I initially only setup eth0 and added the eth1 card when I needed it. eth0 was working find until I added eth1, now, can't get any connectivity on eth0 unless I pull eth1 out of the box. The configuration on each system is as follows:

auto eth0
iface eth0 inet static

auto eth1
iface eth1 inet static

Again eth0 worked fine until I added eth1. I have seen this happen with Windows servers if you have a Default Gateway setup for both NICs, but I am not sure if this works the same on Ubuntu. My resolv.conf file looks like so:

domain domain.local
search domain.local

Per request here is the Routing table       *              U     0      0      0      eth1       *              U     0      0      0      eth0
default              UG    100    0      0      eth1
default              UG    100    0      0      eth0
share|improve this question
I could be a route issue. Please add the output of the route command. – Javier Rivera Jan 20 '11 at 16:19
Following to see if I can gain any insight to accomplish the same goal. ( – user8290 Jan 20 '11 at 23:39
can you ping or traceroute to your gateways? I.e., and ? What's the ouput of ifconfig -a ? – belacqua Feb 14 '11 at 19:08

2 Answers 2

You have two default routes. It's possible that your "" box is not configured to route your traffic out, since you said that that network it's strictly for internal access.

Remove the "gateway" entry from the eth1 network and it should work.

share|improve this answer
I removed the line that says "gateway" but it still doesn't seem to work. Is there anything else I need to add to the interfaces file? And yes I did restart networking (using "/etc/init.d/networking restart") – Dave Long Jan 20 '11 at 18:12
please paste the output of traceroute – ithkuil Jan 28 '11 at 13:42
Do you still see the two default routes after removing the second gateway line and restarting the networking? – Jeremy Kerr Feb 15 '11 at 4:28

keep the gateway entry for eth1 and remove the gateway entry for eth0:

ip route del default dev eth0

create a new policy routing table:

echo "1 admin" >> /etc/iproute2/rt_tables

add the new routes:

ip route add dev eth0 src table admin

ip route add default via dev eth0 table admin

add the new rules:

ip rule add from table admin

ip rule add to table admin

commit the changes:

ip route flush cache

DONE! enjoy! --Jason

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.