Multiple gateways?

2006-07-25 Thread Reuben A. Popp
Hello all,

Another quick question here.. I have a box with dual gb nics and I was curious 
if there was a relatively easy way to connect it to two separate gateways.  
For example, em0 is configured to be 10.223.223.223 with a gateway of 
10.223.223.254 and em1 is configured to be 10.224.224.224 with a gateway of 
10.224.224.254.

TIA
Reuben A. Popp

Information Technology Department
East Central College
1+ 636 583-5195 ext 2480
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple gateways?

2006-07-25 Thread Atom Powers

You need to have only one default gateway.
But you can use routed to configure other gateways.
Note: without a routing daemon all your gateways are default gateways,
this will almost certainly cause you problems.

On 7/25/06, Reuben A. Popp [EMAIL PROTECTED] wrote:

Hello all,

Another quick question here.. I have a box with dual gb nics and I was curious
if there was a relatively easy way to connect it to two separate gateways.
For example, em0 is configured to be 10.223.223.223 with a gateway of
10.223.223.254 and em1 is configured to be 10.224.224.224 with a gateway of
10.224.224.254.

TIA
Reuben A. Popp

Information Technology Department
East Central College
1+ 636 583-5195 ext 2480
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]




--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple gateways?

2006-07-25 Thread BSDServer Redes e Servidores
Hi there,

With ipfw you can do multiple diverts and natds on different ports,
choosing which traffic will use wich gateway by source or destiny.

xl0 = 192.168.1.2 - gw 192.168.1.1
xl1 = 10.0.0.2- gw 10.0.0.1

...
add divert 8669 ip from any to 192.168.1.2 via xl0 in
add divert 8669 ip from 172.16.0.0/16 to any 80 via xl1 out
add fwd 192.168.1.1 ip from 192.168.1.2 to any
add divert 8668 ip from any to 10.0.0.1 via xl1 in
add divert 8668 ip from 172.16.0.0/16 to any via xl1 in 
...

Suposing your default gateway is 10.0.0.1 and alternative gateway
is 192.168.1.1 and your network is 172.16.0.0, with this rules
your web requests are going through alterative gateway, and all the
rest through default gateway

Another way is using pf, where you can even do a round robin use
of both gateways, as in http://www.openbsd.org/faq/pf/pools.html.

[]'s

--
Rafael Mentz Aquino
BSDServer Ltda.
51 - 9847 8825

-- Original Message ---
From: Atom Powers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: freebsd-questions@freebsd.org
Sent: Tue, 25 Jul 2006 08:18:02 -0700
Subject: Re: Multiple gateways?

 You need to have only one default gateway.
 But you can use routed to configure other gateways.
 Note: without a routing daemon all your gateways are default 
 gateways, this will almost certainly cause you problems.
 
 On 7/25/06, Reuben A. Popp [EMAIL PROTECTED] wrote:
  Hello all,
 
  Another quick question here.. I have a box with dual gb nics and I was 
curious
  if there was a relatively easy way to connect it to two separate gateways.
  For example, em0 is configured to be 10.223.223.223 with a gateway of
  10.223.223.254 and em1 is configured to be 10.224.224.224 with a gateway 
of
  10.224.224.254.
 
  TIA
  Reuben A. Popp
 
  Information Technology Department
  East Central College
  1+ 636 583-5195 ext 2480
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to freebsd-questions-
[EMAIL PROTECTED]
 
 
 -- 
 --
 Perfection is just a word I use occasionally with mustard.
 --Atom Powers--
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
--- End of Original Message ---
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple gateways?

2006-07-25 Thread Rafael Aquino
Hi there,

With ipfw you can do multiple diverts and natds on different ports,
choosing which traffic will use wich gateway by source or destiny.

xl0 = 192.168.1.2 - gw 192.168.1.1
xl1 = 10.0.0.2- gw 10.0.0.1

...
add divert 8669 ip from any to 192.168.1.2 via xl0 in
add divert 8669 ip from 172.16.0.0/16 to any 80 via xl1 out
add fwd 192.168.1.1 ip from 192.168.1.2 to any
add divert 8668 ip from any to 10.0.0.1 via xl1 in
add divert 8668 ip from 172.16.0.0/16 to any via xl1 in 
...

