Configuring OSPF Route Import and Export
Procedure
There are two steps for configuring OSPF import and export:
- Configure the routing policy to detail the routing filter conditions and actions;
- Use OSPF import a policy to filter OSPF routes added into RIB, or OSPF exporting a policy to filter routes advertised from RIB or introduce routes learned by other protocols into OSPF routing table.
The detailed CLI command are as follows:
Step 1 Configure the routing policy to detail the routing filter conditions and corresponding
set policy policy-statement <policy-name> term <term-name> from <filter-conditions>
set policy policy-statement <policy-name> term <term-name> to <filter-conditions>
set policy policy-statement <policy-name> term <term-name> then accept
set policy policy-statement <policy-name> term <term-name> then reject
set policy policy-statement <policy-name> term <term-name> then <actions>
Step 2 Use OSPF import or OSPF export a routing policy.
set protocols ospf4 [vrf <vrf-name>] import <policy-name>
set protocols ospf4 [vrf <vrf-name>] export <policy-name>
Copyright © 2025 Pica8 Inc. All Rights Reserved.