PDA

View Full Version : networking "restart&a mp; amp;quot ; drops eth0 :(


David
September 16th, 2005, 10:40 AM
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 :(

Can anyone suggest what I'm doing wrong?

David.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Matt Patterson
September 16th, 2005, 04:20 PM
When you say you lose eth0 does that mean it is no longer a valid
interface, or it just doesnt come back up? Try this:

sudo ifconfig -a

If you see eth0 in that list then the interface was simply not brought
back up, you can do that easily by reenabling the device via the ui
(which is where I assume you are getting the restart option, i wouldnt
know because I never use the ui). To bring the device back up:

sudo ifup eth0

or

sudo ifconfig eth0 up

It's times like these that I am glad I had to learn debian networking
the hard way back in the days of potato.


Matt



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 :(
>
>Can anyone suggest what I'm doing wrong?
>
>David.
>
>
>


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Derek Broughton
September 16th, 2005, 05:20 PM
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.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

David
September 16th, 2005, 08:00 PM
On Fri, Sep 16, 2005 at 04:08:58PM -0400, Matt Patterson wrote:
> When you say you lose eth0 does that mean it is no longer a valid
> interface, or it just doesnt come back up? Try this:
>
> sudo ifconfig -a

It doesn't come back up. ifconfig -a shows it still there.

>
> If you see eth0 in that list then the interface was simply not brought
> back up, you can do that easily by reenabling the device via the ui
> (which is where I assume you are getting the restart option, i wouldnt
> know because I never use the ui). To bring the device back up:
>
> sudo ifup eth0
>

ifup brought it back up again.


> It's times like these that I am glad I had to learn debian networking
> the hard way back in the days of potato.

couldn't agree more. But I've been using /etc/init.d/networking restart
since early woody, and it's always worked. I thought that was what you
were supposed to do :)

Interestingly, I have a Hoary desktop box, and it comes up fine using
/etc/init.d/networking restart
I wonder what is the difference?


>
> 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 :(
> >
> >Can anyone suggest what I'm doing wrong?
> >
> >David.
> >
> >
> >
>
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

David
September 16th, 2005, 09:00 PM
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.

OTOH, ifup works perfectly! thank you.

David.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Derek Broughton
September 18th, 2005, 10:00 AM
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


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

David
September 18th, 2005, 10:20 AM
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.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Derek Broughton
September 19th, 2005, 10:20 AM
David wrote:

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

It should be in the hardware detection. You generally don't use "auto" for
a pcmcia/cardbus/usb NIC - those will be handled by hotplug/pcmcia-cs. You
might use "auto" for a PCI NIC (I don't - I use ifplugd for that).
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

David
September 20th, 2005, 02:00 AM
On Mon, Sep 19, 2005 at 10:22:59AM -0300, Derek Broughton wrote:
> David wrote:
>
> > 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.
>
> It should be in the hardware detection. You generally don't use "auto" for
> a pcmcia/cardbus/usb NIC - those will be handled by hotplug/pcmcia-cs. You
> might use "auto" for a PCI NIC (I don't - I use ifplugd for that).
> --
> derek


I'm currently using a motherboard ethernet in the new server (hoary
doesn't configure auto eth0), but a pci on the old desktop (hoary
configures auto eth0). Perhaps that could explain the difference.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Derek Broughton
September 20th, 2005, 10:40 AM
David wrote:

> On Mon, Sep 19, 2005 at 10:22:59AM -0300, Derek Broughton wrote:
>> David wrote:
>>
>> > 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.
>>
>> It should be in the hardware detection. You generally don't use "auto"
>> for
>> a pcmcia/cardbus/usb NIC - those will be handled by hotplug/pcmcia-cs.
>> You might use "auto" for a PCI NIC (I don't - I use ifplugd for that).
>
> I'm currently using a motherboard ethernet in the new server (hoary
> doesn't configure auto eth0), but a pci on the old desktop (hoary
> configures auto eth0). Perhaps that could explain the difference.

It really _shouldn't_ but I expect the hardware detection in the installer
didn't recognize your motherboard ethernet correctly.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users