Re: nmcli connection down



On Thu, 2018-11-08 at 16:30 +0100, Thomas HUMMEL wrote:
Hello,

nmcli(1) states about the connection down command :

"Be aware that this command deactivates the specified active
connection, 
but the device on which the connection was active, is still ready to 
connect and will perform auto-activation by looking for a suitable 
connection that has the 'autoconnect' flag set. This includes the
just 
deactivated connection. So if the connection is set to auto-connect,
it 
will be automatically started on the disconnected device again."

In the following simple test :

# ls -l /var/lib/NetworkManager/no-auto-default.state
-rw-r--r-- 1 root root 0 Nov  8 16:25 
/var/lib/NetworkManager/no-auto-default.state

# nmcli connection delete foobar
Connection 'foobar' (eedc4b58-5a81-45e9-9cac-586f9f25f61d)
successfully 
deleted.

# nmcli connection add type ethernet con-name foobar ifname eth1
Connection 'foobar' (1c34b34b-f3ab-4d7d-8a19-3fdf618a16f3)
successfully 
added.

# nmcli -f connection.autoconnect connection show foobar
connection.autoconnect:                 yes

# nmcli -f GENERAL.AUTOCONNECT device show eth1
GENERAL.AUTOCONNECT:                    yes

# nmcli connection down foobar
Connection 'foobar' successfully deactivated (D-Bus active path: 
/org/freedesktop/NetworkManager/ActiveConnection/2)

# nmcli connection show
NAME    UUID                                  TYPE      DEVICE
foobar  1c34b34b-f3ab-4d7d-8a19-3fdf618a16f3  ethernet  --

# ip address show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state
UP 
group default qlen 1000
     link/ether 00:50:56:8a:42:bf brd ff:ff:ff:ff:ff:ff


it seems to me I'd qualified to the "This includes the just
deactivated 
connection." case ? So why doesn't the device auto-reconnects ?

Hi,


I think this is just a documentation bug.

Fixed: 
https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=17f9801e07df0c544e0416c65cedc28727476e55

Thanks for actually reading the documentation and pointing out confusing/wrong parts!!

best,
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]