Reset Search
 

 

Article

How to filter learned OSPF routes using OSPF distribute-list which filters on a route-map / ACL

« Go Back

Information

 
TitleHow to filter learned OSPF routes using OSPF distribute-list which filters on a route-map / ACL
Objective
How to filter learned OSPF routes using OSPF distribute-list  which filters on a route-map / ACL
Environment
  • S-Series
  • All Firmware
Procedure
     1.  Create ACL with the routes you no longer want to learn, followed by a "permit ip any any"
           IMPORTANT: If "permit ip any any" is NOT added to end of the ACL, all OSPF routes learned will be filtered and dropped once the distribute-list is applied
configure
   ip access-list extended OSPF-BLOCK-ACL
  deny ip host 192.168.0.2 0.0.0.0 any 
  deny ip host 192.168.0.3 0.0.0.0 any 
  deny ip 192.168.1.0 0.0.0.255 any
  permit ip any any
  exit
     2.  Create route-map which will be used to reference the access-list:
route-map filter OSPF-BLOCK-ROUTE-MAP permit 10
  match ip address OSPF-BLOCK-ACL
  exit
     3.  Add distribute-list pointing to route-map in the OSPF configuration:
router ospf 100
  distribute-list route-map OSPF-BLOCK-ROUTE-MAP in
  exit
Additional notes
Recommend upgrading to 8.63.05.0004 due to known issue where routes not learned after clearing ospf process:
                       Route-map to Filter OSPF Routes Prevents Routes From Being Learned after the OSPF Process is Cleared

Feedback

 

Was this article helpful?


   

Feedback

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

Characters Remaining: 255