Rules For Multiple Default Gateways
- If the two routes have different Administrative Distance settings, the lowest one wins. Routes with higher Administrative Distance settings are not entered into the routing table and are not usable while interfaces with lower Administrative Distance settings are active.
- If the two routes have the same Administrative Distance setting, they go into the routing table in the order that their Priority settings would indicate.
- If the two routes have the same Priority settings, it is random as to which route gets put into the table first.
Route order in the table is important, as the firewall will use the first one in the table unless A) there's a better one or B) policy routing and/or ECMP rules dictate otherwise.
You can see the routing table order from the command line:
XXX-FW # get router info routing-table static
S* 0.0.0.0/0 [10/0] via xx.xxx.116.161, wan1
[10/0] via yyy.yyy.146.177, wan2, [10/0]
In this example, the WAN1 link will be selected unless there is a policy rule and/or ECMP reason to do otherwise.