Suposing your default gateway is 10.0.0.1 and alternative gateway
is 192.168.1.1 and your network is 172.16.0.0, with this rules
your web requests are going through alterative gateway, and all the
rest through default gateway

Another way is using pf, where you can even do a round robin use
of both gateways, as in http://www.openbsd.org/faq/pf/pools.html.

[]'s

--
Rafael Mentz Aquino
BSDServer Ltda.
51 - 9847 8825

-- Original Message ---
From: Atom Powers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: freebsd-questions@freebsd.org
Sent: Tue, 25 Jul 2006 08:18:02 -0700
Subject: Re: Multiple gateways?

 You need to have only one default gateway.
 But you can use routed to configure other gateways.
 Note: without a routing daemon all your gateways are default 
 gateways, this will almost certainly cause you problems.
 
 On 7/25/06, Reuben A. Popp [EMAIL PROTECTED] wrote:
  Hello all,
 
  Another quick question here.. I have a box with dual gb nics and I was 
curious
  if there was a relatively easy way to connect it to two separate gateways.
  For example, em0 is configured to be 10.223.223.223 with a gateway of
  10.223.223.254 and em1 is configured to be 10.224.224.224 with a gateway 
of
  10.224.224.254.
 
  TIA
  Reuben A. Popp
 
  Information Technology Department
  East Central College
  1+ 636 583-5195 ext 2480
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to freebsd-questions-
[EMAIL PROTECTED]
 
 
 -- 
 --
 Perfection is just a word I use occasionally with mustard.
 --Atom Powers--
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
--- End of Original Message ---
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Multiple gateways

2006-06-14 Thread Luis José Da Silva González

Greetings,

I'm having bad times trying to set up a kind of advance router with FreeBSD 6.1.
The system has 6 Network interfaces, 3 for adsl connections (one nic
for each adsl, same ISP) and other 3 for 3 sub networks class C
(192.168.2. 192.168.3. 192.168.4.)

The server is running Squid and is using only the first adsl
connection and thats ok.

I'm doing NAT with PF but the problem is when i try to nat each sub
network by each adsl connection.



nat on $adsl1 from $net1:network to any - ($adsl1)

nat on $adsl2 from $net2:network to any - ($adsl3)

nat on $adsl3 from $net3:network to any - ($adsl3)

but that doesn't' work, right now I'm NATing all sub networks with
adsl1 only and the others 2 adsl are being waste without use.

these adsl use dhcp to get the IP and here is the info

lease {
 interface adsl1;
 fixed-address 201.242.241.180;
 option subnet-mask 255.255.248.0;
 option routers 201.242.240.1;
 option domain-name-servers 200.44.32.13,200.44.32.12;
 option domain-name cantv.net;
 option broadcast-address 201.242.247.255;
 option dhcp-lease-time 11637;
 option dhcp-message-type 5;
 option dhcp-server-identifier 200.109.126.37;
 renew 3 2006/6/14 16:56:54;
 rebind 3 2006/6/14 18:09:37;
 expire 3 2006/6/14 18:33:53;
}


lease {
 interface adsl2;
 fixed-address 201.242.241.149;
 option subnet-mask 255.255.248.0;
 option routers 201.242.240.1;
 option domain-name-servers 200.44.32.13,200.44.32.12;
 option domain-name cantv.net;
 option broadcast-address 201.242.247.255;
 option dhcp-lease-time 19174;
 option dhcp-message-type 5;
 option dhcp-server-identifier 200.109.126.37;
 renew 3 2006/6/14 17:59:58;
 rebind 3 2006/6/14 19:59:47;
 expire 3 2006/6/14 20:39:45;
}

