You are not logged in.

#1 2015-06-08 17:46:01

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 787

NetworkManager starting two networks

I was under the impression from the wiki that NetworkManager:

prefers wired connections over wireless ones

I assumed, therefore, that, if my network cable was connected I would only get a wired connection and it would try and find a wireless one if it wasn't.

To my surprise, however, I find that NM starts both my wired and wireless connections at boot.  Is this supposed to happen?  Is it possible to set it up to work as I initially expected?

Offline

#2 2015-06-08 17:55:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,350

Re: NetworkManager starting two networks

Are they on the same subnet?  The wireless can be attached to one subnetwork and the wired to another.  You should not (generally) have two connections from one computer to the same subnet -- routing and hostnames get confusing.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2015-06-08 18:00:26

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: NetworkManager starting two networks

See example 11 in the man page nmcli-examples.

Offline

#4 2015-06-08 18:34:44

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 787

Re: NetworkManager starting two networks

@ewaller yes, they're on the same subnet.  The laptop mostly lives in my study and is connected to a wired network, but I sometimes move it about the house - hence the need for wifi

@raynman thanks - that looks like it might do what I need. I'd assumed that was how it would work by default - are there any reasons a person would want both connections on at the same time?

Offline

#5 2015-06-23 14:44:04

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 787

Re: NetworkManager starting two networks

Interestingly - example 11, as I have only just discovered today, seems to only work if you boot with a network cable attached.  It will then switch happily between wired and wifi.  If, however, you boot with no ethernet connection, then you get nothing.

Last edited by phunni (2015-06-23 14:44:20)

Offline

#6 2015-06-23 23:34:32

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: NetworkManager starting two networks

ewaller wrote:

Are they on the same subnet?  The wireless can be attached to one subnetwork and the wired to another.  You should not (generally) have two connections from one computer to the same subnet -- routing and hostnames get confusing.

I disagree with this.
Heck, on the same subnet I even set the same IP address to both the wired and wireless cards - dhcpcd will intelligently assign the IP address and routing to the lowest metric, by default the wired interface. Unplug the cable and dhcpcd will move the ip and subnet to the wireless interface quickly and fairly painlessly.

The benefit of this is I don't care how my laptop is connected, the same hostname and IP address always works.

Of course, not many other solutions support this, so YMMV smile

Offline

Board footer

Powered by FluxBB