Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2005 16:18:06 +0200
From:      =?utf-8?Q?=C5=81ukasz?= Dudek <mocart@pinco.pl>
To:        Daniel Dias =?iso-8859-1?Q?Gon=E7alves?= <daniel@dgnetwork.com.br>
Cc:        freebsd-net@freebsd.org, freebsd-pf@freebsd.org
Subject:   Re: Load Balancing Outgoing, its possible ?
Message-ID:  <20051028141806.GA51784@pinco.pl>
In-Reply-To: <4361FE7E.50607@dgnetwork.com.br>
References:  <4361FE7E.50607@dgnetwork.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051028141806.GA51784>