brings up both wired and wireless interfaces; hard to pick just one through the UI

Bug #262152 reported by Colin Watson
102
This bug affects 11 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Won't Fix
Medium
Unassigned
Nominated for Intrepid by Tim Bartley
Nominated for Jaunty by Bill Loucks

Bug Description

Binary package hint: network-manager

network-manager 0.7 seems to like to bring up both my wired and wireless interfaces at the same time when possible. (Neither is configured in /etc/network/interfaces.) Unfortunately, if you do that on my network then you get what might charitably be described as random routing. I spent quite a while yesterday trying to figure out why my uploads kept on failing part-way through.

As far as I can see, the only way to stop it from doing this through the UI is to disable wireless altogether, which I don't want to do. Selecting the wired interface in the applet's left-click menu doesn't disable wireless (i.e. it now seems to be a multiselect widget in some respects). network-manager 0.6 used to roam quite smoothly between wired and wireless when I inserted or removed the Ethernet cable, which was ideal. Now plugging in the Ethernet cable leaves wireless still running. For the meantime I'm running 'sudo ifconfig eth1 down' when I don't need wireless and 'sudo ifconfig eth1 up' when I do, but of course this is far from optimal.

Revision history for this message
Alexander Sack (asac) wrote :

quite annoying, i agree.

Changed in network-manager:
importance: Undecided → Medium
milestone: none → ubuntu-8.10-beta
status: New → Triaged
Revision history for this message
Alexander Sack (asac) wrote :

is your wireless connection marked as "connect automatically" in connection-editor?

Revision history for this message
Colin Watson (cjwatson) wrote :

Yes, it is, because I want network-manager to connect to wireless automatically when I unplug the Ethernet cable.

ifconfig and route -n are attached. eth0 is Ethernet, eth1 is wireless. Note that network-manager has given both eth0 and eth1 (excluding the link-local route) the same metric.

Revision history for this message
Michael Milligan (milli) wrote :

This is a regression from previous behavior, which I got used to as the reporter mentions. Under Hardy/Gutsy, you only got one nm-managed interface brought up out of several available (wired and wireless), with wired preferred. When you unplug wired, it brings up wireless.

So, it's doing it for me too, it will connect all interfaces that are up at the same time if they all are checked as "connect automatically". That seems to be the default configuration after upgrade.

This just doesn't work for me as my wired and wireless networks are bridged and I have DHCP setup to give all MAC address (both wired ports or the wireless) on each laptop the same IP address.

Revision history for this message
David Murphy (schwuk) wrote :

An additional problem is that if both wired and wireless are enabled, the icon only indicates the status of the wired network, although I was connected to a (very weak) wireless connection.

Revision history for this message
Luke12 (luca-venturini) wrote :

I think bug 278485 is related. NM seems in general unable to handle well more than one connection at a time.

Revision history for this message
Chris Jones (cmsj) wrote :

I notice the new Eject icons in nautilus' sidebar for removable devices and wonder if network manager's connection list could have something similar.

Revision history for this message
Dmik (dmik-for-maillists) wrote :

In many cases it's not so much annoying as wasting resources (there is absolutely no point to have two active connections to the same router). I think that the default (one active connection at a time, wired preferred) should be restored. Of course, there are situations when several connections should be active but for these not-so-usual cases a more sophisticated setup is necessary (e.g. order of precedence, what can work in parallel with with what and so on).

If someone knows a simple way to restore the old behavior, please share.

Revision history for this message
Bill Loucks (biloucks) wrote :

@ Dmik: Simple is a relative word, but here goes: The first workaround I did to restore 0.6 behavior was to add Hardy's repositories back into software sources, then use aptitude to downgrade all five related packages to 0.6.x and mark them Held at the older version. That worked fine, but it was annoying to have update-manager and synaptic keep telling me there were upgrades available to 0.7. Once I realized how many 0.7 bugs have been reported, and thus how long it is likely to be before I would want to try an allegedly fixed 0.7, I decided to just get the five binary .deb packages, unpack them, change the version numbers to 0.7+0.6.x, re-deb them, and install those "newer" packages. That worked fine too, but of course will be a problem as soon as 0.7 gets into a high enough version to supersede my 0.7+0.6.x versions. My full rant page on 0.7 vs 0.6 is http://www2.nau.edu/wal2/NetworkManager/Readme.html . Admittedly, my main problems were with the pptp plugin, but I confirm the specific issue(s) addressed by Bug 262152. There are dozens upon dozens of bugs reported for 0.7, some of which are being actively worked upon, some not, and some not confirmed. I wonder whether, for the bugs that ARE being worked on, is all of that work being coordinated and merged. I wonder if it is possible, and whether it would make any sense, to create a much more inclusive bug for 0.7 and start marking the dozens upon dozens of existing bugs as duplicates of the new all-inclusive bug. Each of those other bugs seems to be nibbling around the edges of the much larger problem. I wonder how much QA was done on 0.7 before it was decided to put it, rather than 0.6, into 8.10 Intrepid and 9.04 Jaunty.

Revision history for this message
jasonwc (jwittlincohen) wrote :

William,

There's a simpler solution.

apt-get install wajig

wajig hold package

Revision history for this message
Bill Loucks (biloucks) wrote :

@jasonwc:
wajig worked. The held state is honoured by both update-manager and synaptic, which was exactly what I was looking for. And wajig is a very cool utility; I'll be installing it on ALL of my machines, whether I need to hold packages at specific versions or not.

