networking "restart" drops eth0 :(

David david at kenpro.com.au
Sun Sep 18 14:08:41 UTC 2005


On Fri, Sep 16, 2005 at 11:39:27PM -0300, Derek Broughton wrote:
> 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 :-)


Just a bit more on this (just for the archive) -

Hoary Desktop puts  "auto eth0" in the interfaces file, but for some 
reason Hoary Server does not. That's why I've never had a problem before, 
but it's a curious distinction.

David.




More information about the ubuntu-users mailing list