fredfs
Posts: 58
Joined: Sun Jun 07, 2015 12:22 am

no allow-hotplug eth0 on jessy /etc/network/interface ?

Wed Dec 21, 2016 11:21 pm

I see that the stock /etc/network/interfaces has no entry like:
allow-hotplug eth0
ou
auto eth0

Why ?
What is the default behavior when no option like these is set?

Is there any problem adding allow-hotplug eth0? I still want dhcpcd to handle dynamic or static ip settings.

epoch1970
Posts: 6067
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: no allow-hotplug eth0 on jessy /etc/network/interface ?

Sat Dec 24, 2016 4:04 pm

Basically that's because interfaces is not used anymore (or minimally) since Raspbian switched to using dhcpcd.

In the olden days, if you omitted auto, then at boot the interface was not activated. You could still "ifup" and "ifdown" manually. (You can't use ifup/if down on an interface that is not declared at all. You need to use "ifconfig" or "ip" commands then)
Then in a more recent era, udev was linked to network setup and adding allow-hotplug made udev run ifup when a device was added, and ifdown when removed.

Today, dhcpcd -among others- cares very little about the interfaces file contents.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “General discussion”