lease {
 interface adsl3;
 fixed-address 201.242.241.150;
 option subnet-mask 255.255.248.0;
 option routers 201.242.240.1;
 option domain-name-servers 200.44.32.13,200.44.32.12;
 option domain-name cantv.net;
 option broadcast-address 201.242.247.255;
 option dhcp-lease-time 11627;
 option dhcp-message-type 5;
 option dhcp-server-identifier 200.109.126.37;
 renew 3 2006/6/14 16:57:13;
 rebind 3 2006/6/14 18:09:52;
 expire 3 2006/6/14 18:34:07;
}

Note that the 3 adsl interfaces have the same gateway, but now, how i
can load balance or at least define the usage of each adsl connection
for my sub networks? I tried using route but the routing table always
use the interface of the first adsl.

Any ideas, suggestion?
thanks in advance.
--
Luis José Da Silva G.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Multiple gateways

2006-06-14 Thread fbsd
First problem is you can not run an dhcp server for your ISP IP
address.
You should be using dhclient on the NIC interface name facing the
public ISP.
ifconfig_rl0=DHCP# adsl 0
ifconfig_rl1=DHCP# adsl 1
ifconfig_rl2=DHCP# adsl 2

This will cover both dynamic and static IP address assigned by your
ISP to you.

The dhcp server on your gateway box should only contain lease info
for the 3 separate legs of your local LAN (192.168.2. 192.168.3.
192.168.4.).


The simplest way to utilize your 3 adsl connections to your ISP is
to allocate one adsl line per local LAN leg.

nat on $adsl0 from $net1:network to any - ($adsl0)

nat on $adsl1 from $net2:network to any - ($adsl1)

nat on $adsl2 from $net3:network to any - ($adsl2)





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Luis José
Da
Silva González
Sent: Wednesday, June 14, 2006 12:56 PM
To: freebsd-questions@freebsd.org
Subject: Multiple gateways


Greetings,

I'm having bad times trying to set up a kind of advance router with
FreeBSD 6.1.
The system has 6 Network interfaces, 3 for adsl connections (one nic
for each adsl, same ISP) and other 3 for 3 sub networks class C
(192.168.2. 192.168.3. 192.168.4.)

The server is running Squid and is using only the first adsl
connection and thats ok.

I'm doing NAT with PF but the problem is when i try to nat each sub
network by each adsl connection.



nat on $adsl1 from $net1:network to any - ($adsl1)

nat on $adsl2 from $net2:network to any - ($adsl3)

nat on $adsl3 from $net3:network to any - ($adsl3)

but that doesn't' work, right now I'm NATing all sub networks with
adsl1 only and the others 2 adsl are being waste without use.

these adsl use dhcp to get the IP and here is the info

lease {
  interface adsl1;
  fixed-address 201.242.241.180;
  option subnet-mask 255.255.248.0;
  option routers 201.242.240.1;
  option domain-name-servers 200.44.32.13,200.44.32.12;
  option domain-name cantv.net;
  option broadcast-address 201.242.247.255;
  option dhcp-lease-time 11637;
  option dhcp-message-type 5;
  option dhcp-server-identifier 200.109.126.37;
  renew 3 2006/6/14 16:56:54;
  rebind 3 2006/6/14 18:09:37;
  expire 3 2006/6/14 18:33:53;
}


lease {
  interface adsl2;
  fixed-address 201.242.241.149;
  option subnet-mask 255.255.248.0;
  option routers 201.242.240.1;
  option domain-name-servers 200.44.32.13,200.44.32.12;
  option domain-name cantv.net;
  option broadcast-address 201.242.247.255;
  option dhcp-lease-time 19174;
  option dhcp-message-type 5;
  option dhcp-server-identifier 200.109.126.37;
  renew 3 2006/6/14 17:59:58;
  rebind 3 2006/6/14 19:59:47;
  expire 3 2006/6/14 20:39:45;
}

lease {
  interface adsl3;
  fixed-address 201.242.241.150;
  option subnet-mask 255.255.248.0;
  option routers 201.242.240.1;
  option domain-name-servers 200.44.32.13,200.44.32.12;
  option domain-name cantv.net;
  option broadcast-address 201.242.247.255;
  option dhcp-lease-time 11627;
  option dhcp-message-type 5;
  option dhcp-server-identifier 200.109.126.37;
  renew 3 2006/6/14 16:57:13;
  rebind 3 2006/6/14 18:09:52;
  expire 3 2006/6/14 18:34:07;
}

