Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

filtering routes to ospf neighbor

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

Re: filtering routes to ospf neighbor

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.

New Member

Re: filtering routes to ospf neighbor

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.

Hall of Fame Super Silver

Re: filtering routes to ospf neighbor

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

New Member

Re: filtering routes to ospf neighbor

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

1752
Views
0
Helpful
4
Replies
CreatePlease login to create content