Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Dec 2024 02:08:59 +0000
From:      Paul Vixie <paul@redbarn.org>
To:        freebsd-net@freebsd.org
Subject:   Re: per-FIB socket binding
Message-ID:  <2751272.KRxA6XjA2N@dhcp-151.access.rits.tisf.net>
In-Reply-To: <c396786f-3663-4283-92c3-165b17e77246@yandex.ru>
References:  <Z2G_q5s35AremgYc@nuc> <4p5o59s4-5p70-0775-1479-990o1s5po7r2@yvfgf.mnoonqbm.arg> <c396786f-3663-4283-92c3-165b17e77246@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

--nextPart3377114.VqM8IeB0Os
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="iso-8859-1"

> On 21.12.2024 19:34, Bjoern A. Zeeb wrote:
> > How much use are FIBs still these days?  Half of the original use cases
> > I can think of could easily and better be overcome by using vnet jails
> > with a physical or virtual interface (e.g, vcc) being delegated to the
> > vnet.

Among the other half is simple multihoming. If a host has interfaces on two networks 
then it needs two default routes which means two FIBs. Many of us use ipfw to select a 
FIB for an outbound packet based on its IP source address. Without this the next-next-
hop will wonder why we're failing BCP38 source address validation, and it may be a 
firewall which only passes traffic it expects, and it may be a differently congested network 
that upsets TCP pacing since the payloads take one path and the ACKs take the other. 
Path symmetry is an unalloyed good. Path assymetry is a livable problem but worthy of 
avoidance. Some operators just avoid multi-homing. As an operator I often don't have a 
choice about multi-homing or else my other choices are worse. FIBs make all of this 
better, and easily.

> > I would honestly know who and how FIBs are still in use today or if they
> > should be put on a list to be removed for 16 (I assume I might be
> > surprised).

I have a refactor to propose for the networking stack in 16 but more for performance and 
clarity than for correctness or simplicity. More on that another day. In any case I use FIBs 
everywhere all the time.

On Monday, December 23, 2024 10:29:01 AM UTC Andrey V. Elsukov wrote:
> Some might say that VNET is useless and should be removed instead. We
> have bhyve and old-style jails. Without VNET the kernel code will be
> robust and simple again, and easy for debugging.

I introduced Mr. Zec to NL-Net when he was first looking for sponsors, and I was very 
happy with the results, and even more so when the FreeBSD Foundation got involved and 
more so after that when Mr. Zeeb got involved. I think VNET has earned a place in 
FreeBSD's pantheon but that the form it takes in the source code (all those macros) could 
be simplified.

> FIBs are useful as is, but also can be used with "ipfw setfib" that make
> it irreplaceable.

For my primary FIB use case, ipfw is OK, but I think we need a different default. To that 
end, see Message-ID <38589000.XM6RcZxFsP@dhcp-151.access.rits.tisf.net>.

-- 
Paul Vixie

--nextPart3377114.VqM8IeB0Os
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="iso-8859-1"

<html>
<head>
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8">
</head>
<body><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;"><span style=3D"font-size:0.83em;">&gt; On 21.12.2024 19:34, Bjoern A. Ze=
eb wrote:</span></p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; &gt; How much use are FIBs still these days?=A0 Half of the original use =
cases</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; &gt; I can think of could easily and better be overcome by using vnet jai=
ls</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; &gt; with a physical or virtual interface (e.g, vcc) being delegated to t=
he</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; &gt; vnet.</p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">Among the other half is simple multihoming. If a host has interfaces on =
two networks then it needs two default routes which means two FIBs. Many of=
 us use ipfw to select a FIB for an outbound packet based on its IP source =
address. Without this the next-next-hop will wonder why we're failing BCP38=
 source address validation, and it may be a firewall which only passes traf=
fic it expects, and it may be a differently congested network that upsets T=
CP pacing since the payloads take one path and the ACKs take the other. Pat=
h symmetry is an unalloyed good. Path assymetry is a livable problem but wo=
rthy of avoidance. Some operators just avoid multi-homing. As an operator I=
 often don't have a choice about multi-homing or else my other choices are =
worse. FIBs make all of this better, and easily.</p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">&gt; &gt; I would honestly know who and how FIBs are still in use today =
or if they</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; &gt; should be put on a list to be removed for 16 (I assume I might be</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; &gt; surprised).</p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">I have a refactor to propose for the networking stack in 16 but more for=
 performance and clarity than for correctness or simplicity. More on that a=
nother day. In any case I use FIBs everywhere all the time.</p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">On Monday, December 23, 2024 10:29:01 AM UTC Andrey V. Elsukov wrote:</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; Some might say that VNET is useless and should be removed instead. We</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; have bhyve and old-style jails. Without VNET the kernel code will be</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; robust and simple again, and easy for debugging.</p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">I introduced Mr. Zec to NL-Net when he was first looking for sponsors, a=
nd I was very happy with the results, and even more so when the FreeBSD Fou=
ndation got involved and more so after that when Mr. Zeeb got involved. I t=
hink VNET has earned a place in FreeBSD's pantheon but that the form it tak=
es in the source code (all those macros) could be simplified.</p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">&gt; FIBs are useful as is, but also can be used with &quot;ipfw setfib&=
quot; that make</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; it irreplaceable.</p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">For my primary FIB use case, ipfw is OK, but I think we need a different=
 default. To that end, see Message-ID &lt;38589000.XM6RcZxFsP@dhcp-151.acce=
ss.rits.tisf.net&gt;.</p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">-- </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Pau=
l Vixie</p>
</body>
</html>
--nextPart3377114.VqM8IeB0Os--






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