Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ Two ethernet interfaces on one server - fallback internet connection

Posted by: Didzis Jan 31 2012, 03:20 AM

Hello everyone,
I have spent hours and hours of research on this issue and since english is not my native language I suppose I am missing or misunderstanding some point here.

Here's the situation:

A file/email server acts as a router/firewall to a local network 10.10.10.0/24 - eth2

Primary internet connection eth0
Secondary internet connection eth1 (initially planned as fall-back connection from a different ISP)

I have set up and activated advanced routing modules in the Linux kernel 3.2

Firewall has been turned off for testing reasons.

I have two routing tables "admin" for the connections from/to eth0 and "eiro" for connections from/to eth1

main routing table:

root@anulatrans:~/router# ip route
default via 87.99.73.254 dev eth1
10.10.10.0/24 dev eth2 proto kernel scope link src 10.10.10.10
87.99.73.0/24 dev eth1 proto kernel scope link src 87.99.73.113
127.0.0.0/8 dev lo scope link
195.62.159.32/27 dev eth0 proto kernel scope link src 195.62.159.43

root@anulatrans:~/router# ip rule
0: from all lookup local
32762: from all to 87.99.73.113 lookup eiro
32763: from 87.99.73.113 lookup eiro
32764: from all to 195.62.159.43 lookup admin
32765: from 195.62.159.43 lookup admin
32766: from all lookup main
32767: from all lookup default


root@anulatrans:~/router# ip route show table admin
default via 195.62.159.62 dev eth0
10.10.10.0/24 dev eth2 scope link
127.0.0.0/8 dev lo scope link
195.62.159.0/27 dev eth0 scope link src 195.62.159.43


root@anulatrans:~/router# ip route show table eiro
default via 87.99.73.254 dev eth1
10.10.10.0/24 dev eth2 scope link
87.99.73.0/24 dev eth1 scope link src 87.99.73.113
127.0.0.0/8 dev lo scope link

The problem:

If the default gateway is set to eth0 ISPs getaway then

root@anulatrans:~/router# ping www.google.com -I eth0
PING www.l.google.com (173.194.69.104) from 195.62.159.43 eth0: 56(84) bytes of data.
64 bytes from bk-in-f104.1e100.net (173.194.69.104): icmp_seq=1 ttl=49 time=42.7 ms

root@anulatrans:~/router# ping www.google.com -I eth1
PING www.l.google.com (173.194.69.104) from 87.99.73.113 eth1: 56(84) bytes of data.
From 87.99.73.113 icmp_seq=2 Destination Host Unreachable
From 87.99.73.113 icmp_seq=3 Destination Host Unreachable
From 87.99.73.113 icmp_seq=4 Destination Host Unreachable

and if the default getaway is eth1 ISPs getaway, then vica versa

root@anulatrans:~/router# ping www.google.com -I eth1
PING www.l.google.com (173.194.65.103) from 87.99.73.113 eth1: 56(84) bytes of data.
64 bytes from ee-in-f103.1e100.net (173.194.65.103): icmp_seq=1 ttl=38 time=158 ms

root@anulatrans:~/router# ping www.google.com -I eth0
PING www.l.google.com (173.194.65.147) from 195.62.159.43 eth0: 56(84) bytes of data.
From anulatrans.lv (195.62.159.43) icmp_seq=2 Destination Host Unreachable
From anulatrans.lv (195.62.159.43) icmp_seq=3 Destination Host Unreachable
From anulatrans.lv (195.62.159.43) icmp_seq=4 Destination Host Unreachable


Sorry for very long post, hope I made myself clear enough to understand what I am missing here

Thank you in advance.

Didzis.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)