Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[ScreenOS] Is it possible to have multiple learned default routes with the same metric in the routing table?



Article ID: KB25620 KB Last Updated: 29 Mar 2021Version: 3.0

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.


IPv4 Dest-Routes for <trust-vr> (10 entries)
ID IP-Prefix Interface Gateway P Pref Mtr Vsys
* 9 eth0/1 H 0 0 Root
* 18 eth0/1 E1 60 2 Root
* 19 bgroup0 E1 60 2 Root

* 11 bgroup0 H 0 0 Root
4 wireless0/0 H 0 0 Root
* 1 eth0/0 C 0 0 Root
3 wireless0/0 C 0 0 Root
Note: The above configuration is applicable to other routing protocols, such as BGP and RIP.
Modification History:
2020-08-27: Minor, non-technical edits.
2020-03-29: Content reviewed for accuracy. Article is correct and complete.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search