PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > Am I missing something in my understanding here?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

Am I missing something in my understanding here?

Réponse
 
LinkBack Outils de la discussion
Vieux 16/06/2007, 03h00   #1
Freddy Freeloader
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Am I missing something in my understanding here?

The first time I run "/etc/init.d/networking restart" after a reboot I
get the same message I would if I ran "ifdown eth0" about eth0 releasing
its dhcp address, and I no longer have network connectivity, i.e. the
/etc/init.d/networking script does not seem to call ifup -a to restart
all network connections. (I have only one nic on this computer.) To
get network connectivity back I must manually run "ifup etho".

However, ever after that first time event running
"/etc/init.d/networking restart" I get the message "reconfiguring
network interfaces" but no ifdown or ifup messages showing the releasing
and acquiring of an ip address through dhcp. If I run "ifdown eth0" at
this point it tells me that eth0 is not configured, but I have network
connectivity and ifconfig -a confirms that eth0 is configured.

If I run "/etc/init.d/networking stop" I get the correct message that
eth0 is releasing its dhcp address. However, then running
"/etc/init.d/networking start" does not run ifup on eth0 as eth0 remains
unconfigured, although I receive the message that the network interfaces
have been successfully reconfigured. I must manually run ifup eth0 to
configure it again and regain network connectivity.

My question is, is this behavior by design, or have I stumbled across a
bug?

I'm running an up-to-date Sid install.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 16/06/2007, 03h10   #2
Andrew Perrin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Am I missing something in my understanding here?

Is the following line in /etc/network/interfaces :

auto eth0

If not, eth0 will only be brought up when manually instructed to do so
with an ifup command.

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin (at) unc.edu - http://perrin.socsci.unc.edu
Assistant Professor of Sociology; Book Review Editor, _Social Forces_
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA
New Book: http://www.press.uchicago.edu/cgi-bi.../00/178592.ctl



On Fri, 15 Jun 2007, Freddy Freeloader wrote:

> The first time I run "/etc/init.d/networking restart" after a reboot I get
> the same message I would if I ran "ifdown eth0" about eth0 releasing its dhcp
> address, and I no longer have network connectivity, i.e. the
> /etc/init.d/networking script does not seem to call ifup -a to restart all
> network connections. (I have only one nic on this computer.) To get network
> connectivity back I must manually run "ifup etho".
> However, ever after that first time event running "/etc/init.d/networking
> restart" I get the message "reconfiguring network interfaces" but no ifdown
> or ifup messages showing the releasing and acquiring of an ip address through
> dhcp. If I run "ifdown eth0" at this point it tells me that eth0 is not
> configured, but I have network connectivity and ifconfig -a confirms that
> eth0 is configured.
>
> If I run "/etc/init.d/networking stop" I get the correct message that eth0 is
> releasing its dhcp address. However, then running "/etc/init.d/networking
> start" does not run ifup on eth0 as eth0 remains unconfigured, although I
> receive the message that the network interfaces have been successfully
> reconfigured. I must manually run ifup eth0 to configure it again and regain
> network connectivity.
>
> My question is, is this behavior by design, or have I stumbled across a bug?
> I'm running an up-to-date Sid install.
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject
> of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 16/06/2007, 05h50   #3
Bob Proulx
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Am I missing something in my understanding here?

Freddy Freeloader wrote:
> The first time I run "/etc/init.d/networking restart" after a reboot I
> get the same message I would if I ran "ifdown eth0" about eth0 releasing
> its dhcp address, and I no longer have network connectivity, i.e. the
> /etc/init.d/networking script does not seem to call ifup -a to restart
> all network connections. (I have only one nic on this computer.) To
> get network connectivity back I must manually run "ifup etho".


The problem is rooted in Bug#300937. It is about how to handle
hotplug network devices.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=300937

The default Etch installation configures networking such as you are
seeing now. But let's back into it from the side. The configuration
is:

allow-hotplug eth0

You noted "ifup -a". But /etc/init.d/networking does call ifup -a.
But looking at the man page for ifup shows:

-a, --all
If given to ifup, affect all interfaces marked auto.

So 'ifup -a' only brings up interfaces marked auto but a default Etch
installation sets all interfaces to allow-hotplug. Now you can see
why restarting networking does not bring up networking.

And in the man page for interfaces it says:

Lines beginning with the word "auto" are used to identify the
physical interfaces to be brought up when ifup is run with the
-a option. (This option is used by the system boot scripts.)
...
Lines beginning with "allow-" are used to identify interfaces
that should be brought up automatically by various
subsytems. This may be done using a command such as "ifup
--allow=hotplug eth0 eth1", which will only bring up eth0 or
eth1 if it is listed in an "allow-hotplug" line.

> My question is, is this behavior by design, or have I stumbled across a
> bug?


