set protocols ospf4 export
The set protocols ospf4 export command configures the filter rules when advertising routes from the RIB to OSPF.
Command Syntax
set protocols ospf4 [vrf <vrf-name>] export <policy-name>
Parameter
Parameter | Description |
vrf <vrf-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. |
export <policy-name> | Specifies the policy name. The value is a string. |
Usage Guidelines
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>
Example
• Configure OSPF export a routing policy to implement the introduction of static route into OSPF route.
admin@XorPlus# set protocols static route 192.168.6.0/24 next-hop 172.25.150.245 admin@XorPlus# commit admin@XorPlus# set policy policy-statement static term 1 from protocol static admin@XorPlus# set policy policy-statement static then accept admin@XorPlus# commit admin@XorPlus# set protocols ospf4 export static admin@XorPlus# commit
Copyright © 2025 Pica8 Inc. All Rights Reserved.