Is Network Manager able to check if a default gateway can route packages to the internet?
I have two interfaces, both provide a route to the internet.
When I unplug a cable from any of them, default gateway is being updated and my internet connection works. But if the current preferred gateway fails without breaking a physical link, system does not fail over to second one.
I've tried to set a higher metric to a failing GW manually, it worked, but it is a manual step which I want to avoid.
Can this problem be solved using Network Manager?
My setup: Ubuntu 16.04, NM 1.2.2
UPD
Community member on NM's irc channel answered that NM does not check if a gateway actually works and does not perform any GW switching.
VRRP/ucarp/heartbeat/keepalived do not check it either. They only check a network availability, and switch the upstream GWs behind a virtual interface. This does not help in my case.
Iproute's nexthop kinda works, but with an enormous latency.
Routes are being cached by kernel and even after ip route flush cache
it took about 10 minutes for system to fail over to second GW.
ip route replace default scope global \
nexthop via 11.22.33.1 dev eth0 weight 1 \
nexthop via 55.66.77.1 dev eth1 weight 1
My current solution: a shell script which checks if current default gw provides internet access; if not - it increases a metric of current GW and system fail over to second one with a lower metric.
I'm still hoping to find a more elegant solution.