Configure static routes
Configure static routes on the sensor using the text console. Static routes are stored in the system configuration and applied automatically at boot. The command applies only to the sensor where you run it and does not affect other sensors.
Show all configured static routes
| Product | Guardian |
| Syntax | n2os-netconf routes --show |
| Description | Shows all configured static routes, including the default gateway and any named static routes, with their type, destination, and gateway. |
| Parameters | None |
| Where | The text-console (access directly or through ) |
| To apply | Enter the command and press enter. |
Add a network static route
| Product | Guardian |
| Syntax | n2os-netconf routes --set --name NAME --net
NETWORK/CIDR --gateway IP |
| Description |
Adds or updates a static route for the specified destination network. The route is written to the system configuration and applied immediately to the running routing table. If a route with the same name already exists, the command shows the current and new values and prompts for confirmation before overwriting. |
| Parameters |
|
| Where | The text-console (access directly or through ). User must have root privileges. |
| To apply | Enter the command and press enter. If the route already exists, confirm the overwrite when prompted. |
Add a host static route
| Product | Guardian |
| Syntax | n2os-netconf routes --set --name NAME --host IP
--gateway IP |
| Description |
Adds or updates a static route to a single host address. The route is written to the system configuration and applied immediately to the running routing table. If a route with the same name already exists, the command shows the current and new values and prompts for confirmation before overwriting. |
| Parameters |
|
| Where | The text-console (access directly or through ). User must have root privileges. |
| To apply | Enter the command and press enter. If the route already exists, confirm the overwrite when prompted. |
Delete a static route
| Product | Guardian |
| Syntax | n2os-netconf routes --delete NAME |
| Description | Deletes a static route by its name. The route is removed from the system configuration and from the running routing table. The command shows the route details and prompts for confirmation before deleting. |
| Parameters | NAME: The name of the route to delete. For
example: myRoute |
| Where | The text-console (access directly or through ). User must have root privileges. |
| To apply | Enter the command and press enter. Confirm the deletion when prompted. |