cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3656
Views
3
Helpful
6
Replies

ospf route filtering

r.gasper
Level 1
Level 1

Hi All

 

I am trying to filter all routes apart from the default route out of an incoming OSPF update.  I have managed to make this work by using a distribute list inbound on the interface where the default route comes from, and I thought all was fine. 

However when I look at a downsteam OSPF router, all of the routes I blocked are still there. I think this is because the LSA still contains the routes, and the distribute list only works on the local router.

Is there any way I can filter so that only the default route is accepted into the router, and other routers downstream. I think I need to filter outbound on an interface if possible

Any ideas please? - its driving me mad

Cheers

Russ

1 Accepted Solution

Accepted Solutions

Akash Agrawal
Cisco Employee
Cisco Employee

Hi Russ,

 

In OSPF or any link state protocol, all routers in an area must have identical LSA database. So LSA filtering in outbound is not possible. Maximum what we can do is dont install few OSPF routes in to routing table, that we do through distribute-list in inbound direction. That is local to the router, but that router will also have all LSAs in OSPF database.

 

If you dont want to have full database and just need default route, then as advised by Mahdy you can put router in to stubby , totally stubby , NSSA areas as per your requirement.

 

--Pls dont forget to rate helpful posts--

Regards,

Akash

View solution in original post

6 Replies 6

mahdymohamed
Level 1
Level 1

Hi, 

I think you might try to make your Area as NSSA, and that will only allow the default route in, 

Also, tell what was the result after applying the filter on the outbound. 

Cheers,

Mahdy :) 

Hi

when I tried to filter on the outbound, I got a message saying that outbound filtering is not allowed with OSPF.

 

I need to keep to area 0 as I have area 0 running downstream

 

Cheers

Russell

davrojas
Level 3
Level 3

Hello Russ,

 

If you use a Route Map instead is there any difference?

 

Regards,

 

David.

Hi David

 

I don't think so. I can double check..

I think, you can have a try with below prefix-list 

ip prefix-list test permit 0.0.0.0/0

ip prefix-list test deny 0.0.0.0/0 le 32

Router OSPF number

 distribute-list prefix test in.


Kidnly let me know the status.

Akash Agrawal
Cisco Employee
Cisco Employee

Hi Russ,

 

In OSPF or any link state protocol, all routers in an area must have identical LSA database. So LSA filtering in outbound is not possible. Maximum what we can do is dont install few OSPF routes in to routing table, that we do through distribute-list in inbound direction. That is local to the router, but that router will also have all LSAs in OSPF database.

 

If you dont want to have full database and just need default route, then as advised by Mahdy you can put router in to stubby , totally stubby , NSSA areas as per your requirement.

 

--Pls dont forget to rate helpful posts--

Regards,

Akash

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card