RE: Using Multiple Internet Connections with FreeBSD

2005-07-15 Thread Ted Mittelstaedt

There isn't any such thing unless you speak BGP and minimum cost
of entry on that (at least in the United States) are 2 T1's and
a business justification to consume a minimum of a /20 of address
space, so that you can obtain your own AS #.

The fee on a /20 is about $2,250.00 a year.

Now, if you go to your ISP and get multiple T1's from him you can
do multilink PPP out of the box and aggregate as much as you want.
We have a couple customers we do this with who have 3Mbt links to
us.

No T1s?  Well, if all you want is DSL, then if you get two DSL lines
from your ISP, you might manage something.  He would have to setup to
speak
multilink PPP to you.  It's possible.  If you were a customer of
my employer and willing to drop a couple grand into a Cisco 2600 with 2
ADSL cards in it, I might even be willing configure this on our
side.

You need to think carefully about how networking operates and you
will eventually understand why what you want isn't possible.  (and
no, it's not because us dirty ISP's want to screw you little guys)

The closest you can get is multiple DSL lines to multiple gateways
inside your network, then set half of your machines up to use one
gateway, the other half to use the other.  That will give you more
combined bandwidth, but still any given individual transfer will
be limited to the max speed of the DSL line to the particular gateway
in use.  (exactly the same problem with the ipfw trick below)

