add static-route

In the R81.10.X releases, this command is available starting from the R81.10.00 version.

Description

Adds a new manually configured routing rule.

Syntax

add static-route [ source <source> ] [ service <service> ] [ destination <destination> ] [ nexthop gateway { logical <logical> | ipv4-address <ipv4-address> } ] [ metric <metric> ] [ rank <rank> ]

Parameters

Parameter

Description

destination

IP address and subnet mask length of the destination of the packet in the format IP Address/Subnet.

For example: 192.168.0.0/16

Default: 0.0.0.0/0

Note - The value "0.0.0.0/0" is supported starting from the R81.10.05 version.

metric

Specifies the route metric (integer).

rank

Specifies the rank for a static route. Supported starting from R81.10.10.

  • Only allowed on destination-based routes.

  • Rank is per destination, which means that all routes with the same destination even though their next hop and metric are different.

  • Default = 60. To change the default route rank, go to the WebUI > Advanced Settings.

service

Specifies the service name.

source

IP address and subnet mask length of the source of the packet in the format IP Address/Subnet.

For example: 192.168.1.0/24

Example Command

add static-route source 172.15.47.0/24 service http destination 172.15.47.0/24 nexthop gateway logical My_Network metric 10

add static-route destination 0.0.0.0/0 nexthop gateway ipv4-address 172.28.4.4

add static-route destination 7.7.7.0/24 nexthop gateway ipv4-address 192.168.200.200 rank 40