Limited connectivity detected on ethernet link

Hello,

basicly I do have problem with Network Manager. My setup is a little strange maybe. Maybe it is the reason. Can’t tell.
I have a laptop connected to MikroTik router via two interfaces: ethernet and wifi. There is a ethernet switch between
laptop and router. If the power goes down this switch is off and ethernet connection is not working. So this is why I use wifi also (mean to be the backup connection). All at the same time! Both have default route present when up. But the metric differs - what is obvious.
Wifi route have “less priority” metric - so ethernet link is used. To not complicate the setup both interfaces gets the
same IP address from DHCP server (dnsmasq):

[worker ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    20     0        0 lan1
0.0.0.0         192.168.1.254   0.0.0.0         UG    40     0        0 wifi
10.0.0.0        192.168.1.70    255.0.0.0       UG    20     0        0 lan1
10.0.0.0        192.168.1.70    255.0.0.0       UG    40     0        0 wifi
192.168.1.0     0.0.0.0         255.255.255.0   U     20     0        0 lan1
192.168.1.0     0.0.0.0         255.255.255.0   U     40     0        0 wifi

This is easy and simple setup. It was working for years. Nota bene: when I’m using wifi or lan1 separately (both not ON at the same time), everything is perfectly fine.

But since some time (couple of months), it started to be a problem that after couple of minutes, after enabling wifi and lan1 connections in Network Manager I can see warning that my wired connection is limited or local only - it means there is no internet connectivity, and metric for lan1 default route changes to “lower priority”:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    40     0        0 wifi
0.0.0.0         192.168.1.254   0.0.0.0         UG    20020  0        0 lan1
10.0.0.0        192.168.1.70    255.0.0.0       UG    20     0        0 lan1
10.0.0.0        192.168.1.70    255.0.0.0       UG    40     0        0 wifi
192.168.1.0     0.0.0.0         255.255.255.0   U     20     0        0 lan1
192.168.1.0     0.0.0.0         255.255.255.0   U     40     0        0 wifi

and boom I’m using wifi :frowning:

gru 23 15:15:15 worker.localnet NetworkManager[962]: [1640268915.0899] manager: NetworkManager state is now CONNECTED_SITE
gru 23 15:15:15 worker.localnet NetworkManager[962]: [1640268915.0923] manager: NetworkManager state is now CONNECTED_LOCAL
gru 23 15:15:15 worker.localnet NetworkManager[962]: [1640268915.0928] manager: NetworkManager state is now CONNECTED_SITE
gru 23 15:15:15 worker.localnet NetworkManager[962]: [1640268915.0933] policy: set ‘:scream: Sebleczone Frelki xD’ (wifi) as default for IPv4 routing and DNS
gru 23 15:15:15 worker.localnet kded5[4103504]: plasma-nm: Network connectivity limited, scheduling notification
gru 23 15:15:15 worker.localnet systemd[1]: Starting Network Manager Script Dispatcher Service…
gru 23 15:15:15 worker.localnet dbus-daemon[960]: [system] Activating via systemd: service name=‘org.freedesktop.nm_dispatcher’ unit=‘dbus-org.freedesktop.nm-dispatcher.service’ requested by ‘:1.6’ (uid=0 pid=962 comm="/usr/bin/NetworkManager --no-daemon ")
gru 23 15:15:15 worker.localnet dbus-daemon[960]: [system] Successfully activated service ‘org.freedesktop.nm_dispatcher’
gru 23 15:15:15 worker.localnet systemd[1]: Started Network Manager Script Dispatcher Service.
gru 23 15:15:25 worker.localnet systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.

lan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255
ether 54:e1:ad:3a:8c:ad txqueuelen 2000 (Ethernet)
RX packets 23481082 bytes 27655080488 (25.7 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16167860 bytes 9945333222 (9.2 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wifi: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255
ether 34:f6:4b:0b:b2:ec txqueuelen 2000 (Ethernet)
RX packets 59727 bytes 56292842 (53.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17056 bytes 4200689 (4.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

This really drives me crazy. How Network Manager decides that lan1 connection in somewhat limited? Is there any internet “connectivity” check
or something? How to fix this test?

I would be very grateful for any idea.

yes. in case of arch linux (or manjaro), networkmanager establishes a connection to http://www.archlinux.org/check_network_status.txt every 300 seconds. this is the default time interval. you can override this setting by creating a new config file.

sudo vim /etc/NetworkManager/conf.d/20-connectivity.conf

add

[connectivity] 
.set.enabled=false

restart the NetworkManager service

sudo systemctl restart NetworkManager

Wow this is nice. ishaanbhimwal thank you! We have a workaround. But I wonder why this testing is failing for my setup :
I mean I can’t see the reason…



[worker ~]# route -n ; curl http://ping.manjaro.org/check_network_status.txt
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    20     0        0 lan1
10.0.0.0        192.168.1.70    255.0.0.0       UG    20     0        0 lan1
192.168.1.0     0.0.0.0         255.255.255.0   U     20     0        0 lan1
NetworkManager is online

[worker ~]# route -n ; curl http://ping.manjaro.org/check_network_status.txt
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    20     0        0 lan1
0.0.0.0         192.168.1.254   0.0.0.0         UG    40     0        0 wifi
10.0.0.0        192.168.1.70    255.0.0.0       UG    20     0        0 lan1
10.0.0.0        192.168.1.70    255.0.0.0       UG    40     0        0 wifi
192.168.1.0     0.0.0.0         255.255.255.0   U     20     0        0 lan1
192.168.1.0     0.0.0.0         255.255.255.0   U     40     0        0 wifi
NetworkManager is online

[worker ~]# route -n ; curl http://ping.manjaro.org/check_network_status.txt
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    40     0        0 wifi
0.0.0.0         192.168.1.254   0.0.0.0         UG    20020  0        0 lan1
10.0.0.0        192.168.1.70    255.0.0.0       UG    20     0        0 lan1
10.0.0.0        192.168.1.70    255.0.0.0       UG    40     0        0 wifi
192.168.1.0     0.0.0.0         255.255.255.0   U     20     0        0 lan1
192.168.1.0     0.0.0.0         255.255.255.0   U     40     0        0 wifi
NetworkManager is online

I don´t know if this is good :thinking: