From nobody Sat Dec 10 15:52:11 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NTspQ0Tg7z4jWBW; Sat, 10 Dec 2022 15:52:14 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NTspP6qFwz4WqD; Sat, 10 Dec 2022 15:52:13 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670687534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=27m2qk8M4HO8FZvt0pveouOjWfjY0nboFeus9Plw5+Y=; b=N1D5Dl92HEygQzLeaRPVoGeRzweqFDu0Pd885DFmXUtlJJpjOXeakKMdBIk076gk+R3WIM hcyCvE281FpbO4L22uq7yTGmhsSoHaboCsj4I4nWtP7+wfy7RQND0zuDmuamsS4RsQ0C6l IcfLlP/0l8N6PXwcSBu5aVk9yaCse8JqfLDS2mmQZndN8EXmq5UgQ+IHNp3DcLIeMf9SKY L7sGj3wvs1pXwBZy3tLvyuf9pcJtqA/kvty8ZSj6DWzSEdkrsO3cXdaCgt7OJhV+eW2MlI g8ovM86y2kNaEKF8G2mT39oelF1wAYZv1AkpXNT6Aa+L+z+qNUc3YfiGIP+n5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670687534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=27m2qk8M4HO8FZvt0pveouOjWfjY0nboFeus9Plw5+Y=; b=P7aT/Nc7jkqMneZLwo1gGneYPNjvlWW1B+fZyZfQVWU21seAmyhQF/CXeAIxycIEuHrSXk Vs3l+TbBLk6vdX1g0K6xsnW6wH92KolmUdPjqaZf8HvL7jJlqoTOtVsOt5VeNLIMPy6fgK wiRdbyMrQYoX7yztkH5kvWd1S3dSJQB+Ymv9ni6ADkmoo+U44c9fZSUNLL8973JmiFeFl9 TnOBC4q6DCJBZi2ywuQuJXMP7TzfpqxLBkuEVmApvpuxfYK0KNtpTU+58Q9/SNMIFyvlyd pE/sMmEy3m5GrNLDTFIOfM3FQ4DMbxxANjGLk53iYo9oHzbZhpwwZEDG4RFfTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670687534; a=rsa-sha256; cv=none; b=k3cXlsvDPXCTv9HMzYZeOmsLTneHm4Wgp2+BY1gKQ35L7ozX6Kazr55Jn4jlgHCEAmfMyt AOn1mauUNwrGV3KG0oMnbMMa61YjaEp09BNeOOirW53llyABlLX2ZRAMTR2m8s5pZo1nk1 1V3vKqBFTXh3490g8JWW8SVL2Uoe4AYgezQ//nNiwMp5DJOaFiTE2xSbaCLgPtXrm0JZMR lxDoYBrlhzfWQQ/G5bxD+BeUA1lrjm27LAL5okm8stGfhIkk7wBtcxNZpXh9StfdfjWnUm vCsZioKSyk4C28LnUmB+SPNs+tU+DnaPqVEThhV7qCdYFHCrnLJLcKJdBA/r3w== Received: from [IPV6:2001:470:1f1c:a0::2] (tunnel642390-pt.tunnel.tserv1.lon2.ipv6.he.net [IPv6:2001:470:1f1c:a0::2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: grahamperrin) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NTspP3vTDz109Y; Sat, 10 Dec 2022 15:52:13 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) Content-Type: multipart/alternative; boundary="------------ljsFn2DAf5A7hw6kP2lsz95p" Message-ID: <0a1421b6-71b1-83dc-9cf1-52a11304ed61@freebsd.org> Date: Sat, 10 Dec 2022 15:52:11 +0000 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: ifconfig_em0: DHCP NOAUTO From: Graham Perrin To: freebsd-net@freebsd.org, FreeBSD CURRENT References: <991bbedf-95af-6203-cc41-b6c7c0f917e9@freebsd.org> Content-Language: en-GB Organization: FreeBSD In-Reply-To: <991bbedf-95af-6203-cc41-b6c7c0f917e9@freebsd.org> X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------ljsFn2DAf5A7hw6kP2lsz95p Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: 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: 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 --------------ljsFn2DAf5A7hw6kP2lsz95p Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
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

--------------ljsFn2DAf5A7hw6kP2lsz95p--