The set protocols ospf4 export command configures the filter rules when advertising routes from the RIB to OSPF.
set protocols ospf4 [vrf <vrf-name>] export <policy-name>
Optional. Specifies a VRF name. The value is a string. It’s a user-defined VRF set by the command set ip vrf <vrf-name> [description <string>].
If no VRF is specified, export the route in default VRF.
Specifies the policy name. The value is a string.
OSPF export filters act upon routes just before they are to be advertised by OSPF routing protocol.
OSPF export consists of two types of applications:
- The OSPF route advertised to neighbors is filtered and modified by configuring routing policy.
- Introducing route learned from other routing protocols (could be BGP, RIP or static routing) from routing table into OSPF by configuring the routing policy with this command:
set policy policy-statement <policy-name> term <term-name> from protocol <bgp | connected | ospf4 | ospf6 | rip | static>
• Configure OSPF export a routing policy to implement the introduction of static route into OSPF route.