This article provides information about the possibility of having two learned default routes with the same metric on the routing table.
If the firewall receives two default routes from two different peers with the same metric, then by default, only one of them will be reflected in the routing table. In case of OSPF, both of the routes can be seen in the OSPF database, but only one of them will be reflected in the routing table; which is based on the following parameters:
- Sequence number
- Checksum value
- Age
However, there might be scenarios in which both of the routes need to be available in the routing table and load balancing should be made between these routes.
Set the value of maximum ECMP routes to 2 if both routes need to be visible in the routing table and the traffic needs to be load balanced between both of them. To do so, use the following command:
set vr <vr_name> max-ecmp-routes 2
After the above command is set, both of the routes in the routing table can be seen.
Example:
IPv4 Dest-Routes for <trust-vr> (10 entries)
---------------------------------------------------
ID IP-Prefix Interface Gateway P Pref Mtr Vsys
---------------------------------------------------
* 9 2.2.2.2/32 eth0/1 0.0.0.0 H 0 0 Root
* 18 0.0.0.0/0 eth0/1 2.2.2.3 E1 60 2 Root
* 19 0.0.0.0/0 bgroup0 5.5.5.5 E1 60 2 Root
* 11 5.5.5.2/32 bgroup0 0.0.0.0 H 0 0 Root
4 192.168.2.1/32 wireless0/0 0.0.0.0 H 0 0 Root
* 1 172.27.201.0/24 eth0/0 0.0.0.0 C 0 0 Root
3 192.168.2.0/24 wireless0/0 0.0.0.0 C 0 0 Root
Note: The above configuration is applicable to other routing protocols, such as BGP and RIP.