I've updated my pptp rant documentation at:
http://www2.nau.edu/wal2/NetworkManager/Readme.html

Revision history for this message
gpothier (gpothier) wrote :

There is a similar report of Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=454955
There the devs say it is intended behavior for NM to connect to all networks that are marked "auto connect".
However, I think there should be an option to only allow one connection at a time, with some priorities (eg. wired has more priority than wireless). There are clearly situations were you do not want to have two connections at the same time, like, eg., the one mentioned by Michael Milligan above. Moreover there is a cognitive issue because nm-applet doesn't seem to know what icon to display: a strenght meter or a wire; sometimes it is one and sometimes the other.

Revision history for this message
Nicholas J Kreucher (kreucher) wrote :

Yes, and in some cases it's the policy of the network administrator to strictly forbid connecting to both wired and wireless in the same building. If they are different subnets, you have the potential to act as a network bridge (yes I know this takes effort, but the potential is still there). We had several cases of folks getting their MAC's quickly banned when a dual connection was detected.

I understand the NM dev's position on the "auto connect"; that behavior was probably a major chunk of work (and is great!). However, we now have this regression. A quick solution would be to add an option to each connection to say something like "disable this connection when another is active"; then tick it for your wireless connection(s). Or, the reverse might make more sense: "disconnect all other connections when this is active", and tick it for wired. A more complete solution would be to have pools of connections, or locations, and add whatever connections you'd like active in the pool. Then, you connect to pools/locations instead of individual connections. Bonus, a hook could be provided to execute custom scripts on activation of each pool/location.

Maybe someone with time (i wish that was me) can patch NM, then Ubuntu might accept it and we can close this bug.

Revision history for this message
aussiebuddha (au-mario-deactivatedaccount) wrote :

This fix didnt go in intrepid right?? when will this be fixed?

Revision history for this message
Alexander Sack (asac) wrote :

the routing issues with multiple devices should be fixed in jaunty.

Changed in network-manager (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
David S. (d-sylva) wrote :

This bug is still present in Jaunty.

Revision history for this message
Vijay Jadav (vjadav315) wrote : Re: [Bug 262152] Re: brings up both wired and wireless interfaces; hard to pick just one through the UI

Another issue in Jaunty is that there is an occasion where Jaunty will not
recognize a cross over cable.

On Fri, May 29, 2009 at 11:07 PM, David S. <email address hidden> wrote:

> This bug is still present in Jaunty.
>
> --
> brings up both wired and wireless interfaces; hard to pick just one through
> the UI
> https://bugs.launchpad.net/bugs/262152
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “network-manager” source package in Ubuntu: Won't Fix
>
> Bug description:
> Binary package hint: network-manager
>
> network-manager 0.7 seems to like to bring up both my wired and wireless
> interfaces at the same time when possible. (Neither is configured in
> /etc/network/interfaces.) Unfortunately, if you do that on my network then
> you get what might charitably be described as random routing. I spent quite
> a while yesterday trying to figure out why my uploads kept on failing
> part-way through.
>
> As far as I can see, the only way to stop it from doing this through the UI
> is to disable wireless altogether, which I don't want to do. Selecting the
> wired interface in the applet's left-click menu doesn't disable wireless
> (i.e. it now seems to be a multiselect widget in some respects).
> network-manager 0.6 used to roam quite smoothly between wired and wireless
> when I inserted or removed the Ethernet cable, which was ideal. Now plugging
> in the Ethernet cable leaves wireless still running. For the meantime I'm
> running 'sudo ifconfig eth1 down' when I don't need wireless and 'sudo
> ifconfig eth1 up' when I do, but of course this is far from optimal.
>

Revision history for this message
Abraham Smith (adsmith) wrote :

Here is an easy fix. Put this script early in both /etc/network/if-up.d and /etc/network/if-down.d.

Revision history for this message
Afz (afz902k) wrote :

I actually like the new behaviour better, the old behaviour annoyed me because I often need to work with two active connections to different networks.

Revision history for this message
TJ (tj) wrote :

adsmith's script doesn't work on Precise so I've reworked it and removed the dependency on naming interfaces. My script will act whenever any "eth*" interface comes or goes. It also logs to "/var/log/NetworkManager.log".

Install to /etc/NetworkManager/prefer_wired_over_radio.sh

Once copied to that location do:

sudo chmod ug+x /etc/NetworkManager/prefer_wired_over_radio.sh
sudo ln -s /etc/NetworkManager/prefer_wired_over_radio.sh /etc/network/if-up.d/00prefer_wired_over_radio
sudo ln -s /etc/NetworkManager/prefer_wired_over_radio.sh /etc/network/if-post-down.d/00prefer_wired_over_radio

Watching the log-file whilst disconnecting and then reconnecting the wired interface will show something like this:

# tail -f /var/log/NetworkManager.log
2013-02-23-15:28:34 prefer_wired_over_radio eth0 NetworkManager stop post-down
2013-02-23-15:28:34 Re-enabling Wireless interfaces since wired went away
2013-02-23-15:28:42 prefer_wired_over_radio wlan0 NetworkManager start post-up
2013-02-23-15:28:52 prefer_wired_over_radio eth0 NetworkManager start post-up
2013-02-23-15:28:52 Disabling Wireless interfaces whilst wired is active
2013-02-23-15:28:52 prefer_wired_over_radio wlan0 NetworkManager stop post-down

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.