Re: Setting autoconnect vs. device autoconnect.

On Wed, 2018-01-03 at 12:39 +0100, Ana Rodríguez López wrote:
Hi all,

how do the connection setting autoconnect and device setting
autoconnect work? If the first is TRUE, will the connection be
activated with any available/compatible device? If only the second is
TRUE, which effect will this have?


It seems pretty stright forward to me.

For a profile to autoactivate on a device, a number of factors must
come together:
  - the profile must currently not be active
  - the profile must be "connection.autoconnect=yes"
  - the profile must not be blocked from autoactivation
  - the device must be in state disconnected.
  - the device must not be blocked from autoactivation.
  - the profile must be compatible with the device
  - if there are multiple profiles that could be activated,
    one is chosen according to connection.autoconnect-priority
    and the time of last activation.
Otherwise, autoactivation doesn't happen.

For example, if you manually deactivate a connection profile, then the
profile is blocked from autoconnecting again. Or if activation fails
for "connection.autoconnect-retries" times, it is blocked too (for a
time). That is distinct from the profile's "connection.autoconnect"

I am managing two devices with NM, a gsm modem and a wired
connection. I want NM to automatically connect to the preferred
connection (according to the priority of each connection) only when I
manually decide that the connection is needed.

What means "automaticlly connection ... when I manually decide"? So,
you don't want to autoconnect, but manually activate the profile. Then
do that, with `nmcli connection up` or `nmcli device connect`.

Or maybe even `nmcli device set "eth0" autoconnect yes` if
autoactivation was blocked previously. But that is quite different from
manually activating a profile.

What is the best way to do this? Should I only use setting
autoconnect or rather device autoconnect?

Moreover, I cannot see the device autoconnect configuration with
`nmcli device show <iface>`. Is there a way to see it?

  nmcli --fields all device show eth0 | grep AUTOCONN
  nmcli --fields GENERAL.AUTOCONNECT device show eth0 

I think that the device's autoconnect property is in most cases not
of much concern for the user. Usually, it just does the right thing
and you don't explitiy block autoconnect on the device. But you could
change it with `nmcli device set`.


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]