Load balancing
I am trying to figure out how to do this: I've tried the howto but just become hopelessly confused. (I don' think this is a problem in the howto, it's a problem with my comprehension.)
Anyway, here's the scenario:
Internal Linux Router/ 4 - T1 circuits to Another
Networks Firewall the Internet Internet circuit
| | | | | | | | | |
+-----------------+ | | +------------+------+------+------+---------------+
--------------------+ |
------------------------+There are really three internal networks for various departments. The router/firewall will have 4 NICs.
For one of the internal departments, I want the router to load-balance outbound packets among those 4 T1 circuits, which will be connected to Cisco (I think) routers. I want the other departments to all share that other Internet circuit.
And I need the ability to change this policy at will, so I can let other departments use the combined T1s as needed.
I think I can figure out how to route based on the source network, that all makes sense in the how-to. I can set up different routing tables based on the source IP address/network. It's the load balancing that is making me crazy - how do I put together a load-balancing mechanism for those combined T1s that makes sense?
Any advice or pointers?
thanks
- Greg Scott
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Greg,
Check out the past archives not to far on June 5th, I put a post up
when I finally was able to do something similar to what you are wanting to do. I think. I have two ISPs, two SDSL lines, separate IP blocks, and two routers. I used a linux box as a second round of Nat and a load balancer sort of. Although that is an option, but as mention in my post, NAT in the Linux box is a must. The kernel must be patched, I used a 2.2.21 due to booting of a ZIP disk, and running my Linux router on RAMDISK You can use a 2.4 but it must be patched, and run NAT.
The links you need are in my past post, and if you have questions I will do my best to assist. Although keep in mind NAT issues are not really for this list. That's a netfilter mailing list issue. Due my use of a 2.2.21 kernel I could not use iptables, or at least I do not think I can. I used ipchains as you will see in the post. So if you use a 2.4 kernel you will more than likely use iptables not ipchains.
I used only two connections, but you can use as many as you have interfaces for. Also if you are not using other routers before the Linux one than it will be a little easier Good luck.
Quoted 37 lines · Greg Scott
I am trying to figure out how to do this: I've tried the howto but just become hopelessly confused. (I don' think this is a problem in the howto, it's a problem with my comprehension.)
Anyway, here's the scenario:
Internal Linux Router/ 4 - T1 circuits to Another
Networks Firewall the Internet Internet circuit| | | | | | | | | | +-----------------+ | | +------------+------+------+------+---------------+ --------------------+ | ------------------------+There are really three internal networks for various departments. The router/firewall will have 4 NICs.
For one of the internal departments, I want the router to load-balance outbound packets among those 4 T1 circuits, which will be connected to Cisco (I think) routers. I want the other departments to all share that other Internet circuit.
And I need the ability to change this policy at will, so I can let other departments use the combined T1s as needed.
I think I can figure out how to route based on the source network, that all makes sense in the how-to. I can set up different routing tables based on the source IP address/network. It's the load balancing that is making me crazy - how do I put together a load-balancing mechanism for those combined T1s that makes sense?
Any advice or pointers?
thanks
- Greg Scott
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Signature · 22 lines
Sincerely, William L. Thomson Jr. Obsidian-Studios, Inc. 439 Amber Way Petaluma, Ca. 94952 Phone 707.766.9509 Fax 707.766.8989 http://www.obsidian-studios.com -- Sincerely, William L. Thomson Jr. Support Group Obsidian-Studios Inc. 439 Amber Way Petaluma, Ca. 94952 Phone 707.766.9509 Fax 707.766.8989 http://www.obsidian-studios.com _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 3 lines · Greg Scott
I am trying to figure out how to do this: I've tried the howto but just become hopelessly confused. (I don' think this is a problem in the howto, it's a problem with my comprehension.)
What you want is hard in general.
Quoted 2 lines
And I need the ability to change this policy at will, so I can let other departments use the combined T1s as needed.
Incoming or outgoing? Outgoing is pretty easy - just make policy rules to route traffic from different department differently, and use TEQL to distribute outgoing traffic.
Quoted 4 lines
I think I can figure out how to route based on the source network, that all makes sense in the how-to. I can set up different routing tables based on the source IP address/network. It's the load balancing that is making me crazy - how do I put together a load-balancing mechanism for those combined T1s that makes sense?
TEQL is probably your best bet. There is also the nano-howto by Julian Anastasov.
Regards,
bert
Signature · 6 lines
http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi,
I've been reading the LARTC HOWTO (major kudos to everyone who
contributed by the way - this is a "great leap forward" in LARTC documentation!) and looking at section 4.2.2 it is a clear answer to one of the commonly asked questions.
In addition though, I'm wondering a few things. Using the
multipath strategy - how is failure handled? If one link fails will connections be routed consistently onto the good link? And if the bad link starts working again will that be detected?
Also I'm assuming that it is basically a round-robin type strategy
(assuming equal weights). Once a connection is assigned to one link, it cannot be reassigned. Is there any provision for if a connection (or connections) saturates one link, will the other link then exclusively be used until the saturated one is no longer full?
Paul
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] load balancing
In reply to Greg ScottHi,
Is it possible to balance load over 2 interfaces ...
Let say I'm shapping traffic on eth1, and for some reason, eth1 brokes down. How do I, dynamically, swap to eth0 so I wont stop my traffic going thru the box?
Am I clear?. Please for give me for my english since it is not my native languaje.
regards
Lucas
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] load balancing
In reply to Greg ScottYes it is
I'm running it over 3 lines very nicely
Just use :
/sbin/ip route add equalize \
nexthop via $ADSL_GW1 dev $ADSL_IFACE1 weight 1\
nexthop via $ADSL_GW2 dev $ADSL_IFACE2 weight 1\
nexthop via $ADSL_GW3 dev $ADSL_IFACE3 weight 1Quoted 11 lines · Lucas Aimaretto
Hi,
Is it possible to balance load over 2 interfaces ...
Let say I'm shapping traffic on eth1, and for some reason, eth1 brokes down. How do I, dynamically, swap to eth0 so I wont stop my traffic going thru the box?
Am I clear?. Please for give me for my english since it is not my native languaje.
Quoted 6 lines
regards
Lucas
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] load balancing
In reply to Greg ScottI tried this and it works when an interface goes down, but how can I do if it's not an interface but one of these gateways that goes down? I would like that in this case, the apropriate "nexthop" drops too, so my traffic goes through the other two, and when that fallen gateway is once again alive, the "nexthop" comes alive too, so it's once again used. How can I do this?
Regards,
Víctor
Quoted 45 lines · Sjaak Nabuurs
Yes it is
I'm running it over 3 lines very nicely
Just use :
/sbin/ip route add equalize \ nexthop via $ADSL_GW1 dev $ADSL_IFACE1 weight 1\ nexthop via $ADSL_GW2 dev $ADSL_IFACE2 weight 1\ nexthop via $ADSL_GW3 dev $ADSL_IFACE3 weight 1Quoted 11 lines · Lucas Aimaretto
Hi,
Is it possible to balance load over 2 interfaces ...
Let say I'm shapping traffic on eth1, and for some reason, eth1 brokes down. How do I, dynamically, swap to eth0 so I wont stop my traffic going thru the box?
Am I clear?. Please for give me for my english since it is not my native languaje.
Quoted 8 lines
regards
Lucas
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] load balancing
In reply to Greg ScottHello Víctor,
: I tried this and it works when an interface goes down, but how can I do : if it's not an interface but one of these gateways that goes down? I : would like that in this case, the apropriate "nexthop" drops too, so my : traffic goes through the other two, and when that fallen gateway is : once again alive, the "nexthop" comes alive too, so it's once again : used. How can I do this?
You probably should try out the dead gateway detection patches by Julian Anastasov [1] documented here [2].
I have not yet used the DGD patches, but my understanding is that they'll detect unreachability of the nexthop and mark a route as dead until the nexthop becomes reachable again.
As I'm sure you can imagine, it's much more difficult to identify problems further upstream--and that's what dynamic routing protocols are for, anyway.
: >/sbin/ip route add equalize \
: > nexthop via $ADSL_GW1 dev $ADSL_IFACE1 weight 1\ : > nexthop via $ADSL_GW2 dev $ADSL_IFACE2 weight 1\ : > nexthop via $ADSL_GW3 dev $ADSL_IFACE3 weight 1
Best of luck,
-Martin
[1] http://www.ssi.bg/~ja/#routes
[2] http://www.ssi.bg/~ja/dgd-usage.txt
Signature · 5 lines
Martin A. Brown --- SecurePipe, Inc. --- [email protected] _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] load balancing
In reply to Greg ScottHi!
Can somebody tell what is the best way for load balancing with one ISP.
Here is the scenario (there is a LAN behind the wireless clients):
linux wireless client--------\
---Access Point (Orinoco
AP1000)----linux router----ISP
linux wireless client--------/
The two wireless clients are connected to the two different wireless interfaces of the Access Point.
They could be two PC's or one PC with two wi-fi cards (I don't think it matters). Since the configuration is in use now it is not recommended to make very long lasting experiments:).
The idea is to balance (increase) the speed for the PC's behind the wireless client(s). Single wireless client achieves 5Mbit/s, but is shaped to 4 Mbit/s since at 5Mbit there is big lag, so a PC in the LAN when using static routes can't use more than 4Mbit even the other channel is free.
Has somebody some experience with similar configuration, and what is the best solution:
(t)eql, multipath routing, some variant of bonding, something else? Is it at all possible to use bonding in such situation?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] load balancing
In reply to Greg ScottQuoted 9 lines · Евгени Гечев
Hi!
Can somebody tell what is the best way for load balancing with one ISP.
Here is the scenario (there is a LAN behind the wireless clients):linux wireless client--------\
---Access Point (Orinoco
AP1000)----linux router----ISP
linux wireless client--------/
Quoted 10 lines
The two wireless clients are connected to the two different wireless interfaces of the Access Point.
They could be two PC's or one PC with two wi-fi cards (I don't think it matters). Since the configuration is in use now it is not recommended to make very long lasting experiments:).
The idea is to balance (increase) the speed for the PC's behind the wireless client(s). Single wireless client achieves 5Mbit/s, but is shaped to 4 Mbit/s since at 5Mbit there is big lag, so a PC in the LAN when using static routes can't use more than 4Mbit even the other channel is free.
I would probably use CBQ + [e]SFQ. You can define classes for both linux wireless clients on the linux router which borrow traffic between each other and use [e]SFQ to equal connection speed inside these classes; or the [e]SFQ part may run on the linux wireless clients
Quoted 3 lines
Has somebody some experience with similar configuration, and what is the best solution:
(t)eql, multipath routing, some variant of bonding, something else?
multipath routing ... where you find multipath routes on that picture ? bonding ... it's applied in
PC1 | NIC | - - - - - - - - | NIC | PC2
| NIC | - - - - - - - - | NIC |
enviroment.
Quoted 8 lines
Is it at all possible to use bonding in such situation?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] load balancing
In reply to Greg ScottMaybe my question is not very clear, I'll try to explain again. I use imq+htb+wrr+esfq, but it has nothing to do with the problem. The limit is the physical line, a PC behind wireless clients can't use more than 4 mbit due to physical restriction, it just can't use the other wireless channel. The shaper on the router is 4Mbit for each wireless client, or 2*4Mbit=8Mbit total. So, I need a way to combine the channels, and it cannot be done with classes.
Quoted 28 lines · Ivo Vachkov
Quoted 9 lines · Евгени Гечев
Hi!
Can somebody tell what is the best way for load balancing with one ISP.
Here is the scenario (there is a LAN behind the wireless clients):linux wireless client--------\
---Access Point (Orinoco
AP1000)----linux router----ISP
linux wireless client--------/Quoted 10 lines
The two wireless clients are connected to the two different wireless interfaces of the Access Point.
They could be two PC's or one PC with two wi-fi cards (I don't think it matters). Since the configuration is in use now it is not recommended to make very long lasting experiments:).
The idea is to balance (increase) the speed for the PC's behind the wireless client(s). Single wireless client achieves 5Mbit/s, but is shaped to 4 Mbit/s since at 5Mbit there is big lag, so a PC in the LAN when using static routes can't use more than 4Mbit even the other channel is free.I would probably use CBQ + [e]SFQ. You can define classes for both linux wireless clients on the linux router which borrow traffic between each other and use [e]SFQ to equal connection speed inside these classes; or the [e]SFQ part may run on the linux wireless clients
Quoted 5 lines
Quoted 3 lines
Has somebody some experience with similar configuration, and what is the best solution:
(t)eql, multipath routing, some variant of bonding, something else?multipath routing ... where you find multipath routes on that picture ?
route1: linux router-->AP-->wireless client1-->PC
route2: linux router-->AP-->wireless client2-->PC
The PC is in the LAN behind wireless clients.
Quoted 5 lines
bonding ... it's applied in
PC1 | NIC | - - - - - - - - | NIC | PC2 | NIC | - - - - - - - - | NIC |
Yes. Adding one more ethernet card on the linux router leads to similar picture.
Quoted 14 lines
enviroment.
Quoted 8 lines
Is it at all possible to use bonding in such situation?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] load balancing
In reply to Greg ScottQuoted 7 lines · Evgeni Gechev
Maybe my question is not very clear, I'll try to explain again. I use imq+htb+wrr+esfq, but it has nothing to do with the problem. The limit is the physical line, a PC behind wireless clients can't use more than 4 mbit due to physical restriction, it just can't use the other wireless channel. The shaper on the router is 4Mbit for each wireless client, or 2*4Mbit=8Mbit total. So, I need a way to combine the channels, and it cannot be done with classes.
Maybe you need this?
http://lartc.org/howto/lartc.rpdb.multiple-links.html
Signature · 6 lines
pagarbiai, Artūras Šlajus _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] load balancing
In reply to Greg ScottQuoted 7 lines · Evgeni Gechev
Maybe my question is not very clear, I'll try to explain again. I use imq+htb+wrr+esfq, but it has nothing to do with the problem. The limit is the physical line, a PC behind wireless clients can't use more than 4 mbit due to physical restriction, it just can't use the other wireless channel. The shaper on the router is 4Mbit for each wireless client, or 2*4Mbit=8Mbit total. So, I need a way to combine the channels, and it cannot be done with classes.
Hmm ... You're right. I thought you're asking about shaper configuration ... One way to combine both channels is to run a link between them and start link level routing protocol (OSPF for example) but the configuration becomes too expencive and somewhat unstable.
The other way to increase speed is to double the capacity of both links and then bond them or use another devices (probably run 802.11a devices at 54Mbps - for more info mail me offlist).
Quoted 45 lines
Quoted 29 lines · Ivo Vachkov
Quoted 9 lines · Евгени Гечев
Hi!
Can somebody tell what is the best way for load balancing with one ISP.
Here is the scenario (there is a LAN behind the wireless clients):linux wireless client--------\
---Access Point (Orinoco
AP1000)----linux router----ISP
linux wireless client--------/Quoted 10 lines
The two wireless clients are connected to the two different wireless interfaces of the Access Point.
They could be two PC's or one PC with two wi-fi cards (I don't think it matters). Since the configuration is in use now it is not recommended to make very long lasting experiments:).
The idea is to balance (increase) the speed for the PC's behind the wireless client(s). Single wireless client achieves 5Mbit/s, but is shaped to 4 Mbit/s since at 5Mbit there is big lag, so a PC in the LAN when using static routes can't use more than 4Mbit even the other channel is free.I would probably use CBQ + [e]SFQ. You can define classes for both linux wireless clients on the linux router which borrow traffic between each other and use [e]SFQ to equal connection speed inside these classes; or the [e]SFQ part may run on the linux wireless clients
Quoted 6 lines
Quoted 3 lines
Has somebody some experience with similar configuration, and what is the best solution:
(t)eql, multipath routing, some variant of bonding, something else?multipath routing ... where you find multipath routes on that picture ?
route1: linux router-->AP-->wireless client1-->PC
route2: linux router-->AP-->wireless client2-->PCThe PC is in the LAN behind wireless clients.
Quoted 1 line
Quoted 20 lines
Quoted 4 lines
bonding ... it's applied in
PC1 | NIC | - - - - - - - - | NIC | PC2 | NIC | - - - - - - - - | NIC |Yes. Adding one more ethernet card on the linux router leads to similar picture.
Quoted 11 lines
enviroment.
Quoted 8 lines
Is it at all possible to use bonding in such situation?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] Load Balancing
In reply to Greg ScottHi.
I´m making an script for load balancing of two
cablemodems internet connections toward my LAN.
The problem is that when I try to 'equalize' the the two internet connections with the weight=1 it doesn´t work. On the other hand, if I put 5 and 5 it works, but not at 100%, it does intermittlently, some times works and others don´t.
example:
ip route add default equalize\
nexthop via $P1 dev $IF1 weight 5\
nexthop via $P2 dev $IF2 weight 5
Besides, when I open, for example, the firefox browser, it takes a lot to start navigating, sometimes it works and other times gives an error and I can´t navigate.
From the server it works properly, but form the clients PCs doesn´t.
By the way, I´m making NAT toward the Client PCs.
Do you have any idea why does it take so long to start navigating and why sometimes it works and sometimes doesn´t.
This is the current script running in my server:
#========================
P0_NET.0.1.0/24
IF0=eth1
IP0.0.1.1
IF1=eth0
IP1=xxx.xxx.xxx.7
P1_NET=xxx.xxx.xxx.0/24
P1=xxx.xxx.xxx.1
IF2=eth2
IP2=yyy.yyy.yyy.21
P2_NET=yyy.yyy.yyy.0/24
P2=yyy.yyy.yyy.1
echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth2/rp_filter
echo 3 > /proc/sys/net/ipv4/route/gc_elasticity
echo 1 > /proc/sys/net/ipv4/route/gc_interval
echo 0 > /proc/sys/net/ipv4/route/gc_timeout
ip route flush cache
ip route flush all
ip route flush table modem0
ip route flush table modem1
ip rule add from $IP1 lookup modem0
ip rule add from $IP2 lookup modem1
ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2
ip route add $P0_NET dev $IF0 src $IP0
ip rule add from $P1_NET lookup modem0
ip route add $P0_NET dev $IF0 table modem0
ip route add 0/0 via $P1 table modem0
ip rule add from $P2_NET lookup modem1
ip route add $P0_NET dev $IF0 table modem1
ip route add 0/0 via $P2 table modem1
ip route add default equalize\
nexthop via $P1 dev $IF1 weight 5\
nexthop via $P2 dev $IF2 weight 5
#========================
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Load Balancing
In reply to Greg ScottAny idea?
----- Original Message -----
From: "XMundo - Soporte Tecnico" <[email protected]>
To: <[email protected]>
Sent: Sunday, July 25, 2004 10:35 PM
Subject: [LARTC] Load Balancing
Hi.
I´m making an script for load balancing of two
cablemodems internet connections toward my LAN.
The problem is that when I try to 'equalize' the the two internet connections with the weight=1 it doesn´t work. On the other hand, if I put 5 and 5 it works, but not at 100%, it does intermittlently, some times works and others don´t.
example:
ip route add default equalize\
nexthop via $P1 dev $IF1 weight 5\
nexthop via $P2 dev $IF2 weight 5
Besides, when I open, for example, the firefox browser, it takes a lot to start navigating, sometimes it works and other times gives an error and I can´t navigate.
From the server it works properly, but form the clients PCs doesn´t.
By the way, I´m making NAT toward the Client PCs.
Do you have any idea why does it take so long to start navigating and why sometimes it works and sometimes doesn´t.
This is the current script running in my server:
#========================
P0_NET.0.1.0/24
IF0=eth1
IP0.0.1.1
IF1=eth0
IP1=xxx.xxx.xxx.7
P1_NET=xxx.xxx.xxx.0/24
P1=xxx.xxx.xxx.1
IF2=eth2
IP2=yyy.yyy.yyy.21
P2_NET=yyy.yyy.yyy.0/24
P2=yyy.yyy.yyy.1
echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth2/rp_filter
echo 3 > /proc/sys/net/ipv4/route/gc_elasticity
echo 1 > /proc/sys/net/ipv4/route/gc_interval
echo 0 > /proc/sys/net/ipv4/route/gc_timeout
ip route flush cache
ip route flush all
ip route flush table modem0
ip route flush table modem1
ip rule add from $IP1 lookup modem0
ip rule add from $IP2 lookup modem1
ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2
ip route add $P0_NET dev $IF0 src $IP0
ip rule add from $P1_NET lookup modem0
ip route add $P0_NET dev $IF0 table modem0
ip route add 0/0 via $P1 table modem0
ip rule add from $P2_NET lookup modem1
ip route add $P0_NET dev $IF0 table modem1
ip route add 0/0 via $P2 table modem1
ip route add default equalize\
nexthop via $P1 dev $IF1 weight 5\
nexthop via $P2 dev $IF2 weight 5
#========================
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] load balancing
In reply to Greg Scotthi, question.
i was reading the howto, and the part about load balancing talk about to providers, well i have one provider and make to dial-modem conection, so i have the same gateway in both (ppp0 and ppp1) but to diferent IP.
what do i have to do?
just set up the default route to be a multipath route?
or do i need to split the access?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] load balancing
In reply to Greg ScottHello,
Quoted 2 lines · On Wed, Sep 15, 2004 at 01:10:40PM -0400, [email protected] wrote:
hi, question.
i was reading the howto, and the part about load balancing talk about to
You mean 'two providers', right?
Quoted 8 lines
providers, well i have one provider and make to dial-modem conection, so i have the same gateway in both (ppp0 and ppp1) but to diferent IP.
what do i have to do?
just set up the default route to be a multipath route?
or do i need to split the access?
This might be helpful reading:
http://www.ssi.bg/~ja/
http://www.ssi.bg/~ja/nano.txt
Glen
Signature · 8 lines
****************************************************************** Glen W. Mabey [email protected] http://mabeys.homelinux.com/glen/ ****************************************************************** _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] load balancing
In reply to Greg ScottHi everyone.
I have two ADSL connection with the same ISP,
ppp0 => 83.32.32.36 <=> 192.168.153.1
ppp1 => 83.32.45.33 <=> 192.168.153.1and I want to do load balancing wiht the two connections, so I do:
#ip route add default scope global nexthop via 192.153..1.1 dev 83.32.32.36 weight 1 nexthop via 192.168.153.1 dev 83.32.45.33 weight 1
#ip route show
192.153.1.1 dev ppp0 proto kernel scope link src 83.32.32.36
192.153.1.1 dev ppp1 proto kernel scope link src 83.32.45.33
default
nexthop via 192.168.153.1 dev ppp0 weight 1
nexthop via 192.168.153.1 dev ppp1 weight 1But this do not work, when I try do ping www.google.es this do not work and I get the mesage "MASQUERADE: Route sent us somewhere else" I am using the 2.6.8 kernel. Anybody can help me? please.
Thanks you.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] load balancing
In reply to Greg ScottHi, I have 2 routers that are connected using 2 gre tunnels over ipsec, and ospf. Ospf sets up the equal cost route, but uses the 'equalize' in the route. Is there a way to remove/disable packet based load balancing? I would just like to do a flow based load balance?
thx jason
[LARTC] load balancing
In reply to Greg Scotttry this
echo "11 line1" >> /etc/iproute2/rt_tables
echo "12 line2" >> /etc/iproute2/rt_tables
ip route add 1.2.3.0/29 <http://203.115.26.64/29> dev eth0 src 1.2.3.6<http://203.115.26.66/>table line1
ip route add default via 1.2.3.5 <http://203.115.26.65/> table line1
ip route add 192.168.6.0/24 dev eth1 src 192.168.6.4 table line2 ip route add default via 192.168.6.254 table line2
ip rule add from1.2.3.6 <http://203.115.26.66/> table line1 ip rule add from 192.168.6.4 table line2
ip route add default scope global nexthop via 1.2.3.5<http://203.115.26.65/>dev eth0 weight 1 nexthop via 192.168.6.254 dev eth1 weight 1
pls change ips accordingly. and add these to rc.local file
Signature · 2 lines
Thank you Indunil Jayasooriya
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
[LARTC] load balancing
In reply to Greg Scotthttp://www.linuxquestions.org/linux/answers/Networking/Spanning_Multiple_DSLs
Signature · 2 lines
Thank you Indunil Jayasooriya
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
[LARTC] load balancing
In reply to Greg ScottI ive set up a working linux router with load balancing as per the lartc guide. Everything is working properly, except for the load balancing does not seem to be equally balance the load. The first line gets about 60% of the incoming load, the 2nd line gets about 40%, and the 3rd line hardly gets any of it at all. The outgoing load is evenly balanced among all three lines.
I did not set any weights when I set up the route, so this is confusing to me. BTW, I have been using ntop as well as ibmonitor to view the load over each line.
when I have tried setting weights, such as 1 for the first line, 2 for the second line, and 4 for the second line, it still doesn't balance correctly.
I am using fedora core 6 with all the latest packages and kernel as per yum.
any ideas here would be greatly appreciated
thanks
-charlie
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Re: [LARTC] load balancing
In reply to Greg ScottQuoted 11 lines · Charlie Meyer
I ive set up a working linux router with load balancing as per the lartc guide. Everything is working properly, except for the load balancing does not seem to be equally balance the load. The first line gets about 60% of the incoming load, the 2^nd line gets about 40%, and the 3^rd line hardly gets any of it at all. The outgoing load is evenly balanced among all three lines.
I did not set any weights when I set up the route, so this is confusing to me. BTW, I have been using ntop as well as ibmonitor to view the load over each line.
Quoted 7 lines
when I have tried setting weights, such as 1 for the first line, 2 for the second line, and 4 for the second line, it still doesn’t balance correctly.
I am using fedora core 6 with all the latest packages and kernel as per yum.
any ideas here would be greatly appreciated
Keep in mind that you do not have any control of the traffic that is inbound to you. The only thing that you can control is the traffic that you send.
So, what is probably happening is that your system is load balancing the out bound traffic, which is being replied to by the server. Consider you have 3 connections, one out bound request each. Unless you are dealing with globally routable IP addresses behind your system and are not NATing at your system, responses to out bound requests will come back in to the same IP that the request originated from. With that in mind, consider one reply being a 512 byte response, one reply being a 1k byte response, and one reply being a 20 k byte response. In this case, one connection will receive 512 bytes, another 1 k byte, and the last 20 k bytes.
I think we can all agree that this is FAR from a load balanced scenario.
However, we do not have any control over the reverse route, this is at
best our providers control. If each link is with a different provider, there is no way to load balance the traffic back to our system. If, by chance the links are all with one provider and they are willing to work with you and you do not have any reverse path filtering in place, the provider could spread the load across all the links evenly. However, this is way beyond the scope of "Load Balancing" under Linux, or any thing else for that matter, and thus is more or less just accepted.
If you would like, I can go in to more depth as to why this does not work as is and what would have to be done to make this work.
Incidentally, this is also why QoS does not really work well on inbound.
Grant. . . .
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc