cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5075
Views
0
Helpful
4
Replies

filtering routes to ospf neighbor

tdanetsco
Level 1
Level 1

Hi guys,

I want to filter few routes to be announced to only one neighbor in an OSPF area with 40 routers, is it possible to avoid affecting the other neighbors.

BR,

Mustapha.

4 Replies 4

francisco_1
Level 7
Level 7

as far as i know i dont think you can filter routes within an area since all routers within the same area should have the same LSDB used when building SPF. But you can filter inbound routes from another area if that's what you want using policy map. you can define a route map to prevent OSPF routes from being added to the routing table.

see this http://www.cisco.com/en/US/docs/ios/12_0s/feature/guide/routmap.html#wp1040908

Francisco.

You can't filter LSAs (route-advertisements) within a Link State protocol. Other than running a separate AS as suggested above, the only other solution is to apply a distribute-list inbound on every router you don't want to receive a particular route. The LSA is still in the LSDB, and is still flooded to all neighbors, but is not installed into the routing table.

Hello Francisco and Mustapha,

the better command for inter-area filtering is:

area x filter-list prefix-list in|out

see

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_osp1.html#wp1011184

the constraints are:

no external routes can be filtered only internal O and O IA routes.

So for example avoid to use redistribute connected use network area command + passive-interface on all routers to avoid to inject external routes in the OSPF domain.

if the router that has to receive a subset of OSPF routes can be placed in a stub area all the external routes are filtered for the nature of the Area and the previous constraint is removed.

A NSSA area could be used also if the second router has to inject external routes in the OSPF domain.

So the router should be placed in another area.

However, if the router is only one and no other nodes are behind it, a

distribute-list in

can be used on that router : it is an approximate solution the LSAs are not filtered just the corresponding subnets are not installed in the routing table but it is the easier change.

Hope to help

Giuseppe

tcordier
Level 1
Level 1

I agree with the two earlier posts. Options available to you are using a) either a different OSPF process between the two peers in question, and red-distribute between processes (if needed), or b) another IGP altogether and redistribute if needed. The latter option is in my view preferable as you have an easier way of recognizing routes when troubleshooting.

HTH, Thomas

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco