When you use nmcli to add routes via commands like nmcli con mod +ipv4.routes, the routes are added to the network connection profile and are generally persistent across reboots. These routes are stored in NetworkManager’s configuration files, so they should be re-applied each time the network connection is brought up.
However, there are a few things to keep in mind:
- Connection Profile: The routes you add with
nmcliare tied to a specific connection profile. If the connection profile is modified or deleted, the routes associated with it might be affected. - Configuration Files: NetworkManager saves its configuration in files located in
/etc/NetworkManager/system-connections/. You can check these files to ensure your routes are listed there. - System Changes: If you make changes to your network setup or NetworkManager configuration files directly, it might impact how routes are handled.
- Manual Network Changes: If you manually modify network settings or use other network management tools, this could potentially override or conflict with the settings you applied through
nmcli.
In summary, routes added with nmcli should persist through reboots as long as the connection profile they are associated with remains unchanged and NetworkManager is properly managing the connection.