From owner-freebsd-net@freebsd.org Tue Oct 8 20:05:45 2019 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 688F813593F for ; Tue, 8 Oct 2019 20:05:45 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46npHs05TDz4S55 for ; Tue, 8 Oct 2019 20:05:44 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (c-73-225-95-104.hsd1.wa.comcast.net [73.225.95.104]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id x98K5gLc006374 (version=TLSv1.2 cipher=AES128-SHA bits=128 verify=NO) for ; Tue, 8 Oct 2019 13:05:43 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: CARP and NAT question To: freebsd-net@freebsd.org References: <20191008134851.GP2691@home.lan> <20191008155813.GS2691@home.lan> From: Julian Elischer Message-ID: Date: Tue, 8 Oct 2019 13:05:37 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191008155813.GS2691@home.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 46npHs05TDz4S55 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.79 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.79)[-0.790,0]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; ASN(0.00)[asn:36236, ipnet:204.109.60.0/22, country:US] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Oct 2019 20:05:45 -0000 On 10/8/19 8:58 AM, Julien Cigar wrote: > On Tue, Oct 08, 2019 at 10:20:34AM -0500, Matthew Grooms wrote: >> Hi Julien, > Hi Matthew, > >> It's not clear why you are trying to assign multiple carp IP address to >> two different interfaces from within the same IP subnet. Are you trying >> to fail over a 2nd carp address or are you trying to improve >> throughput/redundancy? If you just want to fail over a 2nd carp address, >> assign a 2nd alias to your first interface. If your trying to improve >> throughput/redundancy, assign both interfaces to a lagg and build your >> carp interfaces on top of that instead. >> > Currently outbound traffic from $net1 and $net2 (two private networks) > pass through the same network interface (igb0) (as you can see in (1) > in my previous post) on the router. I'd like to prevent that > $net2 saturates the interface and slow down traffic from $net1 (which is > more important). I could lagg and build CARP on top of that but it > wouldn't prevent $net2 to saturate the interface (unless I'm plugin ALTQ > of course, which I'd like to avoid). > >> -Matthew >> >> On 10/8/2019 8:48 AM, Julien Cigar wrote: >>> Hello, >>> >>> I'd like to NAT outbound traffic from two different private networks >>> through two different interfaces, with CARP on top. I have 4 public IPS >>> available (193.x.x.89, 193.x.x.90, 193.x.x.91, 193.x.x.92). >>> >>> I have two redundant router/firewall running FreeBSD 12 with CARP and >>> PF with the following: (1) which works well, but all traffic >>> goes through the same interface. >>> >>> So I'd like to switch to something like (2), which will not work (lines >>> 5 and 13 are not valid) and I'm wondering if I could use something like >>> (3) ..? >>> >>> Thank you! >>> Julien >>> >>> (1) https://gist.github.com/silenius/4f6173a9b6690292c2174ab3bb89d292 >>> (2) https://gist.github.com/silenius/da9be7e74e9861fa55f927d194e3e410 >>> (3) https://gist.github.com/silenius/b237565b0d181248ff80ea296e5537db >>> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" can you draw it?