Configure OSPF Routing Policy
All routing protocols store the routes that they learn in the routing table. The routing table uses this collected route information to determine the active routes to destinations. The routing table then installs the active routes into its forwarding table and also exports them back into the routing protocols. It is these exported routes that the protocols advertise.
For each protocol, you control which routes the protocol stores in the routing table and which routes the routing table exports into the protocol by defining a routing policy for that protocol. For information about defining routing policy, see the JUNOS Internet Software Configuration Guide: Policy Framework.
By default, if a router has multiple OSPF areas, learned routes from other areas are automatically installed into area 0 of the routing table.
You can apply routing policies that affect how the routing table exports routes into OSPF. To do this, include the
exportstatement at the[edit protocols (ospf | ospf3)]hierarchy level:[edit protocols (ospf | ospf3)]export [policy-names];
For OSPF , you should not apply routing policies that affect how routes are imported into the routing table; doing so with a link-state protocol could result in an inconsistent topology database.