Re: network reference v2: questions about allow-hotplug

2008-02-02 Thread Osamu Aoki
On Sat, Feb 02, 2008 at 03:39:08PM +1100, [EMAIL PROTECTED] wrote:
 Hello,
 
 I have been looking at the wiki version of the network reference
 [ http://wiki.debian.org/DebianReference/Network ]
 
 I have a few questions about the description of allow-hotplug, which
 I think could be improved further. I have always found the documentation
 for this stanza difficult to understand, both in the Reference and in
 interfaces(5).
 
 Question 1.
 In the table of stanzas, you have this line
 | allow-hotplug interface_name |
   To start interface interface_name upon hotplug event of the system. |
 
 I take this to mean that there is hotplug support in the ifupdown
 programs, so that they can respond to hotplug events from the kernel.
 Is that correct?
 Would it be better to say it this way?
 | allow-hotplug interface_name |
   Start interface interface_name when the kernel detects a hotplug event
from the interface. | 

Yes.  If you think this table should use imperative than noun pharase,
please correct all.  For now, I kept To verb ... structure.  Done for
now.

 Question 2.
 Under The network interface served by the DHCP is the sentence:
The following configuration entry in the /e/n/i file brings up the
primary network interface eth0 upon the Linux kernel finding up the
physical interface eth0 (via allow-hotplug stanza) while configuring
it with DHCP.
 
 Would it be better to say this?
The following configuration entry in the /e/n/i file is the typical
way to set up a network interface in such an environment. When the
Linux kernel detects the physical interface eth0, the allow-hotplug
stanza will cause ifup to bring up the interface and the iface stanza
will cause ifup to use DHCP to configure the interface.

Yes.  Much more readable English.  Done.

 Question 3.
 
 If I understand correctly the hotplug events referred to here are
 relating to the network hardware being hotplugged into a running system,
 eg a PCMCIA card being inserted or a USB ethernet device being plugged in.
 
 When a system with a built-in ethernet card is powered up, is a hotplug
 event generated when the kernel detects it, during the boot sequence?
 
That should only be enabled by auto, I thought.

 Question 4.
 If I power up a system with a built-in ethernet interface, but with
 no ethernet cable plugged into it, does plugging in an ethernet cable
 also generate a hotplug event that is noticed by allow-hotplug?

Unfortunately no at this moment.  I should say I was annoyed for this
when I forget to plug in wire.  I always have to do ifdown eth0; ifup
etho.  It becomes some zombee state as I observed.  This is very good
question.

 This last part is the piece I find most confusing. The section on the
 wiki page about The caution for operations helped quite a bit,
 explaining that if one is using ifplugd then auto and allow-hotplug
 should not be used. I think that is the first time I have seen that
 written down clearly.

I inherited that from the previous version mostly described by Thomas
Hood.  If you understand that these system has layered structure, it is
quite natural.

 The section auto-switchable network configuration hints that the
 answer here is yes, plugging in an ethernet cable generates a hotplug
 event that allow-hotplug will act upon.
 If so, does that mean ifplugd is no longer needed?

Tat is what it is.  But  am not in such fancy network now to positively
test it.   I just summarized documentation here.  In the second thought,
if unplugged ethernet cause funny network state, how can it be done like
this.  I may be wrong here.

Recently, I put ifupdown-extra package into my system.  Which seem to do
something on unplugged ethernet cable  I need to check...

Let me do ifdown / unplug / ... and:
[EMAIL PROTECTED]:~$ sudo ifdown eth0
Restarting mail retriever agent: fetchmail.
There is already a pid file /var/run/dhclient.eth0.pid with pid 4110
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:19:e3:63:0e:3f
Sending on   LPF/eth0/00:19:e3:63:0e:3f
Sending on   Socket/fallback
option_space_encapsulate: option space agent does not exist, but is configured.
DHCPRELEASE on eth0 to 192.168.11.1 port 67
[EMAIL PROTECTED]:~$ sudo ifup eth0
osamu[12616]: WARNING: Initialising interface eth0 which does not have link
Internet Systems Consortium DHCP Client V3.1.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:19:e3:63:0e:3f
Sending on   LPF/eth0/00:19:e3:63:0e:3f
Sending on   Socket/fallback
option_space_encapsulate: option space agent does not exist, but is configured.
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 

Re: network reference v2: questions about allow-hotplug

2008-02-02 Thread Osamu Aoki
On Sat, Feb 02, 2008 at 09:15:52PM +0900, Osamu Aoki wrote:
...
  The section auto-switchable network configuration hints that the
  answer here is yes, plugging in an ethernet cable generates a hotplug
  event that allow-hotplug will act upon.
  If so, does that mean ifplugd is no longer needed?
 
 That is what it is.  But  am not in such fancy network now to positively
 test it.   I just summarized documentation here.  In the second thought,
 if unplugged ethernet cause funny network state, how can it be done like
 this.  I may be wrong here.

I was wrong.  It seems you need ifplugd to do something. GUESSNET(8)
told me so.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]