[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ethernet is not started at boot



On Tuesday 06 February 2018 14:07:55 Brian wrote:

> 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         192.168.0.202
> > > >         netmask         255.255.255.0
> > > >         gateway         192.168.0.1
> > > >         network         192.168.0.0
> > > >
> > > > 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
> reached.
>
> > 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 address         192.168.0.202
>         netmask         255.255.255.0
>         gateway         192.168.0.1
>         network         192.168.0.0
>
> netmask and network are not needed. ifupdown will compute them. Note
> there are no examples in interfaces(5) which use these parameters.
>
You should go and read that man page again.

> 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.



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>


Reply to: