Ideas for using several inetlinks

Ideas for using several inetlinks

Post by Steen Sude » Tue, 20 Aug 2002 02:37:27



I'm putting this up for a little debate since I'd like some qualified
comments.

I'd like to build a box which have purpuse of being a NAT-gateway for a
LAN to the internet. The access is going through four equally sized
2Mb/512Kb ADSLs, giving something that "feels" like a 8Mb/2Mb link.

Here's what I think is necessary.

Notes:
eth0: LAN, 10.0.0.1/8
eth1: WAN, 1.1.1.2, def. gw is 1.1.1.1
eth2: WAN, 2.2.2.2, def. gw is 2.2.2.1
eth3: WAN, 3.3.3.2, def. gw is 3.3.3.1
eth4: WAN, 4.4.4.2, def. gw is 4.4.4.1

1. Setup the routing.
Have to have the default route going out of our four interfaces:

# ip route add default equalize \
      nexthop via 1.1.1.1 dev eth1 \
      nexthop via 2.2.2.1 dev eth2 \
      nexthop via 3.3.3.1 dev eth3 \
      nexthop via 4.4.4.1 dev eth4

2. Setup four almost equal SNATs, since I do have four static and public
IPs. Something like:

# iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 1.1.1.2
# iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to 2.2.2.2
# iptables -t nat -A POSTROUTING -o eth3 -j SNAT --to 3.3.3.2
# iptables -t nat -A POSTROUTING -o eth4 -j SNAT --to 4.4.4.2

Brief:
First we tell the box that there's one default route, going out the four
WAN interfaces. This is the routingdecision.

After the routingdecision has been made, we tell the box that it has to
masquerade the outgoing packets as the interface they're leaving the box
from.

Can this be done with success?
What is missing if any?
Any comments, please?

--
Mvh. / Best regards,
S* Suder             <http://www.veryComputer.com/;
ICQ UIN                 4133803

 
 
 

Ideas for using several inetlinks

Post by Thomas Lauritse » Tue, 20 Aug 2002 03:51:52


Hi,

Take a look at section 4.2 in the "advanced routing & traffic control howto"
(http://www.veryComputer.com/). We have a setup like this connecting our lan to the
internet with two adsl connections and it works pretty well.

BR,
Thomas


> I'm putting this up for a little debate since I'd like some qualified
> comments.

> I'd like to build a box which have purpuse of being a NAT-gateway for a
> LAN to the internet. The access is going through four equally sized
> 2Mb/512Kb ADSLs, giving something that "feels" like a 8Mb/2Mb link.

> Here's what I think is necessary.

> Notes:
> eth0: LAN, 10.0.0.1/8
> eth1: WAN, 1.1.1.2, def. gw is 1.1.1.1
> eth2: WAN, 2.2.2.2, def. gw is 2.2.2.1
> eth3: WAN, 3.3.3.2, def. gw is 3.3.3.1
> eth4: WAN, 4.4.4.2, def. gw is 4.4.4.1

> 1. Setup the routing.
> Have to have the default route going out of our four interfaces:

> # ip route add default equalize \
>       nexthop via 1.1.1.1 dev eth1 \
>       nexthop via 2.2.2.1 dev eth2 \
>       nexthop via 3.3.3.1 dev eth3 \
>       nexthop via 4.4.4.1 dev eth4

> 2. Setup four almost equal SNATs, since I do have four static and public
> IPs. Something like:

> # iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 1.1.1.2
> # iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to 2.2.2.2
> # iptables -t nat -A POSTROUTING -o eth3 -j SNAT --to 3.3.3.2
> # iptables -t nat -A POSTROUTING -o eth4 -j SNAT --to 4.4.4.2

> Brief:
> First we tell the box that there's one default route, going out the four
> WAN interfaces. This is the routingdecision.

> After the routingdecision has been made, we tell the box that it has to
> masquerade the outgoing packets as the interface they're leaving the box
> from.

> Can this be done with success?
> What is missing if any?
> Any comments, please?

> --
> Mvh. / Best regards,
> S* Suder <http://www.veryComputer.com/;
> ICQ UIN 4133803


 
 
 

Ideas for using several inetlinks

Post by Steen Sude » Tue, 20 Aug 2002 04:38:03



> Hi,

> Take a look at section 4.2 in the "advanced routing & traffic control howto"
> (http://www.veryComputer.com/). We have a setup like this connecting our lan to the
> internet with two adsl connections and it works pretty well.

Been there already.

Have you followed the example in the LARTC HowTo? That is; how is the
masquerading set up?

Can you describe your setup compared to my suggestions?

<SNIP org. message>

--
Mvh. / Best regards,
S* Suder             <http://www.veryComputer.com/;
ICQ UIN                 4133803

 
 
 

Ideas for using several inetlinks

Post by Thomas Lauritse » Wed, 21 Aug 2002 21:55:11


Hi,

I just remembered reading this http://www.linuxvirtualserver.org/~julian/nano.txt. It's
more or less a complete description of what I did. Take a look - I think it'll answer
most of your questions.

BR,
Thomas

 
 
 

Ideas for using several inetlinks

Post by Steen Sude » Thu, 22 Aug 2002 05:02:21



> Hi,

> I just remembered reading this http://www.veryComputer.com/~julian/nano.txt. It's
> more or less a complete description of what I did. Take a look - I think it'll answer
> most of your questions.

I've actually implemented Julians solution in a two-link setup today.
But I still wonder why the two tables (201 and 202) has different priority.

Any comments on that?

--
Mvh. / Best regards,
S* Suder             <http://www.veryComputer.com/;
ICQ UIN                 4133803

 
 
 

Ideas for using several inetlinks

Post by Thomas Lauritse » Thu, 22 Aug 2002 07:40:28


Quote:> I've actually implemented Julians solution in a two-link setup today.

Cool :-)

Quote:> But I still wonder why the two tables (201 and 202) has different priority.

> Any comments on that?

I don't think that matters much. As I remember it, those tables are used when
the route already is decided (by table 222). Since they represent each route they
don't mach the same packets and their priority can be anything (as long as it's
above the priority of table 222).

