Bug Description

Binary package hint: network-manager

network manager should stop to manage _any_ interface that is configured in /etc/network/interfaces.

Rational: network-manager and ifupdown concepts do not match; not blacklisting interfaces configured in /etc/network/interfaces causes bugs, unexpected behaviour and confusion, because it breaks the auto dhcp feature of ifupdown.

Actions needed:

1. network manager should blacklist _all_ interfaces configured in /e/n/i.
2. in postinst, network manager should #-comment interfaces in /e/n/i that were previously not blacklisted; of course, only if the upgrade comes from a NM version that didn't blacklist those interfaces (e.g. <= 0.6.5-0ubuntu11).
3. desktop installer should not add auto dhcp interfaces.

17:50 < asac> pitti: please rephrase :) ?
17:51 < pitti> ok, I plug my laptop into my ethernet and have auto eth0/dhcp
17:51 < asac> yeah
17:51 < pitti> (in /e/n/i)
17:51 < pitti> then I unplug it, and want to use my wifi
17:51 < pitti> but since n-m doesn't manage eth0 any more, the default route won't be torn down for eth
17:51 < pitti> (and neither the dhclient)
17:52 < pitti> i. e. everyone who every uses network-admin will be stuck there
17:52 < asac> what happens if you have two default routes?
17:52 < pitti> oh, you can switch it back to 'roaming'
17:52 < asac> for me it worked
17:52 < pitti> asac: you lose
17:52 < pitti> asac: it's a race condition, from my experience
17:52 < pitti> sometimes it works, sometimes you lose all packets
17:53 < pitti> it's bit of a corner case, yes, but so far these cases were handled pretty well because n-m actually understood /e/n/i
17:53 < pitti> I know, choosing between two evils :/
17:53 < asac> pitti: understood is a bit exaggerated
17:53 < asac> it broke ifupdown :)
17:54 < pitti> IOW, once someone configures "dhcp" in network-admin for eth0, n-m will just go to 'static configuration' and not
do anything any more
17:54 < pitti> might be a bit confusing
17:54 < asac> he?
17:54 < ogra> who?
17:54 < asac> it will not go to static ... it will just stop to manage it
17:55 < pitti> asac: right, but it won't switch interfaces either because you have a manual configuration
17:55 < asac> can't dhclient listen to hal events?
17:55 < pitti> unless, of course, n-m continues to actually parse and interpret /e/n/i, but I thought you wanted to get rid of
that
17:56 < pitti> asac: in what way?
17:56 < asac> remove/add route?
17:56 * pitti does not understand; why should dhclient do that?
17:56 < pitti> after all, dhclient *is* the bit that actually configures routes...
17:56 < asac> i don't mean dhclient .. i mean ifupdown mechanism
17:56 < ogra> asac, you could use route directly :)
17:57 < pitti> asac: there's no ifupdownd or something that could do that; what should it do?
17:57 < ogra> pitti, he wants to remove the defaultroute for that interface if i understood right
17:57 < ogra> but keep the interface as is
17:58 < pitti> asac: if we want n-m to override ifupdown routes, then we could make ifupdown use defualtroutes with metric 1
17:58 < asac> pitti: how would that look like?
17:58 < pitti> and keep n-m use metric 0 routes
17:58 < pitti> so that n-m's routes win
17:58 < asac> yes that sounds reasonable then
17:58 * asac has not idea about metrics
17:58 < pitti> asac: just "metric 1" option
17:59 < pitti> asac: just think about it as 'priority'
17:59 < asac> yeah ... were would such a feature be added?
17:59 < pitti> the lower one wins

* ifupdown.nw: use 100 as default route metric unless an explicit metric
parameter is set in /etc/network/interface; this applies for static and
dhcp interfaces and passes the -e IF_METRIC=%metric% option to dhclient{3}
in order to accomplish this. For details see the launchpad bug
(LP: #139403).

Hi Alexander - I am seeing problems with network-manager / network-manager-gnome that seem related to this. At least the bugs that seem to describe it are marked as dups of this one ;-)

The symptom I see is that network-manager is *not* managing my wired network, when it should. At the office I have both a wired LAN, and a wifi signal. Network manager is choosing the wifi signal and not allowing me to revert to the wired LAN. This symptom is similar to what is reported under #126494 . This is with current gutsy witn network-manager 0.6.5-0ubuntu14 and network-manager-gnome 0.6.5-0ubuntu9 .

I _can_ get the networking infrastructure to use the LAN, saying `sudo ifdown eth1` but then NM thinks we have no network, and doesn't let me use the VPNs I have configured. So this is quite an awkward regression.

Does the statement that "network manager should stop to manage _any_ interface that is configured in /etc/network/interfaces" mean that for things to work well I have to remove eth0 from /etc/network/interfaces? How about lo?

To recap: After booting, the computer is not connected to the network. If I disable the network and enable it again, then it will connect and work normally.

I have not seen any similar problems on about half-a-dozen machines that I've installed Ubuntu on, but this installation is my first on a Sharp notebook. I've looked at the nine basic logs, but failed to find the parts corresponding to the stuff described in bug 133374.

On Sun, Sep 30, 2007 at 07:08:27PM -0000, martinlanghoff wrote:
> Does the statement that "network manager should stop to manage _any_
> interface that is configured in /etc/network/interfaces" mean that for
> things to work well I have to remove eth0 from /etc/network/interfaces?
> How about lo?
>

either remove your wired interface from /etc/network/interfaces or
disable/mark-for-roaming that device in System -> Administration ->
Network.

Though the last comment from Alexander wasn't addressed to me, I hoped to apply it, but roaming was not selected, and my wired interface is not listed in /etc/network/interfaces.

I have done some more experiments, but still have no real understanding of the problem. I still can't even understand why this is marked as the parent bug of the duplicate that actually seems to match the problem I'm seeing... However, it doesn't seem to be a widespread problem. (Either that, or the people who have it mostly can't figure out how to get on the network so that they can report it.)

this is my first post on the launchpad - so please excuse any formal mistakes.

What you've described, I've also figured out. It's really frustating, that after bootup I do never have an internet connection automatically.
My "/etc/network/interfaces" is empty except the "auto lo" entry and I've enabled the roaming mode for the wired connection. But on bootup my eth0 (I have only this device for networking) will be deactivated every time. I need then to "deactivate network" and "activate network" on the n-m icon at the gnome-panel to get online. Does anyone have a suggestion, how this could be solved?

I'm still not sure it's the same underlying problem that I'm trying to report, and I wish someone would post a clear diagnostic test here. What I can say is that the problem has survived the Gutsy upgrade. The workaround of disabling and then enabling networking still works to fix it. I've only upgraded two machines so far, but there was no sign of network-related problems with the other one. It's only my Sharp notebook PC-WA70L that has the problem.

It seems that I'm also affected by this particular problem on my old Hp Omnibook XE2. I've got roaming mode enabled and network manager applet sees wired connection, but never connects to it right away after boot. I must manually choose wired connection, to receive ip address. My network card is 3c589D pcmcia.

I am on 8.10 and have following cards: eth1 + ath1 (both wireless). Now I would like to be able to use eth1 as usually without the other one connecting to the same network (which is cause strange delays while fetching web pages). So I decided to add ath1 to interfaces file:

iface ath1 inet manual

I have also tried adding 'auto ath1' but this does not change anything.

But it seems NM is happy to manage ath1 anyways... It looks to me this is the same bug... (correct me if I'm wrong, and if so - how should I blacklist an interface from the NM?)

BTW - NetworkManager is very poorly documented, is it really the case or have I missed something obvious (the code obviously, but I am not talking about this kind of documentation ;) ).