From: Mark Perry <rita.co.ltd@googlemail.com>
To: netfilter@vger.kernel.org
Subject: Re: load balance [OT?]
Date: Tue, 03 Jun 2008 12:56:39 +0700 [thread overview]
Message-ID: <4844DD17.1000501@googlemail.com> (raw)
In-Reply-To: <1212434787.2539.16326.camel@kr0sty.1.com.ar>
Martin wrote:
> Hello netfilter list!
>
> #ISP 1
> ip route add $ISP1_NET dev $ISP1_IF src $ISP1_IP table 1
> ip route add default via $ISP1_GW dev $ISP1_IF
>
> #ISP 2
> ip route add $ISP2_NET dev $ISP2_IF src $ISP2_IP table 2
> ip route add default via $ISP2_GW dev $ISP2_IF
>
> #Rules for ISPs
> ip rule add $ISP1_IP table 1
> ip rule add $ISP2_IP table 2
>
> #Internal LAN and cross reference to the other ISP
> ip route add $LAN_NET dev $LAN_IF table 1
> ip route add $ISP2_NET dev $ISP2_IF table 1
>
> ip route add $LAN_NET dev $LAN_IF table 2
> ip route add $ISP1_NET dev $ISP1_IF table 2
>
> #Add isp net in main
> ip route add $ISP1_NET dev $ISP1_IF src $ISP1_IP
> ip route add $ISP2_NET dev $ISP2_IF src $ISP2_IP
>
> #This should do the trick of balancing
>
> ip route add default scope global equalize nexthop via $ISP1_GW dev
> ISP1_IF weight 1 nexthop via $ISP2_GW dev $ISP2_IF weight 2
>
>
> What actually happens is that traffic is going out only by the first GW
> declared in the first nexthop, and it doesn't care weight nor balance.
> The only chance of making it to go throw the second GW declared is
> shutting down or collapse that interface, so then it goes for the second
> one.
>
You have requested different weights:
ip route add default scope global equalize nexthop via $ISP1_GW dev
ISP1_IF weight 1 nexthop via $ISP2_GW dev $ISP2_IF weight 2
If you want each to be equal then at least give them equal weights.
--
Mark Perry
next prev parent reply other threads:[~2008-06-03 5:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 19:26 load balance [OT?] Martin
2008-06-03 5:56 ` Mark Perry [this message]
2008-06-03 13:17 ` Martin
2008-06-03 16:35 ` Martin
[not found] ` <4845768C.5020506@googlemail.com>
2008-06-03 17:06 ` Martin
[not found] ` <48457ACE.7020707@googlemail.com>
2008-06-03 17:25 ` Martin
2008-06-03 17:40 ` Mark Perry
2008-06-03 17:55 ` Martin
[not found] ` <48458766.2030602@googlemail.com>
2008-06-03 18:13 ` Martin
2008-06-03 20:58 ` Martin
2008-06-03 22:27 ` ArcosCom Linux User
2008-06-04 13:06 ` Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4844DD17.1000501@googlemail.com \
--to=rita.co.ltd@googlemail.com \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.