From owner-freebsd-pf@FreeBSD.ORG Fri Oct 28 14:15:40 2005 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90A9E16A424 for ; Fri, 28 Oct 2005 14:15:40 +0000 (GMT) (envelope-from mocart@pinco.pl) Received: from pinco.pl (gw-z-futuro.pinco.pl [62.233.197.58]) by mx1.FreeBSD.org (Postfix) with SMTP id 0CD5F43D45 for ; Fri, 28 Oct 2005 14:15:38 +0000 (GMT) (envelope-from mocart@pinco.pl) Received: (qmail 51952 invoked by uid 1001); 28 Oct 2005 14:18:06 -0000 Date: Fri, 28 Oct 2005 16:18:06 +0200 From: =?utf-8?Q?=C5=81ukasz?= Dudek To: Daniel Dias =?iso-8859-1?Q?Gon=E7alves?= Message-ID: <20051028141806.GA51784@pinco.pl> References: <4361FE7E.50607@dgnetwork.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4361FE7E.50607@dgnetwork.com.br> User-Agent: Mutt/1.5.11 Cc: freebsd-net@freebsd.org, freebsd-pf@freebsd.org Subject: Re: Load Balancing Outgoing, its possible ? X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2005 14:15:40 -0000 Dnia Fri, Oct 28, 2005 at 08:33:34AM -0200, Daniel Dias Gonçalves napisał(a): > > It is possible to make this balancing with the PF ? Exists some software > that I make this ? Zebra can help me? > This type of balancing gives to problems with the navigation of the user > of NAT or IP valid ? > If it is possible, wanted to see examples with rules. > it is possible. #BALANCING TWO INTERNET CONNECTIONS # #People who have multiple net connections and are unable to use a proper #multipath routing solution (ie. BGP4) can use this to balance *outgoing* #traffic across the two connections, with something like this: # # nat on $ext_if1 from $int_subnet to any -> ($ext_if1) nat on $ext_if2 from $int_subnet to any -> ($ext_if2) # ## routing for internal subnets pass in on $int_if \ # route-to { ( $ext_if1 $gateway1), ( $ext_if2 $gateway2 ) } round-robin \ # from $int_subnet to any keep state # ## need the next rules to properly pass traffic to/from the external IPs pass out on $ext_if2 route-to ($ext_if1 $gateway1) from $ext_if1 to any pass out on $ext_if1 route-to ($ext_if2 $gateway2) from $ext_if2 to any # # #Please note that this is only the skeleton of a ruleset that would work #in such a situation; care must be taken to ensure that the correct route-to options are put on each rule which needs to be balanced pozdr mocart