In this sample configuration, the plan is to configure two static routes for the destination subnet 192.168.3.0/24 with different next hop IP addresses and different priorities.
The following is a Clish command example where the priority 1 static route for 192.168.3.0/24 is set to nexthop 192.168.1.100 and the priority 2 static route for 192.168.3.0/24 is set to nexthop 192.168.2.100:set static-route 192.168.3.0/24 nexthop gateway address 192.168.1.100 priority 1 on
set static-route 192.168.3.0/24 nexthop gateway address 192.168.2.100 priority 4 on
set static-route 192.168.3.0/24 ping on
save config
Note that configuring the 'ping on' option will enable ping to send periodic ICMP packets to the nexthop Security Gateway IP address. This action makes sure that the connection is alive. If no reply is received, the route is deleted from the routing table.
In this case, when the Security Gateway succeeds pinging to 192.168.1.100, only the route for 192.168.3.0/24 with nexthop 192.168.1.100 is added to the routing table.
When the Security Gateway fails pinging to 192.168.1.100, the route for 192.168.3.0/24 with nexthop 192.168.1.100 is removed from the routing table and the route for 192.168.3.0/24 with nexthop 192.168.2.100 is added to the routing table.
When the Security Gateway succeeds pinging to 192.168.1.100 again, the route for 192.168.3.0/24 with nexthop 192.168.2.100 is removed from the routing table and the route for 192.168.3.0/24 with nexthop 192.168.1.100 is added back to the routing table.
This solution has been verified for the specific scenario, described by the combination of Product, Version and Symptoms. It may not work in other scenarios.