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

On a Juniper firewall, how do I redistribute a default route learned from BGP into OSPF?



Article ID: KB11535 KB Last Updated: 11 Aug 2010Version: 3.0
On a Juniper firewall, how do I configure OSPF to redistribute a default route learned from BGP

Simplified Network Topology:
Router1 ----eBGP----Juniper firewall----OSPF----Router2

Router1is generating a default route and it gets advertised via eBGP to the Juniper firewall:
fwlab-> get route | inc
*        16         eth1/2  eB  250      0     Root

In order to allow the Juniper firewall to advertise that default route via OSPF to Router2, the following configuration command is needed:
fwlab-> set vr trust
fwlab(trust-vr)-> get conf
set vrouter "trust-vr"
unset auto-route-export
set protocol ospf
set enable
set advertise-def-route preserve-metric metric-type 1

fwlab(trust-vr)-> get proto ospf data | i
                        Router LSA(s) for area
                        Network LSA(s) for area     1075 0x80000001   0x2bf3

The command "set advertise-def-route preserve-metric metric-type <value>" allows the OSPF instance to generate the default route when BGP populates the routing table with a default route learned from BGP.
In this setup, if the default route is retracted by BGP for any reason, then the default route will correspondingly not be generated by the OSPF instance. 

NOTE:  A default route cannot be redistributed into the OSPF instance via route-maps.
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