Still no success: two router one host
I follewed your suggestion but still no success ...
any attempt to contact from outside g.f.e.246 fails.
of course if i unconnect also eth0 i cannot access anything, unless i
set an ad-hoc route on eth1.
But i need to be accessible on both addresses.
If i try to connect from outside without success i can see that my
packet arrives but are not answered on either port.
I tried also to add the option from adv-iproute howto for load
balancing, using ip route slist table main is shown correctly , but not
I begin to fear that the kernel I have (a plain 2.22 from debian) is not
Where am i wrong ?
On 14 Jan 2004 at 13:41, Fraser Campbell wrote:
> On Thursday 15 January 2004 12:40, Leonardo Boselli wrote:
> You need to use the iproute utility to create multiple routing tables
> and a few routing rules. There are probably many ways to arrange your
> rules but here is the style that I stick to:
> First create a routing table for each connection (5 and 10 are
> randomly chosen table numbers):
> ip route add default via a.b.c.1 table 5
> ip route add default via g.f.e.245 table 10
> Next create some rules to ensure that local traffic stays local:
> ip rule add to a.b.c.0/24 lookup main pri 100
> ip rule add to g.f.e.246/30 lookup main pri 100
> Now create some rules based on source address so that you're outgoing
> packets get sent to the correct router:
> ip rule add from a.b.c.0/24 lookup 5 pri 200
> ip rule add from g.f.e.246/30 lookup 10 pri 200
> Flush routing cache so that rules take immediate effect:
> ip route flush cache
> > I fear that it sends packets via eth1 with a.b.c.d address.
> Yes it does. If you find out the MAC address of your routers you can
> use tcpdump in conjunction with a filter (by MAC address) to confirm
> > What is the setup i have to add to have it working correctly.
> > Also is there a script to change default route from one NIC to the
> > Other if the connection is broken ?
> Depends on what you're doing but you probably won't need a script once
> ip routing is setup correctly. Documents are at http://www.lartc.org/
> Fraser Campbell <email@example.com>
> http://www.wehave.net/ Georgetown, Ontario, Canada
> Debian GNU/Linux
> To UNSUBSCRIBE, email to firstname.lastname@example.org
> with a subject of "unsubscribe". Trouble? Contact
Nucleo informatico e Telematico
Dipartimento Ingegneria Civile
Universita` di Firenze
Via Santa Marta 3