2020-11-09, 04:42 PM
(This post was last modified: 2020-11-09, 05:04 PM by Blue Ocean.)
Thanks both for the info.
Today, totally prepared for network debugging I plugged the dongle in and this is what I got:
pi@openplotter:~ $ systemctl status dhcpcd
â— dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-11-06 13:58:20 CET; 3 days ago
Process: 354 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
Main PID: 409 (dhcpcd)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/dhcpcd.service
├─409 /sbin/dhcpcd -q -b
└─566 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
Nov 09 16:21:41 openplotter dhcpcd[409]: eth1: waiting for carrier
Nov 09 16:21:41 openplotter dhcpcd[409]: eth1: carrier acquired
Nov 09 16:21:41 openplotter dhcpcd[409]: eth1: carrier lost
Nov 09 16:21:48 openplotter dhcpcd[409]: eth1: carrier acquired
Nov 09 16:21:48 openplotter dhcpcd[409]: eth1: soliciting a DHCP lease
Nov 09 16:21:49 openplotter dhcpcd[409]: eth1: offered 192.168.8.100 from 192.168.8.1
Nov 09 16:21:49 openplotter dhcpcd[409]: eth1: probing address 192.168.8.100/24
Nov 09 16:21:54 openplotter dhcpcd[409]: eth1: leased 192.168.8.100 for 86400 seconds
Nov 09 16:21:54 openplotter dhcpcd[409]: eth1: adding route to 192.168.8.0/24
Nov 09 16:21:54 openplotter dhcpcd[409]: eth1: adding default route via 192.168.8.1
Nice, working as expected.
I blame the previous problem to a lousy cellphone provider because I can see it constantly loosing connection.
Now to find out about preference (metrics), because right now the config prefers the 3G/4G over WiFi and I would like it to have the other way around.
Oh wow, that was easy:
Add a line to /etc/dhcpcd.conf for eth1 (the 3G/4G dongle) with a metric slightly higher than the WiFi dongle.
Today, totally prepared for network debugging I plugged the dongle in and this is what I got:
pi@openplotter:~ $ systemctl status dhcpcd
â— dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-11-06 13:58:20 CET; 3 days ago
Process: 354 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
Main PID: 409 (dhcpcd)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/dhcpcd.service
├─409 /sbin/dhcpcd -q -b
└─566 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
Nov 09 16:21:41 openplotter dhcpcd[409]: eth1: waiting for carrier
Nov 09 16:21:41 openplotter dhcpcd[409]: eth1: carrier acquired
Nov 09 16:21:41 openplotter dhcpcd[409]: eth1: carrier lost
Nov 09 16:21:48 openplotter dhcpcd[409]: eth1: carrier acquired
Nov 09 16:21:48 openplotter dhcpcd[409]: eth1: soliciting a DHCP lease
Nov 09 16:21:49 openplotter dhcpcd[409]: eth1: offered 192.168.8.100 from 192.168.8.1
Nov 09 16:21:49 openplotter dhcpcd[409]: eth1: probing address 192.168.8.100/24
Nov 09 16:21:54 openplotter dhcpcd[409]: eth1: leased 192.168.8.100 for 86400 seconds
Nov 09 16:21:54 openplotter dhcpcd[409]: eth1: adding route to 192.168.8.0/24
Nov 09 16:21:54 openplotter dhcpcd[409]: eth1: adding default route via 192.168.8.1
Nice, working as expected.
I blame the previous problem to a lousy cellphone provider because I can see it constantly loosing connection.
Now to find out about preference (metrics), because right now the config prefers the 3G/4G over WiFi and I would like it to have the other way around.
Oh wow, that was easy:
Add a line to /etc/dhcpcd.conf for eth1 (the 3G/4G dongle) with a metric slightly higher than the WiFi dongle.