Web lists-archives.com

Re: Ethernet is not started at boot

On Tue 06 Feb 2018 at 09:01:21 -0500, Greg Wooledge wrote:

> On Tue, Feb 06, 2018 at 06:58:50AM -0500, Gene Heskett wrote:
> > On Tuesday 06 February 2018 05:42:53 Michelle Konzack wrote:
> > > auto enp0s25 
> > > iface enp0s25 inet static
> > >         address
> > >         netmask
> > >         gateway
> > >         network
> > >
> > > allow-hotplug enp0s25
> >   ^^^^^^^^^^^^^^^^^^^^^
> > Doesn't the above line belong ABOVE the iface line? It has been in every 
> > example I've looked at. I am not using that line as its static, not 
> > dhcpd.
> No.  You either want "auto enp0s25" or "allow-hotplug enp0s25" but not
> both.

On the basis that whatever is not forbidden is allowed, I cannot see
what the basis for this statement is from a reading of interfaces(5).

(And what is wrong with having either auto or allow-hotplug below the
iface line?)

> If the interface is *important*, and you want services to wait for it
> before starting, then you should use "auto".

It is (in systemd terms) obliged to be run before network.target is
> If you use "allow-hotplug", this tells Debian that the interface is
> optional, and services should feel free to start up before the
> interface is ready.  This breaks ALL KINDS of shit on a traditional
> workstation that participates in a network.  It's even worse on a
> server.

If you could use both - best of both worlds.

> For some reason, Debian defaults to "allow-hotplug", perhaps because
> they think most people are installing on laptops.

I wonder whether it does the same as auto at boot time? Testing time?

Two other points arising from other posts (reducing the number of moving
parts should please someone):

1. auto enp0s25                                                                                                         iface enp0s25 inet static

netmask and network are not needed. ifupdown will compute them. Note
there are no examples in interfaces(5) which use these parameters.

2. auto lo
   iface lo inet loopback

can be removed. ifupdown sorts this out all by itself. The stanza is put
in by the installer because it has always done it; bug #836016.

No example for loopback in interfaces(5) either.