-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steve Langasek wrote:
> On Thu, Mar 29, 2007 at 10:53:47PM +0300, Eddy Petrișor wrote:
>>>> The only case where the init script worked was when I enabled the
>>>> interface from NM and *then* it worked, even if I logged out of the
>>>> X session. This would work until NM disables/deconfigures(/whatever
>>>> is appropriate term would be according to NM) the card, when the
>>>> init script, again, has no effect.
>
>>> Ok, still not sure what it means for this to not work. NM provides no hooks
>>> that prevent ifupdown from doing its job.
>
>> For more information about the issues, see the attached (beautified) script.
>
> Uh, putting your comments on the process *in-line as shell comments* is very
> difficult to read; you also show three tests but only show the contents of
> /etc/network/interfaces in two of them, which I find confusing. It would be
> a lot clearer if you would summarize your findings.
Ok, I added comments/summaries above each test (in fact 4 of them). I wanted to
comment more on them, but I also wanted to show a sign that I care about this
issue.
Summaries are separated between some visible markers.
> It is certainly the case that /etc/init.d/networking should have no effect
> on interfaces that are not marked 'auto'.
allow-hotplug ones should be managed, too (according to the README.Debian
examples)
1.)
auto wlan0
iface wlan0 inet dhcp
- -> This device is managed by NM.
1.a)
allow-hotplug eth0
iface eth0 inet dhcp
- -> This device is managed by NM
But I never disagreed with that :-) .
For interfaces that are marked
> 'auto', it should have an affect, and in my tests appears to do so. The
Well, sometimes generates erratic behaviour in the networking init script :-/
> fact that it is possible in the NM applet to *override* the status of an
> interface sounds to me like a feature, not a bug.
That would be ok *if* I would still be able to use the init script to stop and
start networking from the console. Since X might not start, it might not
allowing me to maneuver networking from the console until I:
1) remove NM from the system,
2) start in X and use NM to start it (which leaves the init script broken with
allow-hotplug, and partly broken with auto)
3) add a dummy hook to the interface I want to work with and restart dbus, to NM
does not handle the connection anymore
4) modify interfaces to use a static IP
All of these are suboptimal, IMHO.
- --
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGDGGxY8Chqv3NRNoRAl31AJ0Xp3o1ShvXDbm9Z3dMb8zsxkea3QCgy+S0
avHVAu2qWUahtnHvf51M2xU=
=b3NR
-----END PGP SIGNATURE-----
--------------------------------------------------
The first situation starts with NM removed, after a reboot, with "allow-hotplug"
set in interfaces.
After "networking stop", "networking start" has no effect.
So this whole issue looks like is related both to NM and the "allow-hotplug"
vs. "auto" option.
Sorry for not provifing full information here.
--------------------------------------------------
Script started on Jo 29 mar 2007 19:57:11 +0300
debian:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9450 errors:0 dropped:0 overruns:0 frame:0
TX packets:2313 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14039029 (13.3 MiB) TX bytes:149074 (145.5 KiB)
Interrupt:10 Base address:0xc100
debian:/# ps ax | grep dhc
1740 ? S<s 0:00 dhclient3 -pf /var/run/dhclient.eth0.pid -lf
/var/lib/dhcp3/dhclient.eth0.leases eth0
8507 pts/2 R+ 0:00 grep dhc
debian:/# /etc/init.d/networking stop
Deconfiguring network interfaces...There is already a pid file
/var/run/dhclient.eth0.pid with pid 1740
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/52:54:00:12:34:56
Sending on LPF/eth0/52:54:00:12:34:56
Sending on Socket/fallback
DHCPRELEASE on eth0 to 10.0.2.2 port 67
done.
debian:/# ps ax | grep dhc
8540 pts/2 S+ 0:00 grep dhc
debian:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:9451 errors:0 dropped:0 overruns:0 frame:0
TX packets:2315 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14039089 (13.3 MiB) TX bytes:149476 (145.9 KiB)
Interrupt:10 Base address:0xc100
debian:/# /etc/init.d/networking start
Configuring network interfaces...done.
debian:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:9451 errors:0 dropped:0 overruns:0 frame:0
TX packets:2315 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14039089 (13.3 MiB) TX bytes:149476 (145.9 KiB)
Interrupt:10 Base address:0xc100
debian:/# /etc/init.d/networking restart
Reconfiguring network interfaces...done.
debian:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:9451 errors:0 dropped:0 overruns:0 frame:0
TX packets:2315 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14039089 (13.3 MiB) TX bytes:149476 (145.9 KiB)
Interrupt:10 Base address:0xc100
debian:/# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
debian:/#
Script done on Jo 29 mar 2007 19:58:22 +0300
--------------------------------------------------
This test starts without NM installed and with "auto eth0" in interfaces.
In this case the init script behaves as expected, stop is stop, start is
start, restart is restart.
--------------------------------------------------
Script started on Jo 29 mar 2007 20:00:12 +0300
debian:/# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
debian:/# # it seems the problem lies in allow-hotplug vs. auto
debian:/# /etc/init.d/networking stop
Deconfiguring network interfaces...There is already a pid file
/var/run/dhclient.eth0.pid with pid 8701
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/52:54:00:12:34:56
Sending on LPF/eth0/52:54:00:12:34:56
Sending on Socket/fallback
DHCPRELEASE on eth0 to 10.0.2.2 port 67
done.
debian:/# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
debian:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:9467 errors:0 dropped:0 overruns:0 frame:0
TX packets:2364 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14042404 (13.3 MiB) TX bytes:157722 (154.0 KiB)
Interrupt:10 Base address:0xc100
debian:/# /etc/init.d/networking start
Configuring network interfaces...Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/52:54:00:12:34:56
Sending on LPF/eth0/52:54:00:12:34:56
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 10.0.2.2
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 10.0.2.2
bound to 10.0.2.15 -- renewal in 36354 seconds.
done.
debian:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9473 errors:0 dropped:0 overruns:0 frame:0
TX packets:2381 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14043954 (13.3 MiB) TX bytes:160704 (156.9 KiB)
Interrupt:10 Base address:0xc100
--------------------------------------------------
As soon as NM enters the stage, things become weird, even if auto is kept:
The interface is down, (init) start has no effect until the interface is stopped
through the init script.
(this continues the test above)
--------------------------------------------------
debian:/# # I will try to install NM, too
debian:/# aptitude install network-manager
[...]
Reloading system message bus config...done.
Restarting network connection manager: NetworkManager.
Restarting network events dispatcher: NetworkManagerDispatcher.
debian:/# ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9962 errors:0 dropped:0 overruns:0 frame:0
TX packets:2574 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14764962 (14.0 MiB) TX bytes:173001 (168.9 KiB)
Interrupt:10 Base address:0xc100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
debian:/# /etc/init.d/networking start
Configuring network interfaces...done.
debian:/# ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9962 errors:0 dropped:0 overruns:0 frame:0
TX packets:2574 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14764962 (14.0 MiB) TX bytes:173001 (168.9 KiB)
Interrupt:10 Base address:0xc100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
debian:/# /etc/init.d/networking stop
Deconfiguring network interfaces...There is already a pid file
/var/run/dhclient.eth0.pid with pid 8818
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/52:54:00:12:34:56
Sending on LPF/eth0/52:54:00:12:34:56
Sending on Socket/fallback
DHCPRELEASE on eth0 to 10.0.2.2 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
done.
debian:/# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
debian:/# /etc/init.d/networking start
Configuring network interfaces...Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/52:54:00:12:34:56
Sending on LPF/eth0/52:54:00:12:34:56
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 10.0.2.2
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 10.0.2.2
bound to 10.0.2.15 -- renewal in 38286 seconds.
done.
debian:/# ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9969 errors:0 dropped:0 overruns:0 frame:0
TX packets:2592 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14766597 (14.0 MiB) TX bytes:176081 (171.9 KiB)
Interrupt:10 Base address:0xc100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
debian:/# exit
Script done on Jo 29 mar 2007 20:34:09 +0300
--------------------------------------------------
NM installed, connection was activated the GNOME applet, the interface has
"allow-hotplug"
/etc/init.d/networking stop has no effect.
This configuration would be the one after the default install, *after* the user
realises that
he has to start the interface via the applet.
--------------------------------------------------
Script started on Jo 29 mar 2007 23:41:52 +0300
debian:/# # NM was installed and the connection was activated via the gnome
appl et
debian:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10040 errors:0 dropped:0 overruns:0 frame:0
TX packets:2720 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14775697 (14.0 MiB) TX bytes:209765 (204.8 KiB)
Interrupt:10 Base address:0xc100
debian:/# /etc/init.d/networking stop
Deconfiguring network interfaces...done.
debian:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10040 errors:0 dropped:0 overruns:0 frame:0
TX packets:2720 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14775697 (14.0 MiB) TX bytes:209765 (204.8 KiB)
Interrupt:10 Base address:0xc100
debian:/# # no effect
debian:/# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
#auto eth0
iface eth0 inet dhcp
debian:/# exit