Note that the 3 adsl interfaces have the same gateway, but now, how
i
can load balance or at least define the usage of each adsl
connection
for my sub networks? I tried using route but the routing table
always
use the interface of the first adsl.

Any ideas, suggestion?
thanks in advance.
--
Luis José Da Silva G.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
[EMAIL PROTECTED]

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


Re: Multiple Gateways/Load Balancing?

2002-12-13 Thread Jeff Penn
On Wed, Dec 11, 2002 at 05:01:45PM -0800, Octavian Hornoiu wrote:
 What is the process to set up a FreeBSD server as a router to use two 
 internet connections and dynamically assign workstations to the two 
 internet connections depending on load so that neither of the 
 connections get overly saturated at the expense of not using the other?

You need OSPF to load balance over equal cost routes.  Use gated or
sebra.

Jeff

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Multiple Gateways/Load Balancing?

2002-12-12 Thread Jens Rehsack
Octavian Hornoiu wrote:

What is the process to set up a FreeBSD server as a router to use two internet 
connections and dynamically assign workstations to the two internet connections 
depending on load so that neither of the connections get overly saturated at 
the expense of not using the other?

Maybe the routed(8) is what you looking for. I do not know how expensive 
it it, but the documentation seems to me really good. Maybe that helps 
to finds out more.

Jens

Thanks!

Octavian



--
L i  W W W  i Jens Rehsack
LW W W
L i   W   W W   W   i  nnnLiWing IT-Services
L iW W   W Wi  n  n  g   g
  i W W i  n  n  g   gFriesenstraße 2
  06112 Halle
 g
 g   g
Tel.:  +49 - 3 45 - 5 17 05 91ggg e-Mail: [EMAIL PROTECTED]
Fax:   +49 - 3 45 - 5 17 05 92http://www.liwing.de/



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Multiple Gateways/Load Balancing?

2002-12-11 Thread Octavian Hornoiu
What is the process to set up a FreeBSD server as a router to use two internet 
connections and dynamically assign workstations to the two internet connections 
depending on load so that neither of the connections get overly saturated at 
the expense of not using the other?

Thanks!

Octavian

-
This mail sent through IMP: http://horde.org/imp/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Freebsd multiple gateways

2002-10-27 Thread Neil Doody
*My apologies if this mail has already gone to this list, but I didn't
realise you had to subscribe first, im a newbie to mail-lists*

I have a problem with having 2 nics and the need for multiple gateways
for IP's that are bound to them, heres my prognosis in detail :-#

Background Scenario :- 

I have a server that is running FREEBSD 4.7-STABLE. 

This server has 2 network cards. 

Each network card has its own pool of IP's and are on different subnets
which are transported by different carriers. 

Details :- 

The servers main hostname is admin.mghost.net the IP is 66.250.145.138,
the default gateway for this is 66.250.145.137, these ips are on the
cogent network, all traffic in/out of the server for the ip
66.250.145.138 should be routed through the gateway 66.250.145.137.
These are all on the first network card which is an realtek card. 

The servers second hostname is test.mghost.net the IP is 69.1.78.8, the
default gateway for this is 69.1.78.1, these IP's are on the internap
network, all traffic in/out of the server for the ip 69.1.78.8 should be
routed through the gateway 69.1.78.1. There are all on the second
network card which is an intel thing. 


The problem :- 

It appears there is no easy way to add a second default gateway,
something I did, which I thought was working, is not. all inbound
traffic destined for the IP 69.1.78.8 is going through the correct
channels and through teh correct nic, however, outgoing traffic is being
routed to the default gateway, through the first NIC, so when people
connect to the IP 69.1.78.8, the traffic is being sent through the first
NIC and through the gateway 66.250.145.137. 

The needed solution :- 

I need something that will allow me to make traffic that is destined for
the IP 69.1.78.8 to be routed through the correct NIC and the correct
router, not the default gateway, so traffic from 69.1.78.8 back out
again, should go via the gateway 69.1.78.1.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message