From owner-freebsd-questions@FreeBSD.ORG Wed Jun 14 19:33:14 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA8D516A4A7 for ; Wed, 14 Jun 2006 19:33:14 +0000 (UTC) (envelope-from fbsd@a1poweruser.com) Received: from mta13.adelphia.net (mta13.mail.adelphia.net [68.168.78.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03C7743D53 for ; Wed, 14 Jun 2006 19:33:13 +0000 (GMT) (envelope-from fbsd@a1poweruser.com) Received: from barbish ([70.39.69.56]) by mta13.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with SMTP id <20060614193313.MFED10985.mta13.adelphia.net@barbish>; Wed, 14 Jun 2006 15:33:13 -0400 From: "fbsd" To: =?iso-8859-1?Q?Luis_Jos=E9_Da_Silva_Gonz=E1lez?= , Date: Wed, 14 Jun 2006 15:33:07 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 In-Reply-To: <8379182a0606140955j584c8454p78c86289e253236c@mail.gmail.com> Importance: Normal Cc: Subject: RE: Multiple gateways X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fbsd@a1poweruser.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2006 19:33:14 -0000 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: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@freebsd.org]On 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 "freebsd-questions-unsubscribe@freebsd.org"