I need one more loopback interface in my OpenBSD 6.1, with the IP address 127.0.0.2.I can create it by hand with the command:ifconfig lo1 127.0.0.2And to have it at boot time, I just inserted that command into /etc/rc.local.I have researched for a more standard way to do that, was not successful.Having it in /etc/rc.local also means I only have that interface late in the boot process. How may I configure it in a cleaner OpenBSD way?
OpenBSD: Defining a new loopback interface
openbsd
As hinted at in lo(4), you may create /etc/hostname.lo1:inet 127.0.0.2 255.0.0.0This will create the lo1 interface when the boot process runs /etc/netstart.  With that file in place, you may also set up the interface without rebooting through$ doas sh /etc/netstart lo1The interface is reported as lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768        index 4 priority 0 llprio 3        groups: lo        inet 127.0.0.2 netmask 0xff000000by ifconfig.For further info, see hostname.if(5), netstart(8) and ifconfig(8).