Manage Static Routes via Command Line

Administrative users can also view the status and perform configuration of static routes via the command line interface.

After you create or modify a route via the command line, you should take note of the route id and confirm that it installed successfully in the routing table.

Description

Command

Display IPv4 installed routes

ip route

Display IPv6 installed routes

ip -6 route

Display all route information

ip route show table all

Show status of configured routes via ogcli

ogcli get monitor/static_routes/status

Get static route configuration via ogcli

ogcli get static_routes

Create static route via ogcli

ogcli create static_route << END
destination_address="1.1.1.1"
destination_netmask=32
gateway_address="1.1.1.1"
interface="net1"
metric=0
END

Update static route via ogcli

ogcli update static_route "1.1.1.1" << END
interface="net2"
metric=100
END

Delete static route via ogcli

ogcli delete static_route "1.1.1.1"