I don't know the full history behind this but looking at the
Bug#300937 I assume the design is that network events are now moved
from boot time action to network event time action to support hotplug
network interfaces. Looking in /usr/share/doc/udev/README.Debian.gz I
see:

After receiving events about network interfaces, net.agent will call
ifupdown using the --allow=hotplug option. This makes the program act
only on interfaces marked with the "allow-hotplug" statement.
E.g: "allow-hotplug eth0" instead of the usual "auto eth0".

I have not researched further what it would take to trigger udev to
restart networking but I presume there is a path through it that would
do so. To return to the previous behavior you may change the
allow-hotplug stanzas into auto stanzas and then restarting networking
will restart the network interface. I would welcome further
information on this area.

Bob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 16/06/2007, 14h10   #4
Douglas Allan Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Am I missing something in my understanding here?

On Fri, Jun 15, 2007 at 09:44:53PM -0600, Bob Proulx wrote:

> I don't know the full history behind this but looking at the
> Bug#300937 I assume the design is that network events are now moved
> from boot time action to network event time action to support hotplug
> network interfaces. Looking in /usr/share/doc/udev/README.Debian.gz I
> see:
>
> After receiving events about network interfaces, net.agent will call
> ifupdown using the --allow=hotplug option. This makes the program act
> only on interfaces marked with the "allow-hotplug" statement.
> E.g: "allow-hotplug eth0" instead of the usual "auto eth0".
>
> I have not researched further what it would take to trigger udev to
> restart networking but I presume there is a path through it that would
> do so. To return to the previous behavior you may change the
> allow-hotplug stanzas into auto stanzas and then restarting networking
> will restart the network interface. I would welcome further
> information on this area.
>


It may be that the init.d/networking script needs to be a lot smarter
when called with 'restart'. Perhaps it should try to bring all
interfaces up that have 'auto' or 'allow-hotplug' but capture the errors
generated by non-existing interfaces so that they fail silently. It
could even put an info notice in syslog to explain any subsequent error
lines there. Or, is there a way for the script to get a list of
available (hot-plugged) interfaces from somewhere in /proc and only try
to configure ones that exist?

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 18/06/2007, 15h40   #5
Freddy Freeloader
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Am I missing something in my understanding here?

Bob Proulx wrote:
> Freddy Freeloader wrote:
>
>> The first time I run "/etc/init.d/networking restart" after a reboot I
>> get the same message I would if I ran "ifdown eth0" about eth0 releasing
>> its dhcp address, and I no longer have network connectivity, i.e. the
>> /etc/init.d/networking script does not seem to call ifup -a to restart
>> all network connections. (I have only one nic on this computer.) To
>> get network connectivity back I must manually run "ifup etho".
>>

>
> The problem is rooted in Bug#300937. It is about how to handle
> hotplug network devices.
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=300937
>
> The default Etch installation configures networking such as you are
> seeing now. But let's back into it from the side. The configuration
> is:
>
> allow-hotplug eth0
>
> You noted "ifup -a". But /etc/init.d/networking does call ifup -a.
> But looking at the man page for ifup shows:
>
> -a, --all
> If given to ifup, affect all interfaces marked auto.
>
> So 'ifup -a' only brings up interfaces marked auto but a default Etch
> installation sets all interfaces to allow-hotplug. Now you can see
> why restarting networking does not bring up networking.
>
> And in the man page for interfaces it says:
>
> Lines beginning with the word "auto" are used to identify the
> physical interfaces to be brought up when ifup is run with the
> -a option. (This option is used by the system boot scripts.)
> ...
> Lines beginning with "allow-" are used to identify interfaces
> that should be brought up automatically by various
> subsytems. This may be done using a command such as "ifup
> --allow=hotplug eth0 eth1", which will only bring up eth0 or
> eth1 if it is listed in an "allow-hotplug" line.
>
>
>> My question is, is this behavior by design, or have I stumbled across a
>> bug?
>>

>
> I don't know the full history behind this but looking at the
> Bug#300937 I assume the design is that network events are now moved
> from boot time action to network event time action to support hotplug
> network interfaces. Looking in /usr/share/doc/udev/README.Debian.gz I
> see:
>
> After receiving events about network interfaces, net.agent will call
> ifupdown using the --allow=hotplug option. This makes the program act
> only on interfaces marked with the "allow-hotplug" statement.
> E.g: "allow-hotplug eth0" instead of the usual "auto eth0".
>
> I have not researched further what it would take to trigger udev to
> restart networking but I presume there is a path through it that would
> do so. To return to the previous behavior you may change the
> allow-hotplug stanzas into auto stanzas and then restarting networking
> will restart the network interface. I would welcome further
> information on this area.
>
> Bob
>
>
>


Thanks for your answer, Bob. Changing allow-hotplug to auto did change
the behavior, and I now have a better understanding of how all this works.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h49.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14909 seconds with 13 queries