Date: Mon, 1 Jul 2024 19:16:07 -0400 From: Michael Proto <mike@jellydonut.org> To: Craig Leres <leres@freebsd.org> Cc: freebsd-stable@freebsd.org Subject: Re: FreeBSD 14.x localhost source address Message-ID: <CAGAnWo1z-cQKzgQhZvo7HuLLstWu9nMDbbjXYDFr4iCbA1sXfw@mail.gmail.com> In-Reply-To: <7005d0ed-70ea-4c70-ac61-2a12e023cdd7@freebsd.org> References: <086405e2-8fc2-4463-b8bb-d6c652745ae1@freebsd.org> <CAGAnWo2LbT6mGdgo7u5CA6d%2BQE8bX9nJagaHMn5p=3DBsC0fOg@mail.gmail.com> <7005d0ed-70ea-4c70-ac61-2a12e023cdd7@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 1, 2024 at 7:04=E2=80=AFPM Craig Leres <leres@freebsd.org> wrot= e: > > On 7/1/24 15:53, Michael Proto wrote: > > What netmask are you using for 127.0.0.2? I'd treat it as I would an > > IP alias (only on localhost) with a /32 netmask, should keep it > > isolated. Just tried it myself on a test box and iperf works as > > expected, using 127.0.0.1 as the source when connecting. > > I was just looking at that and I used 127.0.0.2 without an explicit mask > and the system picked /24. I'm not sure why I did it that way but it's > been awhile. > > I just got rid of lo2 and made 127.0.0.2/32 an alias on lo0 and it seems > to work better all around. > > I guess the overlap between 127.0.0.0/8 and 127.0.0.0/24 was problematic. > > Craig Yep, most network stacks I'm familiar with will pick the more-specific route when given two options like that, hence the use of 127.0.0.2 as the source. Glad its working now. -Proto
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGAnWo1z-cQKzgQhZvo7HuLLstWu9nMDbbjXYDFr4iCbA1sXfw>