Re: NetworkManager behavior answers not found in docs



On Tue, 2018-10-16 at 14:56 +0200, Thomas HUMMEL wrote:
I forgot : it seems to me that nmcli connection add also imply
"managed" 
as in nmcli device set managed yes.

Am I correct ? Then again when do we need those device commands 
manipulation ?


I don't see that happening, and it shouldn't:



$ nmcli device  | grep ^eth0
eth0               ethernet  disconnected  --              
$ nmcli connection add type ethernet con-name t ifname eth0 ipv4.addresses 192.168.10.5/24 ipv4.method manual 
ipv6.method ignore 
Connection 't' (deeb17f3-dd68-492a-b653-55800f9a3715) successfully added.
$ nmcli device  | grep ^eth0
eth0               ethernet  connected     t 

              
$ nmcli connection delete t
Connection 't' (deeb17f3-dd68-492a-b653-55800f9a3715) successfully deleted.
$ nmcli device set eth0 managed no 

$ nmcli device  | grep ^eth0
eth0               ethernet  unmanaged     --              
$ nmcli connection add type ethernet con-name t ifname eth0 ipv4.addresses 192.168.10.5/24 ipv4.method manual 
ipv6.method ignore 
Connection 't' (83fc7338-6897-4e2a-a4ec-1ecf396ccc68) successfully added.
$ nmcli device  | grep ^eth0
eth0               ethernet  unmanaged     -- 

that is, autoconnect does not kick in, because eth0 is unmanaged.


If you however do

$ nmcli device connect eth0 
Device 'eth0' successfully activated with '83fc7338-6897-4e2a-a4ec-1ecf396ccc68'.

or

$ nmcli connection up t
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/12)

then indeed, that implies a `nmcli device set eth0 managed yes`.
But it didn't happen automatically.




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]