Configuring a Static Route Using the Command Line in Interactive Mode
You can use the nmcli
command in interactive mode to configure network settings, including configuring static routes. When in interactive mode, the nmcli>
prompt appears where you can run commands to configure static routes for a specific connection profile.
This procedure assumes the following network settings for creating the static route:
- Name of the connection:
myconnection
- Default gateway address: 198.51.100.1
- Network to which you want to create a static route: 192.0.2.0/24
To create the route, ensure first that the default gateway for the route is directly reachable on the interface. Then, do the following: