Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2006 22:24:10 +0300
From:      =?ISO-8859-9?Q?=D6zkan_KIRIK?= <ozkan@mersin.edu.tr>
To:        Christopher Martin <outsidefactor@iinet.net.au>, freebsd-net@freebsd.org
Subject:   Re: Multiple routes to the same destination
Message-ID:  <449C3FDA.6010802@mersin.edu.tr>
In-Reply-To: <52se08$ad99g9@iinet-mail.icp-qv1-irony6.iinet.net.au>
References:  <52se08$ad99g9@iinet-mail.icp-qv1-irony6.iinet.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
I think policy routing can solve this problem,
you can use ipfw's fwd action to route packets.
this method doesn't work as round robbin, but it can solve your problem. 
No routing protocol need.
expamle config:

first router = 10.0.0.1
second router = 10.0.0.2

ipfw add check-state
ipfw add prob 0.5 fwd 10.0.0.1 all from any to not 10.0.0.0/24 keep-state
ipfw add fwd 10.0.0.2 all from any to not 10.0.0.0/24 keep-state
...

With this solution, if a connection established over first router, the 
packets belongs to same connection uses first router as gateway.

Özkan KIRIK

Christopher Martin yazmış:

>There is probably some good reason for this, but there is just one thing
>that seems very lacking from FreeBSD, and that's the ability to put in
>multiple routes in the table the same destination.
>
>Now, I am sure a lot of people are saying "You idiot, use OSPF/BGP/RIP if
>you want fail over!" But that's not what I want! In the case of just about
>every other OS today you can put in as many routes as you like, and it will
>use any routes to a destination in a round robin, assuming they have
>equivalent, preferable metrics. Sort of poor mans load balancing. This also
>prevents protocols like OSPF from entering multiple routes to destination
>networks even if they have the same cost.
>
>People have tried to overcome this in the past with ipfw rules:
>http://lists.freebsd.org/pipermail/freebsd-questions/2005-July/093285.html
>
>The best this solution (more of a hack, really) can do is route sessions
>back out the same interface they came in.
>
>Is there a good reason? If there isn't one, how much work will it take to
>fix? I have to admit that it frustrates me enough to at least have a crack
>at fixing it myself, even though I am no expert 1337 coder.
>
>Please pardon my ignorance!
>
>C Martin
>_______________________________________________
>freebsd-net@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-net
>To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>
>  
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?449C3FDA.6010802>