Something (dns/routing) missing for GSM modem when needing 'managed' flag?



I've been trying out some failure scenarios with Eth vs. GSM modem (under ModemManager) - e.g. Eth link 
getting disconnected/reconnected.

eth0 was present in my /etc/network/interfaces:
    auto eth0
    iface eth0 inet dhcp
therefore I used the "managed=true" setting in NetworkManager.conf, with the ifupdown plugin.
Board is booted with the eth cable connected. I'm not using systemd.

=>
root@wg:~# nmcli conn
NAME             UUID                                  TYPE            DEVICE
eth0             100f5a79-f573-44ca-b746-04727dab4a7d  802-3-ethernet  eth0
Ifupdown (eth0)  681b428f-beaf-8932-dce4-687ed5bae28e  802-3-ethernet  --
O2               42bf3c07-9dd7-45f6-ba08-37dfc8a7a537  gsm             --


I bring up the MM GSM connection. 
Nameservers for both appear in resolv.conf, and 'route' shows both eth0 and ppp0.
I can [busybox] ping a site by name on ppp0 (using the -I option).
I then unplug the eth cable, and the ping then fails [eventually!] with "bad address". (It works if I specify 
IP addr instead).
It works (by name) when I reconnect the the cable.

root@wg:~# nmcli
ttyMux1: connected to O2
        gsm (linmux), hw, iface ppp
        ip4 default
        inet4 10.65.57.212/32

eth0: unavailable
        ethernet (fec), 00:0C:C6:7F:E5:51, hw, mtu 1500

lo: unmanaged
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
        servers: 82.132.254.2 82.132.254.3
        interface: ppp0

        servers: 192.168.10.254
        interface: eth0

root@wg:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.10.254  0.0.0.0         UG    0      0        0 eth0
0.0.0.0         10.65.57.212    0.0.0.0         UG    700    0        0 ppp0
10.65.57.212    0.0.0.0         255.255.255.255 UH    700    0        0 ppp0
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

root@wg:~# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 82.132.254.2
nameserver 82.132.254.3
nameserver 192.168.10.254


On disconnect of the cable, NM logs:
May 11 15:47:45 wg2xx-tx6s user.info kernel: fec 2188000.ethernet eth0: Link is Down
May 11 15:47:49 wg2xx-tx6s daemon.info NetworkManager[850]: <info>  [1494514069.2116] device (eth0): state 
change: activated -> unavailable (reason 'carrier-changed') [100 20 40]
May 11 15:47:49 wg2xx-tx6s daemon.info NetworkManager[850]: <info>  [1494514069.2324] policy: set 'O2' (ppp0) 
as default for IPv4 routing and DNS
May 11 15:47:49 wg2xx-tx6s daemon.notice dbus[824]: [system] Activating service 
name='org.freedesktop.nm_dispatcher' (using servicehelper)
May 11 15:47:49 wg2xx-tx6s daemon.notice dbus[824]: [system] Successfully activated service 
'org.freedesktop.nm_dispatcher'
May 11 15:47:49 wg2xx-tx6s daemon.info nm-dispatcher: req:1 'down' [eth0]: new request (1 scripts)
May 11 15:47:49 wg2xx-tx6s daemon.info nm-dispatcher: req:1 'down' [eth0]: start running ordered scripts...



In contrast however, if I comment eth0 out of /etc/network/interfaces and reboot (with eth cable reconnected) 
and repeat, then the ppp0 ping works fine after disconnecting the eth cable.

root@wg:~# nmcli
ttyMux1: connected to O2
        gsm (linmux), hw, iface ppp
        ip4 default
        inet4 10.67.91.236/32

eth0: unavailable
        ethernet (fec), 00:0C:C6:7F:E5:51, hw, mtu 1500

lo: unmanaged
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
        servers: 82.132.254.2 82.132.254.3
        interface: ppp0

root@wg:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.67.91.236    0.0.0.0         UG    700    0        0 ppp0
10.67.91.236    0.0.0.0         255.255.255.255 UH    700    0        0 ppp0

root@wg:~# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 82.132.254.2
nameserver 82.132.254.3



It seems the dns lookup is being tried on eth0 instead of ppp0  -  as if the 'managed=true' isn't altering 
all the behaviour that it should be?  (e.g. in the failing case, eth0 is still showing in resolv.conf & in 
the routing table...?). 
I have no pre/post up/down scripts in /etc/network/

eth0 is in /etc/network/interfaces for not conscious reason - just the way by image is building at present. I 
could chop it out if necessary, but as I'm sticking my on NetworkManager.conf into the rootfs anyway, that 
would be an easier way to flick the behaviour, if I can get it to work equivalently.


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