Date: Mon, 14 May 2007 17:40:18 +0200 From: "=?ISO-8859-1?Q?Ermal_Lu=E7i?=" <ermal.luci@gmail.com> To: rajkumars@gmail.com Cc: freebsd-pf@freebsd.org Subject: Re: Load balancing with ratio Message-ID: <9a542da30705140840y549de4cl23894803db5c44d2@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
You can use tagging for that with prob rules and then use route-to on tags. Since PF will use route-to only if the rule when route-to is matched you can do like pass bla.. prob 30% ..bla tag ROUTE1 pass bla.. prob 70% ..bla tag ROUTE2 pass bla route-to ($whatever1) tagged ROUTE1 pass bla route-to ($whatever2) tagged ROUTE2 Sorry about the syntax not being correct but you can use the man page to do that. I have not tested that but anyway it should work. > Hi, > > pf can do outbound load balancing using route-to and provide the ext > interface and gateway ip like { ($ext_if1 $ext_gw1), ($ext_if2 > $ext_gw2) } round-robin. But the algorithm is only round-robin which > may not be appropriate if the two links are asymmetric, say an 1MB > line and 256kbps line. > > Is there any way to provide some ratio like 1:4 where out of 5 > packets/bytes 4 will be via one link and one via other link? > > I have gone through the docs and this feature does not seem to exist > any where, so if some one can give a starting place to look, where I > can do some hacking, that would also be fine. > > raj > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9a542da30705140840y549de4cl23894803db5c44d2>