Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

OSPF supports route import and export policies, controlling routing information that is added in the routing table with an import routing policy and advertised from the routing table with an export routing policy.

OSPF route import and export can be applied in the following scenarios:

  • Introducing Route

The OSPF export operation introduces routes learned by other routing protocols from the RIB into OSPF routing table. Meanwhile, you can also configure the routing policy to introduce certain routes that only meet the filter conditions.

  • Filtering Route

OSPF export can be configured to filter routing information advertised from the routing table in RIB to neighbors; OSPF import can be used to filter routing information received from the neighbors by configuring filter rules before adding to the routing table in RIB.

  • Modifying Route

OSPF can configure route import or export a routing policy in which route parameters can be modified when meet the filter conditions, so as to change the properties and priority of the received route or the route to be advertised.

Definition

Figure 1. Definition of OSPF route import and export

When we refer to OSPF import and export, it is from the point of view of the routing table in RIB. This means importing route from OSPF protocol into RIB using a routing policy, and advertising route from RIB to OSPF protocol by exporting a routing policy.

The OSPF import operation is defined as filtering and modifying the OSPF route received from the neighbors by configuring the routing policy before adding to the routing table in RIB.

OSPF export consists of two types of applications:

  1. The OSPF route advertised to neighbors is filtered and modified by configuring routing policy.
  2. 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>

You can also refer to 1.4 Example for Configuring OSPF Introducing Route by Using Export to see the configuration example.

NOTE:

  • When configuring filter rule of the routing policy to be applied in OSPF import, only filter attributes supported by OSPF can be set. Other filter attributes that are not supported by OSPF, such as BGP specific routing attribute AS Path, should not be configured in this policy, or it will cause commit fail when configuring this OSPF import policy.

For example,

admin@Xorplus# set policy policy-statement p5 term 1 from as-path 100
admin@Xorplus# set policy policy-statement p5 then reject
admin@Xorplus# set protocols ospf4 import p5
admin@Xorplus# commit
Unknown variable aspath for protocol ospf4
Commit failed.
  • The policy for OSPF import does not support configuring the protocol attribute in filtering rules.

When VRF is Implemented

Figure 2. Definition of OSPF route import and export with VRF

Currently, only OSPF route import and export support VRF, while route import and export of other routing protocols such as RIP and BGP do not support VRF.

Figure 2 depicts how OSPF import and export support VRF. Each routing protocol has a separate routing table which is isolated by different VRFs (Note that, currently, only OSPF and static routing support VRF). Besides, the system has a whole routing table in RIB including the route entries of all the routing protocols which are divided by VRF.

NOTE:

OSPF import and export operations can only be performed on routes within the same VRF in the OSPF routing table and the RIB. Routes between different VRFs are not supported for route import and export.

  • No labels