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

The set protocols ospf4 import command configures OSPF import a routing policy, which is used to filter and modify the OSPF route received from neighbors before adding to the routing table in RIB.


Command Syntax

set protocols ospf4 [vrf <vrf-name>]  import <policy-name>


Parameters

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, import the route from the default VRF.

import <policy-name>

Specifies the policy name. The value is a string.


Usage Guidelines

When the OSPF import a routing policy is configured, filters act upon routes as soon as they are received from a routing protocol. Import filter processing is already launched before the protocol even makes a decision on the route.

Note that import filters may therefore affect the routing decision process (e.g. by changing the metric).  

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.


Example

  • Configure OSPF filter to add the route (to the network 88.88.88.0/24) to RIB.
admin@Xorplus# set policy policy-statement im1 term 1 from network4 88.88.88.0/24
admin@Xorplus# set policy policy-statement im1 term 1 then accept
admin@Xorplus# set policy policy-statement im1 then reject
admin@Xorplus# set protocols ospf4 import im1
admin@Xorplus# commit
  • No labels