Reset Search
 

 

Article

How to specifically redistribute external routes as Type-1 or Type-2 in OSPF?

« Go Back

Information

 
TitleHow to specifically redistribute external routes as Type-1 or Type-2 in OSPF?
Objective
To redistribute non-OSPF routes as Type-1 or Type-2 in OSPF
Environment
  • Summit and Blackdiamond Series
  • EXOS All
Procedure
Option 1: If you need to redistribute non-OSPF routes into OSPF as Type-1 or 2 (as indicated by the "o1" or "o2" flag in the "show ip route" output), type in the following command-
  • enable ospf export <routing protocol> cost <cost> type ase-type-1 (or) ase-type-2
Option 2: If you want to redistribute specific routes into OSPF as type-2, you can call forth a policy file.
Note: If you do not mention the cost-type in the action modifier, it will default to a type-1 route.
Step 1: Create the policy file
vi ospfexport.pol
entry one {
if match all {
nlri 10.0.0.0/8; <-- Specific routes to be redistributed
nlri 20.0.0.0/8;
} then {
cost-type ase-type-2;
}
}


Step 2: Call for the policy file in the ospf export command
enable ospf export <routing protocol> ospfexport
Additional notes
The explanations for Type-1 and Type-2 redistributed routes can be found in the following article -
What's the meaning for ase-type-1 and ase-type-2 when exporting OSPF routes?

Only any one command can be used at at time for a routing protocol. For example if you want to redistribute static routes into OSPF, you can either use the global command "enable ospf export static cost <cost> type ase-type-1 (or) -2" which will export all available static routes into OSPF, or you can call for the policy file using the "enable ospf export static <policy name>" command for redistributing specific routes.

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255