Web lists-archives.com

Re: in /etc/network/interfaces: "auto" vs "allow-hotplug"

> On Sep 25, 2017, at 10:25 AM, Jimmy Johnson <field.engineer@xxxxxxxxx> wrote:
> On 09/23/2017 08:56 PM, Rick Thomas wrote:
>> I have two machines (out of a group of ten) that will not bring up their ethernet interface at boot time if the interfaces is of type �allow-hotplug�.  When I change that to �auto� the interface comes up at boot with no problem�
>> The remaining eight machines have no problem with allow-hotplug. (which is the default as setup by the d-i)
>> It does not seem to correlate to kernel version.  The two �auto� machines are running 4.12 and 4.9;  The �allow-hotplug� machines are running anything between 3.16 and 4.12.
>> Nor does it seem to correlate with static vs dhcp.  The two �auto� machines are both using dhcp.  The �allow-hotplug� machines are using a mixture of static and dhcp.
>> Anybody have a clue as to what�s going on?
>> Thanks in advance�
>> Rick
> Hi, Rick
> As you have pointed out, things have changed, have you ran #ifconfig -a
> to get the name of your device? I'm thinking the name you are using is not the same name the system is using and why hotplug is not working?


root@macpro:~# ifconfig -a
enP1p3s15f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::211:24ff:fe38:1048  prefixlen 64  scopeid 0x20<link>
        ether 00:11:24:38:10:48  txqueuelen 1000  (Ethernet)
        RX packets 4450  bytes 4876801 (4.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2649  bytes 246222 (240.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

So the interface name is “enP1p3s15f0"
I haven’t done anything to change the name from the original one assigned by the installer.

Here’s what’s in /e/n/interfaces:
root@macpro:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enP1p3s15f0
iface enP1p3s15f0 net dhcp

I had to change “allow-hotplug” to “auto” to get it to come up on reboot:
root@macpro:~# diff /etc/network/interfaces.ORIG /etc/network/interfaces
< allow-hotplug enP1p3s15f0
> auto enP1p3s15f0

If there’s some place that’s mistakenly expecting a name like “eth0”, where might it be located?

> -- 
> Jimmy Johnson

Linux user since 1987