[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proper way to restart network after modem/router reset



Tom H wrote:
> Joe Riel wrote:
> > $ grep -v '^\#' /etc/network/interfaces
> >
> > auto lo
> > iface lo inet loopback
> > allow-hotplug eth0
> >
> > Should I then do
> >
> > sudo ifdown eth0
> > sudo ifup etho0
> >
> > Hmm.  That doesn't work:
> >
> > $ sudo ifdown eth0
> > ifdown: interface eth0 not configured

It doesn't work because the file is missing the 'iface eth0 inet dhcp'
line that would tell ifup and ifdown what to do there.  But I think it
is missing that line because of Network Manager.  See why below.

> > I haven't done anything in particular to configure my
> > installation of Squeeze for the local network; just accepted
> > the defaults.

Unfortunately there is disagreement on what the defaults should be and
therefore they are set to a compromise that is often suboptimal.  (Is
that a polite way of saying I don't like the defaults and always
change them?)

> Your "/etc/network/interfaces" is incorrect.
> If you're using NM, "allow-hotplug eth0" shouldn't be included.
> If you're not using NM, "iface eth0 inet dhcp" should be added.

Mostly agree except that I believe it is okay to have the auto and
allow-hotplug lines only.  And I think the configuration specifically
is due to the action of Network Manager's postinst script.  See this
bug report for the details, especially comments related to #49 that I
have linked to here.

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530024#49

Since the above config showed to us removed all commented out lines we
can't see if there is a line
  #NetworkManager#iface eth0 inet dhcp
in there or not.  I am thinking there is.  And that left the lonely
'allow-hotplug eth0' line behind by itself.

It's a mess!

What do I do?  I only use wicd (instead of NetworkManager) on mobile
devices (laptops) that use wifi for network connectivity.  I
personally do not have any non-mobile devices that use anything other
than a wired network connection.  For all non-mobile devices I remove
network-manager completely and use only the traditional ifupdown
configuration with all three of 'auto eth0', 'allow-hotplug eth0' and
'iface eth0 inet dhcp' lines.  And for servers with fixed IP addresses
I assign the IP interface address without using dhcp.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: