Pcornel
Networking · Routing › OSPF › OSPFv2

Filtering

Cheat sheet · https://pcornel.dk/topic.php?topic=635

Back to the Topic

Answer

OSPF can filter in two ways. area <id> filter-list prefix on an ABR stops type 3 LSAs entering or leaving an area, so other routers never learn the route. distribute-list ... in only keeps a route out of one router's routing table; the LSA still spreads.

Remember

Within an area every router must have the same database, so true filtering is only possible at area borders. A distribute-list can create a black hole: neighbours still learn the route through this router. Check the prefix-list with show ip prefix-list.

First checks

  • show ip prefix-list <name> — entries and hit counts.
  • show ip ospf database summary <prefix> — whether the type 3 LSA exists in the area.
  • show ip route <prefix> — whether the route is installed.
  • show running-config | section router ospf — filter-lists and distribute-lists.

Commands

ip prefix-list <name> permit|deny <prefix>
Add a permit or deny entry for a prefix (with optional ge/le) to a prefix list.
area <area> filter-list prefix <name> in
Filter type-3 summary LSAs entering an OSPF area on an ABR using a prefix list.
area <area> filter-list prefix <name> out
Filter type-3 summary LSAs leaving an OSPF area on an ABR using a prefix list.
distribute-list prefix <name> in
Filter routes installed from a routing protocol using a prefix list.
show ip prefix-list detail <name>
show ip ospf database summary <prefix>
show ip ospf database
show ip route
ip ospf database-filter all out
show ip prefix-list
show route-map

Verify in this order

filter at the right place (ABR for type 3) → prefix-list matches the intended prefixes → LSA blocked or route withheld → no router left pointing at a filtered path

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

Filtering · operational reference

Filtering boundaryTypical effect
Redistribution/ASBRControls external route injection
ABR/area policyControls inter-area summary/prefix propagation
Local distribute filterCan suppress RIB installation while LSA remains
Packet ACLTraffic filtering, not route advertisement policy

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=635

Confirmation

Confirm action

Continue?