It's briefly mentioned in the document as well. But I don't know why he did it
like that. I just guess he'd like the priority numbers to match the table numbers
or something...

BR,
Thomas

 
 
 

Ideas for using several inetlinks

Post by Steen Sude » Fri, 23 Aug 2002 18:42:40



> Hi,

> I just remembered reading this http://www.veryComputer.com/~julian/nano.txt. It's
> more or less a complete description of what I did. Take a look - I think it'll answer
> most of your questions.

I've implemented this solution with two 2048/512Kb links.
Sofar, the highest download has been approx. 3400Kb/s.
I have no reason to believe that the users are restraining themselves,
thus, I'm asking:

How close to the teoretical, total download are you with your setup
(figures, please)?

--
Mvh. / Best regards,
S* Suder             <http://www.veryComputer.com/;
ICQ UIN                 4133803

 
 
 

Ideas for using several inetlinks

Post by Thomas Lauritse » Sun, 25 Aug 2002 21:05:24


Quote:> How close to the teoretical, total download are you with your setup
> (figures, please)?

I don't have any hard figures at the moment, but I guess I've seen
something like 75 - 85 % load from time to time.

That's pretty ok, I think, especially when you consider this setup only
balances connections (not individual packets), only works on outbound
traffic, and doesn't take the actual load into account when balancing.

BR,
Thomas

 
 
 

1. xstart works several times then not - any idea?

Hi,

  I have Slackware 3 installed on a DEC Starion 922 120 MHZ Pentium, and
I've got an odd problem with xstart (actually xinit, I guess).

I installed fresh, configured for S3 - the DEC has Trio compatible, and
everything works great, I run in 1024x768 and no problem, fast as anything.
Fine, I shut machine off, come back next day - it still works, do it
again and when xstart is run its gets to xinit at the lines:

S3: acceler ... stuff ... (Patchlevel 0)
mmio_928, S3_generic

and it just hangs. I can ^C out with a can't access console message, I
can alt over to another pty, but X just won't come up.

I've tried re-installing X set, no good. I tried booting DOS & Win95
(thinking maybe something was getting inited) - no good. I tried
reinstalling networking, thinking something may be affected - no good.
I tried not shutting down - no good.

If I totally reinstall, reformatting the partition, everything works!
Then a few days later, bam. Never had a Windows problem, and I don't think
its hardware, since its persistant until reformat, then goes away.
I'm stumped. What am I missing?

Thanks
Mark Kaehny

2. xfig: max file size?

3. Using only one boot server for several subnets

4. looking for a vendor

5. Using setterm on several virtual terminals

6. Creating System Configuration Docume

7. Using several fonts in troff

8. NEW Hacking Virus?

9. Start a process using only one of several procs

10. route problem on system using several network adapters

11. PS/2 mice does not work in RHL8 after several uses of the PC

12. Using several IPs (IP Unnumbered) over one PPPoE session

13. Using yacc several times.... (FAQ?)