For some reasons, I have qubes behind a VPN in which I add a route to my local network, it works perfectly fine except when I suspend my laptop. Upon resume, the extra routes are lost.
What happens in Qubes at the resume step so that the routes are lost? It’s like if Qubes OS was resetting the network.
How could I make the routes persistent across suspend/resume?
it happens on wireless or ethernet, the route are within AppVM qubes anyway, not in sys-net (which already knows how to reach the local network of course)
Do the routes get lost if you manually disconnect and reconnect from the network? I’ve noticed that in my Guix qube, which manually sets up the network with a script that is function similar to ip addr add, etc, some pieces of information get lost (including the default route) if I accidentally unplug my ethernet cable.
The suspend/resume troubleshooting page discusses that drivers sometimes need to be reloaded and/or devices need to be re-attached. So perhaps the devices are getting detached and re-attached, and sys-net is automatically recovering, but there is a brief moment where the network is unavailable which causes the AppVM to discard the routing information for reasons that are mysterious to me.
I think network-scripts package is the equivalent for ifupdown package in debian.
The NetworkManager-initscripts-updown is just using NetworkManager to call the legacy scripts in /etc/network/if* (or similar directory). Since you’re already using NetworkManager then there is no point to use the legacy scripts and it’s better to use the NetworkManager-dispatcher instead.