in some situations the device will get complete offline and it is not possible to recover it with the openBalena standard tools like NetworkManager.
We are using some gateways with the raspberrypi4-64 image.
Each device have an build in EC25 Quectel modem and 2 wired ethernet interfaces.
Now we have the huge issue, that we allow our customer to change the network settings (dhcp, staticip, default gw etc.) the modem is used for us as Fallback-Interface.
=> If there is a faulty configuration, we should be able to connect to our device always and give support.
But if the device will be installed into a machine with an Machine - Intranet (some times the machines router will block the internetconnection), it is not possible to connect via balena vpn ssh to the gateway.
But in the mobile provider webapp we are able to see, that the SIM Card is online.
If the customer removes the wired conenction, a connectio to the device over vpn is possible again.
I was able to reproduce this issue in my network.
Test 1:
-
LAN1 Static IP, Metrik 1
-
Celluar, Metrik 4
-
Start with full connectivity => GW Online
-
Block Internet Connectivity of Static IP Interface on MAC Layer with Router Access Control
-
Gateway goes offline, although celluar have full internet access
Test 2:
-
LAN1 Static IP, Metrik 1
-
Celluar, Metrik 4
-
Power down Gateway
-
Block Internet Connectivity of Static IP Interface with Router Access Control
-
Power up Gateway
-
Gateway stays offline, although celluar have full internet access
Test 3:
-
LAN1 DHCP IP, Metrik 1
-
Celluar, Metrik 4
-
Power off device
-
Block Internet Connectivity of Static IP Interface with Router Access Control
-
Power on device
-
Gateway never goes online, even onomodo portal says mobile is connected
In no case, the NetworkManager is doing his job.
But this is issue occurs only in the combination USB-Modem and Wired Network.
if i use WiFi and Wired Network the Network Manager is able to switch the connection.
In our case i added some functions in our main application in the docker container to detect this situation and resolve it by ourself.
But is there a configuration of the NetworkManager to allow him to change the metric to a mobile device?
I also saw, that the DNS Resolve was not possible in this situation if Wired (No Internet) had Metrik 1 and Mobile (Full Internet) had Metrik 4.
At the moment Mobile get Metrik 1, the DNS Resolve of nmcli connectivity check was possible and i got a online device.
Some cli commands for debugging:
nmcli general logging level DEBUG domains ALL
nmcli networking connectivity check
journalctl -f
route -n