ifconfig_em0: DHCP NOAUTO

From: Graham Perrin <grahamperrin_at_freebsd.org>
Date: Sat, 10 Dec 2022 15:52:11 UTC
On 26/11/2022 21:41, Graham Perrin wrote:

> With *NOAUTO* (for the interface to be *not* be configured at boot)
>
> When, some time after boot, I *do* want to use the interface, what 
> steps are required for
> /var/run/resolvconf/interfaces/em0
> to be created?
>
> Example context:
>
>
> % date ; uptime
> Sat 26 Nov 2022 15:00:11 GMT
> 3:00p.m.  up 10 mins, 8 users, load averages: 0.36, 1.05, 0.75
> % sysrc ifconfig_em0 ifconfig_wlan0 cloned_interfaces
> ifconfig_em0: DHCP NOAUTO
> ifconfig_wlan0: WPA DHCP
> cloned_interfaces: gif0
> % ls /var/run/resolvconf/interfaces/
> wlan0
> % cat /var/run/resolvconf/interfaces/wlan0
> search lan
> nameserver 192.168.1.1
> nameserver 192.168.1.1
> % ifconfig em0 | grep -e inet -e status
>        inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255
>        status: active
> % su -
> Password:
> root@mowa219-gjp4-8570p-freebsd:~ # grep em0 /var/log/dmesg.today | 
> grep -v -e umodem0 -e address
> em0: <Intel(R) 82579LM> port 0x3020-0x303f mem 
> 0xd0400000-0xd041ffff,0xd043a000-0xd043afff at device 25.0 on pci0
> em0: EEPROM V0.15-4
> em0: Using 1024 TX descriptors and 1024 RX descriptors
> em0: Using an MSI interrupt
> em0: netmap queues/slots: TX 1/1024, RX 1/1024
> ahciem0: <AHCI enclosure management bridge> on ahci0
> ses0 at ahciem0 bus 0 scbus2 target 0 lun 0
> em0: link state changed to UP
> debugnet_any_ifnet_update: Bad dn_init result from em0 (ifp 
> 0xfffff80001b88000), ignoring.
> em0: link state changed to DOWN
> em0: link state changed to UP
> em0: link state changed to DOWN
> em0: link state changed to UP
> root@mowa219-gjp4-8570p-freebsd:~ #
>
>
> gif0 is sometimes used for a tunnel between 192.168.1.10 and an IPv6 
> tunnel broker.
>

Please, can anyone answer the question about steps?

Through hours of trial and error, I did find at least one routine that 
works, however I do not know whether it's a proper routine.

If someone can tell me what's proper, I'll compare with my own 
experience (and maybe make a bug report).

Thanks