OSPF filtering

 | 28 Jul 2006 17:39

In OSPF you can’t filter routes. This is only true inside an area, due to OSPF being a Link State protocol. LSA’s are flooded throughout the area and the protocol is based upon everyone in the area having the exact same database. There are no such things as communities like in BGP to aid in something of a route installment selection process.

What is available is filtering on an ABR or ASBR. ABR filtering is somewhat less known but here’s how it works on Cisco:

Let’s create a range (OSPF summary) and filter the summarised routes so that only the range is advertised to the other areas.

Router_A(config-router)#do srr
router ospf 1
# Filtering the range’s subnets (type 3 LSA filter) when they enter area 0
area 0 filter-list prefix PFL-10.10.10.0/8-subnets in
# The range to create the summary:
area 1 range 10.0.0.0 255.0.0.0

Router_B#srr
router ospf 1
# Filtering the range’s subnets (type 3 LSA filter)
area 0 filter-list prefix PFL-subnets in

# On both:
ip prefix-list PFL-subnets description *** Filter subnets out of the 10.0.0.0/8 range ***
ip prefix-list PFL-subnets seq 5 deny 10.0.0.0/8 ge 9
ip prefix-list PFL-subnets seq 10 permit 0.0.0.0/0 le 32

No Responses to “OSPF filtering”