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

Re: Restarting Networking in Debian

Wayne Topa wrote:
> Carlos Mennens wrote:
> >/etc/init.d/networking restart
> >
> >Now when I do so in Debian, I get a strange error:
> >
> >Running /etc/init.d/networking restart is deprecated because it may
> >not enable again some interfaces ... (warning).
> >Reconfiguring network interfaces...done.
> It has been discussed here before.  You might want to go, as many
> do, to the list archives for the complete story.  Google would have
> found your answer as well

The new way is with ifup and ifdown.

  sudo ifdown eth0
  sudo ifup eth0

In the old days interfaces were quite static on systems.  But with the
coming of removable and hotplug devices such as PCMCIA or USB network
interface cards there was a need to move to a more dynamic system.
Before networking needed to come online at boot time and go offline at
shutdown time.  But that isn't sufficient now.  Now devices come
online when they are plugged in and go offline when they are
disconnected.  Everything has been rewritten to be event driven.

For those of us who were used to the old static boot time system it is
a little bit of a change in mind set but a worthwhile one because of
the new capabilities that it provides.  Basically this means that you
rarely if ever should have the need to run /etc/init.d/networking stop
but would bring an individual interface offline with ifdown eth0

> invoke-rc.d networking restart

Actually running 'invoke-rc.d networking $ACTION' is exactly the same
as running '/etc/init.d/networking $ACTION' with the addition that it
checks the policy constraints to see if it actually should do that or
not.  This is useful in chroots and other places where you may want to
have something installed but not have it actually running.  Or you may
be using runlevels to control when services should be running.  If you
create a /usr/sbin/policy-rc.d that contains 'exit 101' then no
services will ever be started.

For the details on the policy layer see:


Attachment: signature.asc
Description: Digital signature

Reply to: