Re: Kernel Routing sequence

From: Sven Schuster
Date: Fri Aug 12 2005 - 01:53:57 EST


On Fri, Aug 12, 2005 at 08:49:02AM +0300, Al Boldi told us:
> Correction:
> ping from to should route out to and
> not to even if the route lists before!

do you generally want pings to to go out via the
route or just pings coming from to via this route??
In the former case you need to add an explicit route for this, e.g.

ip route add dev eth0

in you're case, taking a look at your routing table in a previous
email tells me this seems to be what you want.

In the latter case you need to do some ip rule magic, see
Don't know exactly off the top of my head, but this would probably be
something like

echo "200 xyz" >>/etc/iproute2/rt_tables
ip route add table xyz default dev eth0
ip rule add from to table xyz

(I haven't tried source based routing with routes to directly
connected networks, but I think this should work)



> Sorry!

Linux 2.6.12-1.1398_FC4 #1 Fri Jul 15 00:52:32 EDT 2005 i686 athlon i386 GNU/Linux
08:34:46 up 1 day, 9:48, 1 user, load average: 0.00, 0.00, 0.00

Attachment: pgp00000.pgp
Description: PGP signature