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

RE: networking



> On Fri, 14 Jan 2011 12:54:49 -0700 <bob@proulx.com> wrote:
> > Mihira Fernando wrote:
> > Bonno Bloksma wrote:
> > > I have been wondering about this and have not seen any definitive
> > > documentation, or if there is, I have not understood it.
> > > Does "auto" imply "allow-hotplug"? If not, should I have both
> > > auto eth0 eth1
> > > and
> > > allow-hotplug eth0 eth1
> > > lines in my interfaces file?
> >
> > AFAIK, allow-hotplug makes the interface come up only when a cable
> > is plugged in. auto makes the interface come up at boot time
> > regardless of the cable state.
>
> You are exactly correct. Having 'auto' is the old way that starts
> networking with '/etc/init.d/networking start'. But that does not
> enable event driven actions such as link status change from plugging
> and unplugging the cable. For that you need 'allow-hotplug'. But
> that new way doesn't enable '/etc/init.d/networking restart' to do
> anything.
>
> Since hotplugging is the new way the debian-installer now sets that up
> for new systems. Using an event driven network configuration is
> definitely an improvement in general and the right direction to go.
> But us old-timers who want to be able to restart the networking then
> find that '/etc/init.d/networking restart' doesn't do anything. For
> that we also need 'auto' to be present.
>

Would executing '/etc/init.d/networking stop' followed by '/etc/init.d/networking start' work to restart networking when using only the new way ('allow-hotplug')?

I understand ifup/down can also be used, but what would t look like? I have only used ifconfig to bring interface either up or down.

>
> This came up in discussion in the past. I don't have the time at the
> moment to find a reference link however. But it is okay to have both
> trigger conditions present. Then both networking restart and link
> status changes will affect the network configuration.
>

This is something to keep in mind as it only adds minimal line to the /etc/network/interfaces file :)

Thanks.

>
> And of course for wicd or network-manager neither of auto or
> allow-hotplug can be present. For those tools only configure
> interfaces that do not have any local configuration.


Reply to: