Re: netmask for loopback interfaces

From: Jamie Landeg-Jones <>
Date: Thu, 04 Nov 2021 13:03:29 UTC
Oleksandr Kryvulia <> wrote:

> 04.11.21 01:01, Mike Karels пишет:
> > I have a pending change to stop using class A/B/C netmasks when setting
> > an interface address without an explicit mask, and instead to use a default
> > mask (24 bits).  A question has arisen as to what the default mask should
> > be for loopback interfaces.  The standard is added with an 8 bit
> > mask currently, but additions without a mask would default to 24 bits.
> > There is no warning for missing masks for loopback in the current code.
> > I'm not convinced that the mask has any meaning here; only a host route
> > to the assigned address is created.  Does anyone know of any meaning or
> > use of the mask on a loopback address?
> >
> > Thanks,
> > 		Mike
> >
> /8 mask on loopback prevetnts using of 127.x.x.x network anywhere 
> outside of the localhost. This described in RFC 5735 [1] and 1122 [2]
> [1]
> [2]

There is a push by some people to release address space,
leaving only as reserved for localhost.

I make no comment on the feasability of doing this!

However, that aside, aren't you just confusing the mask with routing?

I think the mask on any IP on a loopback interface should be /32
(if you want to add a " -local" route even if done
automatically", then so be it)

Note, the default FreeBSD firewall rules already have:

    ${fwcmd} add 100 pass all from any to any via lo0
    ${fwcmd} add 200 deny all from any to
    ${fwcmd} add 300 deny ip from to any

Cheers, Jamie