From owner-freebsd-net@freebsd.org Wed Oct 9 09:10:32 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 D633314626E for ; Wed, 9 Oct 2019 09:10:32 +0000 (UTC) (envelope-from SRS0=nNiU=YC=perdition.city=julien@bebif.be) Received: from orval.bbpf.belspo.be (orval.bbpf.belspo.be [193.191.208.90]) by mx1.freebsd.org (Postfix) with ESMTP id 46p7jM02cjz48dH for ; Wed, 9 Oct 2019 09:10:30 +0000 (UTC) (envelope-from SRS0=nNiU=YC=perdition.city=julien@bebif.be) Received: from home.lan (unknown [77.109.104.59]) by orval.bbpf.belspo.be (Postfix) with ESMTPSA id C25CE1D4FC1B; Wed, 9 Oct 2019 11:10:28 +0200 (CEST) Date: Wed, 9 Oct 2019 11:10:27 +0200 From: Julien Cigar To: Matthew Grooms Cc: freebsd-net@freebsd.org Subject: Re: CARP and NAT question Message-ID: <20191009091026.GT2691@home.lan> References: <20191008134851.GP2691@home.lan> <20191008155813.GS2691@home.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="thwsKKN5whlRGe6j" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 46p7jM02cjz48dH X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of SRS0=nNiU=YC=perdition.city=julien@bebif.be designates 193.191.208.90 as permitted sender) smtp.mailfrom=SRS0=nNiU=YC=perdition.city=julien@bebif.be X-Spamd-Result: default: False [-7.16 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[perdition.city]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[90.208.191.193.list.dnswl.org : 127.0.10.0]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[julien@perdition.city,SRS0=nNiU=YC=perdition.city=julien@bebif.be]; RCVD_NO_TLS_LAST(0.10)[]; RECEIVED_SPAMHAUS_PBL(0.00)[59.104.109.77.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:2611, ipnet:193.191.192.0/19, country:BE]; FROM_NEQ_ENVFROM(0.00)[julien@perdition.city,SRS0=nNiU=YC=perdition.city=julien@bebif.be]; IP_SCORE(-3.16)[ip: (-9.32), ipnet: 193.191.192.0/19(-4.66), asn: 2611(-1.78), country: BE(-0.01)]; RCVD_COUNT_TWO(0.00)[2] 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: Wed, 09 Oct 2019 09:10:32 -0000 --thwsKKN5whlRGe6j Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 08, 2019 at 11:22:51AM -0500, Matthew Grooms wrote: > On 10/8/2019 10: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 addres= s, > >> 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). >=20 > Well, I'm not sure how well it will work but I think what you are=20 > looking for is the route-to pf rule option. You can specify that certain= =20 > traffic be transmitted via a specific network interface to a specific=20 > next hop. However, I believe you'll need to match traffic as it's=20 > received on the internal interface, ie. before the kernel determines the= =20 > egress interface. >=20 > table internal_networks { $net1, $net2 } > pass in on $internal_interface route-to( igb0 $default_gw ) from $net1=20 > to ! > pass in on $internal_interface route-to( igb1 $default_gw ) from $net2=20 > to ! Thanks, I haven't used the route-to yet but if I understand well it's=20 a way to "bypass" the default route/interface? >=20 > Hope this helps, >=20 > -Matthew >=20 --=20 Julien Cigar Belgian Biodiversity Platform (http://www.biodiversity.be) PGP fingerprint: EEF9 F697 4B68 D275 7B11 6A25 B2BB 3710 A204 23C0 No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. --thwsKKN5whlRGe6j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEnF27CBNtOraRNmgqCLYqJMpBHmkFAl2do/4ACgkQCLYqJMpB HmmC/w//X8yN6lxXGqxbNQUo/DyxX4uw+My2L/fseeEBSACCqwaBnIsb++hLzgFo i4jUDFjQnNdncbiPUchyn/H7Km3IaM7HQh6N7KzvSORbSkIunxGnPs+NPCiSuTAc JbIXUTpyPFpZd9aDMLmYvme4BVAuPaTQhqhb+uJL1C5Ck6tdNmd62rAqsL4yIvi6 TaDmoLV2xcQgPTM7SIDegKb1QX4kZxTPf9jfzX6wKL5uA178Fvq2rJep4L/tZtqr WcFxnbWMjp+lq39G0ywr9KqfWAbbf5K5ryOjHseQyBANOs6sbG1cUskyhgnks/uI TSCoTtUegRi2jq45lB0TO2CNbB2lhEa1Yb83bVW5QUoT2FNDrmBRPGPMn5WQBRFL zLVLTMz0RsQh8ZrwHVJ2GIXnudKWoK2iILMJIBizd4SIV0VEH7Sf4Gw6ZraiU/W9 jomVQTCLJzQTbiJciDTHD+STGxvyv0haG6LZm0DxCwDw367EgBBQNibxR3/Xj+b/ +p5Lu5uKZ986HiunFXy4Dw2H5RDH0zwv6xCQicSpMS2GaGOxGABkHuBUA0VZRByt oKnmZaP/T2kRmFHxRTA4Nf4VuH0VXLVsa+cy64m3EiwWSFl/KWsQY0qKD3CblQqe Pt7U0KfZOVxF/lOsZw5T8O9azdbE8Y3M4ic74qh6VKcju+fZYk8= =4+Oz -----END PGP SIGNATURE----- --thwsKKN5whlRGe6j--