All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] load balancing between two default gateways
@ 2005-01-31 12:48 Askar
  2005-01-31 13:48 ` Jesper Lund
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Askar @ 2005-01-31 12:48 UTC (permalink / raw)
  To: lartc

Hi list gurus,
long story short we have firewall machine which is the default gateway 
for our clients and firewall send traffic out to Internet via cisco router.
On cisco we have two serial interfaces 1Mb and 2Mb.
On firewall
#route add default gw xxx.xxx.xx.xxx (for 2mb)
#route add default gw xxx.xxx.xx.xxx (for 1mb)
and the same rule for Imb link route packets via these two links.
However I don't know what kernel do when sending traffic via these two 
"default routes" however im sure kernel not doing some sorta shapping, 
coz after few hours of these two rules our 1mb link got chocked and we 
have to "route delete default gw xxx.xxx.xx (1mb).

Now what I want may be "shapping" to route 70% traffic via 2Mb and 30 
via 1Mb.
Is this possible via iproute2? if yes I will greatly appreciate if 
someone helps newbie to iproute2 :)

regards
Askar
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] load balancing between two default gateways
  2005-01-31 12:48 [LARTC] load balancing between two default gateways Askar
@ 2005-01-31 13:48 ` Jesper Lund
  2005-01-31 19:03 ` rsenykoff
  2005-02-01  4:45 ` Askar
  2 siblings, 0 replies; 4+ messages in thread
From: Jesper Lund @ 2005-01-31 13:48 UTC (permalink / raw)
  To: lartc

> Now what I want may be "shapping" to route 70% traffic via 2Mb and
> 30  via 1Mb.
> Is this possible via iproute2? if yes I will greatly appreciate if 
> someone helps newbie to iproute2 :)


You can read the multipath routing section on lartc.org - Click on
"Dive in" :)

/Jesper
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] load balancing between two default gateways
  2005-01-31 12:48 [LARTC] load balancing between two default gateways Askar
  2005-01-31 13:48 ` Jesper Lund
@ 2005-01-31 19:03 ` rsenykoff
  2005-02-01  4:45 ` Askar
  2 siblings, 0 replies; 4+ messages in thread
From: rsenykoff @ 2005-01-31 19:03 UTC (permalink / raw)
  To: lartc





<snip>
> Now what I want may be "shapping" to route 70% traffic via 2Mb and
> 30  via 1Mb.
> Is this possible via iproute2? if yes I will greatly appreciate if
> someone helps newbie to iproute2 :)

You can read the multipath routing section on lartc.org - Click on
"Dive in" :)
</snip>

I've been running load balancing between my cable modem and dsl. It works
pretty well actually. Here's a link to the script I use:

http://www.burnpc.com/website.nsf/all/FE5F4F294F508EB786256E600019BC30

I also use the load balancer to do NAT between the subnet of the cable
modem, subnet of DSL, and subnet my boxes are on. Also in there are some
static route rules in case you always want to use a particular connection
for certain traffic. In my case, my DSL modem is used for VPNs to work
(Linksys BEFVP41) so I always send traffic for those IPs out through the
appropriate NIC.

To try to achieve the 70 / 30 rule I recommend doing something like this to
the line
ip route add default table 222 proto static nexthop via $GWE1 dev $IFE1
weight 1 nexthop via $GWE2 dev $IFE2 weight 1

ip route add default table 222 proto static nexthop via $GWE1 dev $IFE1
weight 7 nexthop via $GWE2 dev $IFE2 weight 3

I suggest reading up on the documentation to understand what those weight
parameters really do. In essence they add 7 routes via one interface, and 3
via the other. Then the load balancer round-robbins between them.

The easynews piece in there works in conjunction with Flashget. I set
flashget's multiproxy up, and it will create multiple threads over the two
ports. I'm able to download from easynews then at the total combined speed
of the connections == fast!!!

Let me know if you have any questions,
-Ron

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] load balancing between two default gateways
  2005-01-31 12:48 [LARTC] load balancing between two default gateways Askar
  2005-01-31 13:48 ` Jesper Lund
  2005-01-31 19:03 ` rsenykoff
@ 2005-02-01  4:45 ` Askar
  2 siblings, 0 replies; 4+ messages in thread
From: Askar @ 2005-02-01  4:45 UTC (permalink / raw)
  To: lartc

rsenykoff@harrislogic.com wrote:

>
>
><snip>
>  
>
>>Now what I want may be "shapping" to route 70% traffic via 2Mb and
>>30  via 1Mb.
>>Is this possible via iproute2? if yes I will greatly appreciate if
>>someone helps newbie to iproute2 :)
>>    
>>
>
>You can read the multipath routing section on lartc.org - Click on
>"Dive in" :)
></snip>
>
>I've been running load balancing between my cable modem and dsl. It works
>pretty well actually. Here's a link to the script I use:
>
>http://www.burnpc.com/website.nsf/all/FE5F4F294F508EB786256E600019BC30
>
>I also use the load balancer to do NAT between the subnet of the cable
>modem, subnet of DSL, and subnet my boxes are on. Also in there are some
>static route rules in case you always want to use a particular connection
>for certain traffic. In my case, my DSL modem is used for VPNs to work
>(Linksys BEFVP41) so I always send traffic for those IPs out through the
>appropriate NIC.
>
>To try to achieve the 70 / 30 rule I recommend doing something like this to
>the line
>ip route add default table 222 proto static nexthop via $GWE1 dev $IFE1
>weight 1 nexthop via $GWE2 dev $IFE2 weight 1
>
>ip route add default table 222 proto static nexthop via $GWE1 dev $IFE1
>weight 7 nexthop via $GWE2 dev $IFE2 weight 3
>
>I suggest reading up on the documentation to understand what those weight
>parameters really do. In essence they add 7 routes via one interface, and 3
>via the other. Then the load balancer round-robbins between them.
>
>The easynews piece in there works in conjunction with Flashget. I set
>flashget's multiproxy up, and it will create multiple threads over the two
>ports. I'm able to download from easynews then at the total combined speed
>of the connections == fast!!!
>
>Let me know if you have any questions,
>-Ron
>
>_______________________________________________
>LARTC mailing list / LARTC@mailman.ds9a.nl
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>  
>
Thanks for the quick reply, okay i will let you know after reading the 
docs section you suggested. before going to deploy these ip rule on our 
production envirnoment I have few questions.
we are also doing iproute2 + iptables MARKing on this machine to route 
port 80 traffic to our proxy/cache servers. Now the ip rules you 
suggested will not do anything with those already in place okay?
#ip rule show
32764:  from all fwmark 0x4 lookup wwwPcache.out <--- we have three like 
this
.
.
Second to make the ip rule working I still need the convention "route" 
in place before doing ip rule things?
# route add default gw xxx.xxx.xxx.xx ?

regards
Askar

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-02-01  4:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 12:48 [LARTC] load balancing between two default gateways Askar
2005-01-31 13:48 ` Jesper Lund
2005-01-31 19:03 ` rsenykoff
2005-02-01  4:45 ` Askar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.