I've responded to many of these kinds of posts over the years in
various forums.  Virtually all of them are people who want to get
2 $19.95 a month DSL lines that are classed as residential service,
instead of a single faster DSL line that is classed as business
service and is more expensive.  Rest assured that if such a thing
were possible (which it isn't) every ISP on the planet would take
steps to block it.

Ted

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of John Barbieri
Sent: Thursday, July 14, 2005 10:20 AM
To: Philip Hallstrom
Cc: freebsd-questions@freebsd.org
Subject: Re: Using Multiple Internet Connections with FreeBSD


Thanks for the reply, but this isnt exactly what I was looking for.

This one is used to force packets out to a specific network depending on
the destination IP address and such.


I was looking for something that would allow for both rundunancy and
speed increase, similar to PPP multi-link or connection teaming (which,
from what ive read, can effecticly double bandwidth).

Thanks again

John

Philip Hallstrom wrote:

 To start off, I have a FreeBSD router running Nat and dhcp, it is
 currently the router for my LAN.

 I was wondering if there was a way to aggregate more then
one internet
 connection using FreeBSD?

 That is, have 2 or 3 internet connections coming in on seperate NICs,
 and being able to have the box route and nat the packets
accordingly to
 the lan, thus giving the experience of more bandwidth. Is it even
 possible?

 Has someone done it before? and if you have, do you have a
webpage that
 you followed instructions from?


 I haven't done it, but I've saved the following email/posts that
 talked about this...  I've left them intact so you can see
the context...

 good luck!

 From [EMAIL PROTECTED] Wed Dec 24 09:35:16 2003

 Date: Fri,  3 Nov 2000 18:46:34 -0600
 From: Gerd Knops [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Simon Nielsen [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Two ISP's. Two IP. One default route...

 Simon Nielsen wrote:

 Hello

 I currently have two internet connections though two different ISP's.
 One is a ADSL and another is shared with the rest of my dorm. The
 shared line is rather slow because many people are using it.

 I must have an IP on the shared connection since that's the only
 place where I can be sure to have a non changing IP for my DNS. But
 the ADSL is much faster so I would like to use that as much as
 possible.

 I can give my machine an IP on each connection but I can of course
 only set one default route. The default route is currently set to the
 ADSL. The problem is that when a connection is made to IP on the
 shared connection my computer uses the ADSL IP to respond and that
 does not work.

 Is there a solution to this? I thought about maybe it is possible to
 route differently when a connection is made on the shared connection
 but I can't find out how to do it.

 Yes, it can be done (though I have not found it documented anywhere).
 I really think there should be separate routing tables for each
 interface, but I don't know of any such feature in any Unix.

 However ipfw can be abused for the above task. Assuming:

 - ipfw is set to pass on default
 - your ADSL IP/network is a.a.a.a/aa
 - your shared IP/network is s.s.s.s/ss
 - your ADSL gateway is set as default route
 - your shared gateway is s.s.s.gw

 the following ipfw rules do the trick:

 # Pass anything that should go via normal routes
 # This rule is really

Re: Using Multiple Internet Connections with FreeBSD

2005-07-15 Thread Ben Jencks
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John Barbieri [EMAIL PROTECTED] writes:

 Howdy,


 To start off, I have a FreeBSD router running Nat and dhcp, it is
 currently the router for my LAN.

 I was wondering if there was a way to aggregate more then one internet
 connection using FreeBSD?


 That is, have 2 or 3 internet connections coming in on seperate NICs,
 and being able to have the box route and nat the packets accordingly to
 the lan, thus giving the experience of more bandwidth. Is it even possible?

FreeBSD includes PF, which supports this.
http://www.openbsd.org/faq/pf/pools.html

You need to NAT to an address pool, with round-robin.
- -- 
Ben
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFC14TUpt3yYclAKVsRArs/AKCT6FmcsD8Y61uEpWEUFZfTsPx0XgCdGG75
KyXDfTEOUdskYOTXLTMa7m0=
=99tH
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Using Multiple Internet Connections with FreeBSD

2005-07-14 Thread John Barbieri
Thanks for the reply, but this isnt exactly what I was looking for.

This one is used to force packets out to a specific network depending on
the destination IP address and such.


I was looking for something that would allow for both rundunancy and
speed increase, similar to PPP multi-link or connection teaming (which,
from what ive read, can effecticly double bandwidth).

Thanks again

John

Philip Hallstrom wrote:

 To start off, I have a FreeBSD router running Nat and dhcp, it is
 currently the router for my LAN.

 I was wondering if there was a way to aggregate more then one internet
 connection using FreeBSD?

 That is, have 2 or 3 internet connections coming in on seperate NICs,
 and being able to have the box route and nat the packets accordingly to
 the lan, thus giving the experience of more bandwidth. Is it even
 possible?

 Has someone done it before? and if you have, do you have a webpage that
 you followed instructions from?


 I haven't done it, but I've saved the following email/posts that
 talked about this...  I've left them intact so you can see the context...

 good luck!

 From [EMAIL PROTECTED] Wed Dec 24 09:35:16 2003

 Date: Fri,  3 Nov 2000 18:46:34 -0600
 From: Gerd Knops [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Simon Nielsen [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Two ISP's. Two IP. One default route...

 Simon Nielsen wrote:

 Hello

 I currently have two internet connections though two different ISP's.
 One is a ADSL and another is shared with the rest of my dorm. The
 shared line is rather slow because many people are using it.

 I must have an IP on the shared connection since that's the only
 place where I can be sure to have a non changing IP for my DNS. But
 the ADSL is much faster so I would like to use that as much as
 possible.

 I can give my machine an IP on each connection but I can of course
 only set one default route. The default route is currently set to the
 ADSL. The problem is that when a connection is made to IP on the
 shared connection my computer uses the ADSL IP to respond and that
 does not work.

 Is there a solution to this? I thought about maybe it is possible to
 route differently when a connection is made on the shared connection
 but I can't find out how to do it.

 Yes, it can be done (though I have not found it documented anywhere).
 I really think there should be separate routing tables for each
 interface, but I don't know of any such feature in any Unix.

 However ipfw can be abused for the above task. Assuming:

 - ipfw is set to pass on default
 - your ADSL IP/network is a.a.a.a/aa
 - your shared IP/network is s.s.s.s/ss
 - your ADSL gateway is set as default route
 - your shared gateway is s.s.s.gw

 the following ipfw rules do the trick:

 # Pass anything that should go via normal routes
 # This rule is really just to speed up the bulk
 # of the packets
 add 1000 allow all from a.a.a.a to any
 # Pass anything to local addresses on ADSL network
 add 1010 allow all from any to a.a.a.a/aa
 # Pass anything to local addesses on shared network
 add 1020 allow all from any to s.s.s.s/ss
 # And here the trick: if the source address is the one
 # from the shared network, pass packets to the
 # gateway on the shared network
 add 1030 fwd s.s.s.gw all from s.s.s.s to any

 With the above connections will leave your system on the same route
 they entered it. Great for redundant mail and dns setup!

 If you already use ipfw you need to adapt the above rules accordingly.
 The important part is that packets coming from your host's shared
 address going to the 'outside' (and only those packets) are forwarded
 to the shared networks gateway.

 Gerd


 From [EMAIL PROTECTED] Wed Dec 24 09:35:23 2003

 Date: Sat, 4 Nov 2000 09:34:48 -0600 (CST)
 From: Mike Meyer [EMAIL PROTECTED]
 To: Simon Nielsen [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Two ISP's. Two IP. One default route...
 Resent-Date: Wed, 24 Dec 2003 10:35:16 -0800 (PST)
 Resent-From: Philip Hallstrom [EMAIL PROTECTED]
 Resent-To: Philip Hallstrom [EMAIL PROTECTED]
 Resent-Subject: Re: Two ISP's. Two IP. One default route...

 Simon Nielsen [EMAIL PROTECTED] types:

 I currently have two internet connections though two different ISP's.
 One is a ADSL and another is shared with the rest of my dorm. The shared
 line is rather slow because many people are using it.

 I must have an IP on the shared connection since that's the only place
 where I can be sure to have a non changing IP for my DNS. But the ADSL
 is much faster so I would like to use that as much as possible.


 Question: what are you using the static IP for? I.e. - who connects to
 it, and vice versa?

 I can give my machine an IP on each connection but I can of course only
 set one default route. The default route is currently set to the ADSL.
 The problem is that when a connection is made to IP on the shared
 connection my computer uses the ADSL IP to respond and that does not
 

Re: Using Multiple Internet Connections with FreeBSD

2005-07-14 Thread Александр Деревянко

John Barbieri wrote:


Howdy,


To start off, I have a FreeBSD router running Nat and dhcp, it is
currently the router for my LAN.

I was wondering if there was a way to aggregate more then one internet
connection using FreeBSD?


That is, have 2 or 3 internet connections coming in on seperate NICs,
and being able to have the box route and nat the packets accordingly to
the lan, thus giving the experience of more bandwidth. Is it even possible?


Has someone done it before? and if you have, do you have a webpage that
you followed instructions from?

Ive been searching around, but I have not been able to find a straight
answer. I was hoping you guys could help
 

As it seems for me, it is not directly possible. 
Teoretically, you can have a non-tree network topology,

but in that case all upstream routers must know both way,
how to access you host. Or you must have very smart
NAT daemon, to perform round-robin.


From my point of view, the easiest method can be the following,

assuming you need only outgoing web surf connection:

1. Run two different squid processes on the two different routers, with very 
small cache size on it. Configure them to access internet via different 
connections. Also, you will need to configure dnsservers processes accordingly, 
to use different connections also.
2. Run third squid internally in the lan 
with possible big cache, and configure it to perform round-robin.


In that case you will have scalability and availability.

Instead of having different routers, you can run squid processes in jails.

--
Best Regards,
Alexander Derevianko

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Using Multiple Internet Connections with FreeBSD

2005-07-13 Thread John Barbieri
Howdy,


To start off, I have a FreeBSD router running Nat and dhcp, it is
currently the router for my LAN.

I was wondering if there was a way to aggregate more then one internet
connection using FreeBSD?


That is, have 2 or 3 internet connections coming in on seperate NICs,
and being able to have the box route and nat the packets accordingly to
the lan, thus giving the experience of more bandwidth. Is it even possible?


Has someone done it before? and if you have, do you have a webpage that
you followed instructions from?

Ive been searching around, but I have not been able to find a straight
answer. I was hoping you guys could help


Thanks in advance

John
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Using Multiple Internet Connections with FreeBSD

2005-07-13 Thread Louis LeBlanc
On 07/13/05 11:28 AM, John Barbieri sat at the `puter and typed:
 Howdy,
 
 
 To start off, I have a FreeBSD router running Nat and dhcp, it is
 currently the router for my LAN.
 
 I was wondering if there was a way to aggregate more then one internet
 connection using FreeBSD?
 
 
 That is, have 2 or 3 internet connections coming in on seperate NICs,
 and being able to have the box route and nat the packets accordingly to
 the lan, thus giving the experience of more bandwidth. Is it even possible?
 
 
 Has someone done it before? and if you have, do you have a webpage that
 you followed instructions from?
 
 Ive been searching around, but I have not been able to find a straight
 answer. I was hoping you guys could help

I'm afraid I can't help much, but for starters, you probably need to
be clear on external services as well.  You also want to mention the
version of FreeBSD you are/intend to use, as it will affect the up
front work needed and/or the available utilities.

If external services are part of your bandwidth concerns, you should
be able to isolate internal NAT functionality away from one connection
to restrict it to external services.

If you have multiple internal LANs, you should be able to isolate them
to dedicated external connections as well.  This would be easiest if
you had a separate internal NIC for each external NIC, but that might
be overkill, and probably isn't necessary if you simply use a simple
100Mb router with full duplex capabilities.

If you're looking for load balancing NAT, meaning any outbound traffic
from an internal LAN automagically picks the least saturated
connection, then you probably want to use an advanced firewall utility
and get on the users list for that tool.  I *think* pf can do this,
but I'm not sure.  I'm certainly not qualified to tell you HOW to do
it with any firewall utility, but I've found pf to be easier for
simple firewalls at least.

Try this link:
http://www.openbsd.org/faq/pf/index.html
It is probably worth your time to get on the mailing list.  The folks
there should be most qualified to help you with this.

Keep in mind, depending on your solution, it may also be necessary to
set up various routes through /etc/rc.conf (this is the one thing that
always confused me enough to keep me out of network admin work).

This exact scenario had occurred to me in the past, but I never had
the time to investigate it more thoroughly, or the connections to play
with.  Sorry I couldn't be more helpful, but I hope this gets you
closer to the mark.

Lou
-- 
Louis LeBlanc  FreeBSD-at-keyslapper-DOT-net
Fully Funded Hobbyist,   KeySlapper Extrordinaire :)
Please send off-list email to: leblanc at keyslapper d.t net
Key fingerprint = C5E7 4762 F071 CE3B ED51  4FB8 AF85 A2FE 80C8 D9A2

ink, n.:
  A villainous compound of tannogallate of iron, gum-arabic, and water,
  chiefly used to facilitate the infection of idiocy and promote
  intellectual crime.
-- H.L. Mencken


pgpuaNBr1wIGk.pgp
Description: PGP signature


Re: Using Multiple Internet Connections with FreeBSD

2005-07-13 Thread Philip Hallstrom

To start off, I have a FreeBSD router running Nat and dhcp, it is
currently the router for my LAN.

I was wondering if there was a way to aggregate more then one internet
connection using FreeBSD?

That is, have 2 or 3 internet connections coming in on seperate NICs,
and being able to have the box route and nat the packets accordingly to
the lan, thus giving the experience of more bandwidth. Is it even possible?

Has someone done it before? and if you have, do you have a webpage that
you followed instructions from?


I haven't done it, but I've saved the following email/posts that talked 
about this...  I've left them intact so you can see the context...


good luck!


From [EMAIL PROTECTED] Wed Dec 24 09:35:16 2003

Date: Fri,  3 Nov 2000 18:46:34 -0600
From: Gerd Knops [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Simon Nielsen [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Two ISP's. Two IP. One default route...

Simon Nielsen wrote:

Hello

I currently have two internet connections though two different ISP's.
One is a ADSL and another is shared with the rest of my dorm. The
shared line is rather slow because many people are using it.

I must have an IP on the shared connection since that's the only
place where I can be sure to have a non changing IP for my DNS. But
the ADSL is much faster so I would like to use that as much as
possible.

I can give my machine an IP on each connection but I can of course
only set one default route. The default route is currently set to the
ADSL. The problem is that when a connection is made to IP on the
shared connection my computer uses the ADSL IP to respond and that
does not work.

Is there a solution to this? I thought about maybe it is possible to
route differently when a connection is made on the shared connection
but I can't find out how to do it.

Yes, it can be done (though I have not found it documented anywhere). 
I really think there should be separate routing tables for each 
interface, but I don't know of any such feature in any Unix.


However ipfw can be abused for the above task. Assuming:

- ipfw is set to pass on default
- your ADSL IP/network is a.a.a.a/aa
- your shared IP/network is s.s.s.s/ss
- your ADSL gateway is set as default route
- your shared gateway is s.s.s.gw

the following ipfw rules do the trick:

# Pass anything that should go via normal routes
# This rule is really just to speed up the bulk
# of the packets
add 1000 allow all from a.a.a.a to any
# Pass anything to local addresses on ADSL network
add 1010 allow all from any to a.a.a.a/aa
# Pass anything to local addesses on shared network
add 1020 allow all from any to s.s.s.s/ss
# And here the trick: if the source address is the one
# from the shared network, pass packets to the
# gateway on the shared network
add 1030 fwd s.s.s.gw all from s.s.s.s to any

With the above connections will leave your system on the same route 
they entered it. Great for redundant mail and dns setup!


If you already use ipfw you need to adapt the above rules accordingly. 
The important part is that packets coming from your host's shared 
address going to the 'outside' (and only those packets) are forwarded 
to the shared networks gateway.


Gerd



From [EMAIL PROTECTED] Wed Dec 24 09:35:23 2003

Date: Sat, 4 Nov 2000 09:34:48 -0600 (CST)
From: Mike Meyer [EMAIL PROTECTED]
To: Simon Nielsen [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Two ISP's. Two IP. One default route...
Resent-Date: Wed, 24 Dec 2003 10:35:16 -0800 (PST)
Resent-From: Philip Hallstrom [EMAIL PROTECTED]
Resent-To: Philip Hallstrom [EMAIL PROTECTED]
Resent-Subject: Re: Two ISP's. Two IP. One default route...

Simon Nielsen [EMAIL PROTECTED] types:

I currently have two internet connections though two different ISP's.
One is a ADSL and another is shared with the rest of my dorm. The shared
line is rather slow because many people are using it.

I must have an IP on the shared connection since that's the only place
where I can be sure to have a non changing IP for my DNS. But the ADSL
is much faster so I would like to use that as much as possible.


Question: what are you using the static IP for? I.e. - who connects to
it, and vice versa?


I can give my machine an IP on each connection but I can of course only
set one default route. The default route is currently set to the ADSL.
The problem is that when a connection is made to IP on the shared
connection my computer uses the ADSL IP to respond and that does not
work.

Is there a solution to this? I thought about maybe it is possible to
route differently when a connection is made on the shared connection but
I can't find out how to do it.


Well, if you can narrow down who connect on the shared connection, you
can add a route for those addresses pointing to the shared
connection. It's been about five years, but I used to do that, but if
the only people connecting to the shared IP are on the campus net, you
can add a route that