Hi,

On Wed, 2017-06-28 at 16:15 +0100, Colin Helliwell wrote:
> The system has eth0 and a gsm connection (via ModemManager). 
> I have in /etc/network/interfaces:
>  auto lo
>  iface lo inet loopback
>  auto eth0
>  iface eth0 inet dhcp
> 
> NetworkManager.conf is:
>  [main]
>  plugins=ifupdown,keyfile
>  dns=default
>  rc-manager=file
> 
>  [connectivity]
> 
>  [ifupdown]
>  managed=true
> 
> First off, up/down: from reboot
> root@wg:~# nmcli -c no conn show
> NAME             UUID                                  TYPE      DEVI
> CE
> eth0             129206d8-d28f-47c7-9f9a-f9ddb1cb5218  ethernet  eth0

the connection profile "eth0" is in-memory-only and generated by NM. It
does so, because it finds some pre-existing configuration on the device
eth0, and assumes that NM should not interfere with the interface.
Basically, NM is not really actively managing this interface. 

Avoid this, by not configuring the interface outside of NM, before
starting NM. If you mention the interface in /etc/network/interface, I
would presume that the interface is already preconfigured. Don't do
that, if you don't want that.

> Ifupdown (eth0)  681b428f-beaf-8932-dce4-687ed5bae28e  ethernet  --
> O2               42bf3c07-9dd7-45f6-ba08-37dfc8a7a537  gsm       --
> Vodafone         e0f97177-2f8e-4ed4-9942-7b4e499397cc  gsm       --
> root@wg:~# nmcli -c no conn down eth0
> Connection 'eth0' successfully deactivated (D-Bus active path:
> /org/freedesktop/NetworkManager/ActiveConnection/1)
> root@wg:~# nmcli -c no conn show
> NAME             UUID                                  TYPE      DEVI
> CE
> Ifupdown (eth0)  681b428f-beaf-8932-dce4-687ed5bae28e  ethernet  eth0
> O2               42bf3c07-9dd7-45f6-ba08-37dfc8a7a537  gsm       --
> Vodafone         e0f97177-2f8e-4ed4-9942-7b4e499397cc  gsm       --

If you deactivate said generated connection, it gets deleted. NM will
also de-configure the interface. If you instead chose to modify eth0,
it would have been persisted to disk, and NM would have taken over the
interface.

> root@wgs:~# nmcli -c no conn up eth0
> Error: unknown connection 'eth0'.
> root@wg:~# nmcli -c no conn up 681b428f-beaf-8932-dce4-687ed5bae28e
> Connection successfully activated (D-Bus active path:
> /org/freedesktop/NetworkManager/ActiveConnection/3)
> root@wg:~# nmcli -c no conn show
> NAME             UUID                                  TYPE      DEVI
> CE
> Ifupdown (eth0)  681b428f-beaf-8932-dce4-687ed5bae28e  ethernet  eth0
> O2               42bf3c07-9dd7-45f6-ba08-37dfc8a7a537  gsm       --
> Vodafone         e0f97177-2f8e-4ed4-9942-7b4e499397cc  gsm       --
> root@wg:~# nmcli -c no conn down eth0
> Error: 'eth0' is not an active connection.
> Error: no active connection provided.
> 
> Puzzling how eth0 is-then-isn't a valid connection name..?  Maybe
> it's to do with the ifupdown/managed setting - and, really, I'm not
> sure whether I want to be using this or not.
> [The overall goal is to understand whether/how the system will
> behave, for example, if the eth connection dies for some reason. But
> it looks like I've got something fouled up that I need to better
> understand first]
> 
> This also causes me confusion if I try to take the eth down:
> 
> root@wg:~# nmcli -c no conn show
> NAME             UUID                                  TYPE      DEVI
> CE
> eth0             e76aaae3-b320-4f64-9402-2a4ff8f28e01  ethernet  eth0
> Ifupdown (eth0)  681b428f-beaf-8932-dce4-687ed5bae28e  ethernet  --
> O2               42bf3c07-9dd7-45f6-ba08-37dfc8a7a537  gsm       --
> Vodafone         e0f97177-2f8e-4ed4-9942-7b4e499397cc  gsm       --
> root@wg:~# cat /etc/resolv.conf
> # Generated by NetworkManager
> nameserver 192.168.10.254
> root@wg:~# nmcli conn up O2
> PPP generic driver version 2.4.2
> PPP BSD Compression module registered
> PPP Deflate Compression module registered

who prints these PPP messages?

> Connection successfully activated (D-Bus active path:
> /org/freedesktop/NetworkManager/ActiveConnection/2)
> root@wg:~# cat /etc/resolv.conf
> # Generated by NetworkManager
> nameserver 192.168.10.254
> nameserver 82.132.254.2
> nameserver 82.132.254.3
> root@wg:~# nmcli conn down eth0
> Connection 'eth0' successfully deactivated (D-Bus active path:
> /org/freedesktop/NetworkManager/ActiveConnection/1)
> root@wg:~# cat /etc/resolv.conf
> # Generated by NetworkManager
> search lan
> nameserver 192.168.10.254
> nameserver 82.132.254.2
> nameserver 82.132.254.3
> root@wg:~# ping www.google.com
> PING www.google.com (172.217.17.100): 56 data bytes
> 64 bytes from 172.217.17.100: seq=0 ttl=51 time=22.627
> ms                <- Ethernet speed
> ^C
> --- www.google.com ping statistics ---
> 2 packets transmitted, 1 packets received, 50% packet loss
> round-trip min/avg/max = 22.627/22.627/22.627 ms
> root@wg:~# nmcli -c no conn show
> NAME             UUID                                  TYPE      DEVI
> CE
> Ifupdown (eth0)  681b428f-beaf-8932-dce4-687ed5bae28e  ethernet  eth0
> O2               42bf3c07-9dd7-45f6-ba08-
> 37dfc8a7a537  gsm       ttyMux1
> Vodafone         e0f97177-2f8e-4ed4-9942-7b4e499397cc  gsm       --
> root@wg:~# nmcli conn down 681b428f-beaf-8932-dce4-687ed5bae28e
> Connection 'Ifupdown (eth0)' successfully deactivated (D-Bus active
> path: /org/freedesktop/NetworkManager/ActiveConnection/3)
> root@wg:~# cat /etc/resolv.conf
> # Generated by NetworkManager
> nameserver 82.132.254.2
> nameserver 82.132.254.3
> root@wg:~# ping www.google.com
> PING www.google.com (173.194.122.242): 56 data bytes
> 64 bytes from 173.194.122.242: seq=0 ttl=41 time=592.168
> ms                <- GSM speed
> 64 bytes from 173.194.122.242: seq=1 ttl=41 time=531.795 ms
> 64 bytes from 173.194.122.242: seq=2 ttl=41 time=511.506 ms
> 64 bytes from 173.194.122.242: seq=3 ttl=41 time=531.117 ms
> 64 bytes from 173.194.122.242: seq=4 ttl=41 time=510.785 ms
> ^C
> --- www.google.com ping statistics ---
> 6 packets transmitted, 5 packets received, 16% packet loss
> round-trip min/avg/max = 510.785/535.474/592.168 ms

I don't see it. What do you think is wrong there?


Thomas

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

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to