Joao Carneiro - DLS
2005-Mar-25 11:53 UTC
Routing Load balancing and traffic shaping through 2 ISP links
Hello,
I started off by reading the Linux Advanced Routing & Traffic Control Howto,
then searched a bit around the web.
I see many documents discussing these matters with kernel 2.2.x but they are
quite old, something around 1998-2000.
I have some questions but I might as well start by exposing my setup to clarify
things.
I have a couple of internet links: a leased line of 256kbit/s and an ADSL line
of 1024kbit/s.
The machine that currently manages them is a win2k3 server with MS ISA server
2k4 but it doesn''t makes any kind of load balancing, we just determine
that smtp traffic goes one way, the rest goes the other way and divided the
vpn''s load between the links using respective ip addresses.
Not a very bright setup, but it works.
I am trying to get more from these resources and I know that linux or BSD are a
better choice for this end than win2k3 + ISA. Just to make an example of the
current limitations, I can''t make packet filters redirect traffic, it
just flows away through the win2k3 default gateway. I can block it though.
+------------------+
\
|router 256kb/s |---- /
\
/+------------------+ /
\ +--------------------+
*------------*/ /
internal network *-----| win2k3 + MS ISA 2k4|------+-------|Linux router|
| Internet
/ | firewall + Proxy | | | |
|
/ +--------------------+ |
*------------*\ \
/ |
\+------------------+ \
|
|router 1024kb/s |---- \
|
+------------------+
+----------+
|Mail Relay|
+----------+
Now from the beginning:
What kernel is the most appropriate for this job? I''m thinking of the
lastest 2.4.x or the 2.6.11 now that it is officially ''all bug
free''.
By reading the howto I found one example that''s clearly what I have:
http://lartc.org/howto/lartc.rpdb.multiple-links.html
Since I only have ip space from one of the providers, I will have to masquerade
for the other.
If I based myself on this example, I would have the outbound routing solved.
But then again what about inbound traffic?! Would I have to do something like
round robin dns to give me some advantage or is there a more efficient way of
make it happen? Round robin DNS doesn''t know what link is more
''available'', I mean has more bandwidth available, if DNS was
the solution maybe with some way of adapting the replyes to the requests
dinamically by giving the appropriate ip address according to the bandwidth.
Even so, it would be nasty because it would be cached in DNS servers all over
the world...making all the work of making it happen useless.
I know nothing on routing protocols like OSPF or even RIP, just a basic
understanding that they exist and make routing something we all can live with.
Would I take advantage of them? Would it be secured?
Now for traffic shaping... I will address this later.
What other documentation should I read to get a grip on this?
Recommendable setup, useful docs, thoughts, ideas... Any contribution would be
gladly appretiated!
João Carneiro
Departamento de Sistemas e Tecnologias da Informação
jcarneiro@dls.pt
DLS - Projectos Automação e Manutenção, Lda
Tel.: 227 470 786 :: Fax: 227 470 787
Corey Hickey
2005-Apr-01 05:07 UTC
Re: Routing Load balancing and traffic shaping through 2 ISP links
Joao Carneiro - DLS wrote:> I have a couple of internet links: a leased line of 256kbit/s and > an ADSL line of 1024kbit/s.What is the upload speed of your ADSL line? ...and the leased line is symmetric, right; i.e. 256kbit down and 256kbit up?> What kernel is the most appropriate for this job?Having used both 2.4.x and 2.6.x on a very busy router doing that sort of thing, I would say that they are equal for the task in terms of stability. Other people''s opinions will vary. :) Most new development is for 2.6 these days, so I''d say go with 2.6.> By reading the howto I found one example that''s clearly what I have: > http://lartc.org/howto/lartc.rpdb.multiple-links.html >Since you have two very dissimilar lines, I would tentatively recommend routing traffic based upon your users'' needs for bandwidth and latency. Without knowing what kind of users you have I can''t recommend anything, but I can loosely describe a setup I used to administrate. ADSL line: 6000kbit down, 600kbit up - local web browsing/downloads - local streaming video viewing SDSL line: 1300kbit up, 1300kbit down * high priority, low bandwidth queue - internet games * medium priority, high bandwidth queue - incoming connections to our servers - ssh - email * low priority, any-remaining bandwidth queue - p2p traffic - unrecognized traffic * lowest priority, almost no bandwidth queue - bofh :-) Your setup is different and your users probably have different usage patterns, but there''s a lot of flexibility in this general approach. If you provide more details I may be able to help further. -Corey