To add a new static route, use the following command:
Admin@nodename# set network virtual-router <virtual-router-name> routes new
Specify the parameters:
Parameter |
Description |
---|---|
enabled |
Enable/disable usage of a static route:
|
name |
Route name. |
description |
Route description. |
type |
Route type:
|
destination-ip |
IP address of the destination subnet, format: <ip/mask>. |
gateway |
IP address of the gateway through which the specified subnet will be reachable. The IP address must be reachable from the UserGate server. |
interface |
Interface through which the route is added. |
metric |
Route metric. The lower the metric, the higher the priority of the route (if there is more than one route to a network). |
Example of adding a static route:
Admin@nodename# set network virtual-router test_router routes new name "Test static route" description "Test static route description" destination-ip 192.168.200.0/24 gateway 192.168.100.100 interface port3 type unicast metric 1 enabled on Admin@nodename# Admin@nodename# show network virtual-router test_router name : test_router description : Test virtual router node-name : node_1 interfaces : port2; port3 routes : Test static route name : Test static route enabled : on description : Test static route description destination-ip : 192.168.200.0/24 gateway : 192.168.100.100 interface : port3 metric : 1 ...
To change the parameters of an existing static route, use the following command:
Admin@nodename# set network virtual-router <virtual-router-name> routes <static-route-name>
The parameters available to change are listed in the table above.
Example of editing a static route:
Admin@nodename# set network virtual-router test_router routes "Test static route" metric 10 Admin@nodename# show network virtual-router test_router name : test_router description : Test virtual router node-name : node_1 interfaces : port2; port3 routes : Test static route name : Test static route enabled : on description : Test static route description destination-ip : 192.168.200.0/24 gateway : 192.168.100.100 interface : port3 metric : 10 ...
To delete a static route, use the following command:
Admin@nodename# delete network virtual-router <virtual-router-name> routes <static-route-name>
Example of deleting a static route:
Admin@nodename# delete network virtual-router test_router routes "Test static route" Admin@nodename# show network virtual-router test_router name : test_router description : Test virtual router node-name : node_1 interfaces : port2; port3 routes : [] ...
To display static routes, use the following command:
Admin@nodename# show network virtual-router <virtual-router-name> routes