networking "restart" drops eth0 :(

Derek Broughton news at pointerstop.ca
Sat Sep 17 02:39:27 UTC 2005


David wrote:

> On Fri, Sep 16, 2005 at 05:50:50PM -0300, Derek Broughton wrote:
>> David wrote:
>> 
>> > I'm just building a brand new Ubuntu server box. Unfortunately I put in
>> > the wrong address for the nameserver so I changed it manually (edited
>> > /etc/resolv.conf and /etc/network/interfaces) and now if I restart
>> > networking I lose the eth0 connection completely! ie, ifconfig only
>> > shows loopback.
>> > 
>> > If I completely reboot the machine, eth0 comes back and works fine
>> > until the next time I restart networking :(
>> 
>> You mean, as in, "/etc/init.d/networking restart"
>> 
>> Probably because you shouldn't be doing that :-)  To restart a link you
>> just want to use ifconfig or ifup/ifdown.
> 
> That's what I meant .. .and that's what i've been doing since woody. It's
> news to me that you aren't supposed to do it. Interestingly, I have a
> Hoary desktop box and /etc/init.d/networking restart works perfectly.

Perhaps it does, but it really _is_ supposed to take down all networking,
and in the normal course of things "networking start" is followed by
"hotplug start" and possibly two or three other daemons (pcmcia, ifplug,
whereami...) that can all start an interface.  When you do "networking
start", it doesn't start any interfaces except the ones marked "auto"
in /etc/network/interfaces.  The rest is up to things like hotplug, and if
it _is_ hotplug, it isn't going to do anything in this situation because
you haven't hotplugged anything.  otoh, ifplugd _might_ catch it - in a
while. 
> 
> OTOH, ifup works perfectly! thank you.

You're welcome - using "networking" to modify a single interface is like
using a sledgehammer to drive finishing nails :-)
-- 
derek





More information about the ubuntu-users mailing list