Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Dec 2022 15:52:11 +0000
From:      Graham Perrin <grahamperrin@freebsd.org>
To:        freebsd-net@freebsd.org, FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   ifconfig_em0: DHCP NOAUTO
Message-ID:  <0a1421b6-71b1-83dc-9cf1-52a11304ed61@freebsd.org>
In-Reply-To: <991bbedf-95af-6203-cc41-b6c7c0f917e9@freebsd.org>
References:  <991bbedf-95af-6203-cc41-b6c7c0f917e9@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <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
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <div class="moz-cite-prefix">On 26/11/2022 21:41, Graham Perrin
      wrote:<br>
      <br>
    </div>
    <blockquote type="cite"
      cite="mid:991bbedf-95af-6203-cc41-b6c7c0f917e9@freebsd.org">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>With <b>NOAUTO</b> (for the interface to be <b>not</b> be
        configured at boot)</p>
      <p>When, some time after boot, I <b>do</b> want to use the
        interface, what steps are required for <br>
        <font face="monospace">/var/run/resolvconf/interfaces/em0</font>
        <br>
        to be created? </p>
      <p>Example context: <br>
      </p>
      <p><br>
      </p>
      <p><span style="font-family:monospace"><span
            style="color:#000000;background-color:#ffffff;">% date ;
            uptime </span><br>
          Sat 26 Nov 2022 15:00:11 GMT <br>
          3:00p.m.  up 10 mins, 8 users, load averages: 0.36, 1.05, 0.75
          <br>
          % sysrc ifconfig_em0 ifconfig_wlan0 cloned_interfaces <br>
          ifconfig_em0: DHCP NOAUTO <br>
          ifconfig_wlan0: WPA DHCP <br>
          cloned_interfaces: gif0 <br>
          % ls /var/run/resolvconf/interfaces/ <br>
          wlan0 <br>
          % cat /var/run/resolvconf/interfaces/wlan0 <br>
          search lan <br>
          nameserver 192.168.1.1 <br>
          nameserver 192.168.1.1 <br>
          % ifconfig em0 | grep -e inet -e status <br>
                 inet 192.168.1.10 netmask 0xffffff00 broadcast
          192.168.1.255 <br>
                 status: active <br>
          % su - <br>
          Password: <br>
          root@mowa219-gjp4-8570p-freebsd:~ # grep em0
          /var/log/dmesg.today | grep -v -e umodem0 -e address <br>
          em0: &lt;Intel(R) 82579LM&gt; port 0x3020-0x303f mem
          0xd0400000-0xd041ffff,0xd043a000-0xd043afff at device 25.0 on
          pci0 <br>
          em0: EEPROM V0.15-4 <br>
          em0: Using 1024 TX descriptors and 1024 RX descriptors <br>
          em0: Using an MSI interrupt <br>
          em0: netmap queues/slots: TX 1/1024, RX 1/1024 <br>
          ahciem0: &lt;AHCI enclosure management bridge&gt; on ahci0 <br>
          ses0 at ahciem0 bus 0 scbus2 target 0 lun 0 <br>
          em0: link state changed to UP <br>
          debugnet_any_ifnet_update: Bad dn_init result from em0 (ifp
          0xfffff80001b88000), ignoring. <br>
          em0: link state changed to DOWN <br>
          em0: link state changed to UP <br>
          em0: link state changed to DOWN <br>
          em0: link state changed to UP <br>
          root@mowa219-gjp4-8570p-freebsd:~ # </span></p>
      <p><br>
      </p>
      <p><span style="font-family:monospace">gif0 </span>is sometimes
        used for a tunnel between <span style="font-family:monospace"><span
            style="color:#000000;background-color:#ffffff;">192.168.1.10</span>
        </span>and an IPv6 tunnel broker. <br>
      </p>
      <lt-container></lt-container>
    </blockquote>
    <p><br>
    </p>
    <p>Please, can anyone answer the question about steps? <br>
    </p>
    <p>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. <br>
    </p>
    <p>If someone can tell me what's proper, I'll compare with my own
      experience (and maybe make a bug report). <br>
    </p>
    <p>Thanks<br>
    </p>
  </body>
</html>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0a1421b6-71b1-83dc-9cf1-52a11304ed61>