4 ms·
Recommendation for aliases on an interface is to use 255.255.255.255 as the netmask on FreeBSD. For example to add extra interfaces to lo0 on FreeBSD you may u
by X-Istence 10y ago
Recommendation for aliases on an interface is to use 255.255.255.255 as the netmask on FreeBSD.
For example to add extra interfaces to lo0 on FreeBSD you may use:
ipv4_addrs_lo0="127.0.0.2-5/8"
in rc.conf
And now those addresses are automatically assigned to lo0, the netmask will be set to 255.255.255.255 automatically for all but the first in that range (.2). Since 127.0.0.1 is unconditionally assigned to lo0, you could also use:
ipv4_addrs_lo0="127.0.0.2-5/32"
This is what I do on FreeBSD.