Re: NetworkManager: network selection



On Di, 2015-06-02 at 20:56 +0200, Pieter Cardoen wrote:

I have some questions about how networkmanager selects a network.

How does the NetworkManager deamon decide which network to use if 
multiple network connections are available?

Hi

when a device is currently not connected, at various instances
autoconnect hits. For example when you plug-in your cable and carrier
-detect indicates a link. Or when Wi-Fi scanning indicates new visible
networks.

So, in that case, NM will search through the non-connected connections
and choose a candidate to autoconnect.

If there are multiple candidates, the one that was used most recently
will be used.

Is it possible to configure preferred networks?

Yes. Such a candidate must have the "connection.autoconnect" property
set to "yes". This is the default. In nm-applet this is called
"Automatically connect to this network when it is available".

Is it possible to configure the NetworkManager to only connect to one 
WiFi network and ignore all other free networks?

Yes, set all connection.autoconnect properties of the other connections
to "no".


Since 1.0, there is also a new property "connection.autoconnect
-priority". You can assign there a number, see
  nmcli connection show CON-NAME
  nmcli connection modify CON-NAME connection.autoconnect-priority 1
  man nm-settings
If there are multiple autoconnect candidates, those with higher numbers
will be preferred.
So, you could set the priority of the connection you prefer to "1",
leaving all others to their default at 0.



Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]