Re: Am I missing something in my understanding here?
Freddy Freeloader wrote:
> The first time I run "/etc/init.d/networking restart" after a reboot I
> get the same message I would if I ran "ifdown eth0" about eth0 releasing
> its dhcp address, and I no longer have network connectivity, i.e. the
> /etc/init.d/networking script does not seem to call ifup -a to restart
> all network connections. (I have only one nic on this computer.) To
> get network connectivity back I must manually run "ifup etho".
The problem is rooted in Bug#300937. It is about how to handle
hotplug network devices.
The default Etch installation configures networking such as you are
seeing now. But let's back into it from the side. The configuration
You noted "ifup -a". But /etc/init.d/networking does call ifup -a.
But looking at the man page for ifup shows:
If given to ifup, affect all interfaces marked auto.
So 'ifup -a' only brings up interfaces marked auto but a default Etch
installation sets all interfaces to allow-hotplug. Now you can see
why restarting networking does not bring up networking.
And in the man page for interfaces it says:
Lines beginning with the word "auto" are used to identify the
physical interfaces to be brought up when ifup is run with the
-a option. (This option is used by the system boot scripts.)
Lines beginning with "allow-" are used to identify interfaces
that should be brought up automatically by various
subsytems. This may be done using a command such as "ifup
--allow=hotplug eth0 eth1", which will only bring up eth0 or
eth1 if it is listed in an "allow-hotplug" line.
> My question is, is this behavior by design, or have I stumbled across a
I don't know the full history behind this but looking at the
Bug#300937 I assume the design is that network events are now moved
from boot time action to network event time action to support hotplug
network interfaces. Looking in /usr/share/doc/udev/README.Debian.gz I
After receiving events about network interfaces, net.agent will call
ifupdown using the --allow=hotplug option. This makes the program act
only on interfaces marked with the "allow-hotplug" statement.
E.g: "allow-hotplug eth0" instead of the usual "auto eth0".
I have not researched further what it would take to trigger udev to
restart networking but I presume there is a path through it that would
do so. To return to the previous behavior you may change the
allow-hotplug stanzas into auto stanzas and then restarting networking
will restart the network interface. I would welcome further
information on this area.