Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Filtering · OSPFv2

Direct 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.

When to use this

Use it to hide networks between areas, or to keep a route off one router.

First 30 seconds

1. Which method is used: filter-list on the ABR, or distribute-list on a router?

2. Filter-list: show ip ospf database summary <prefix> in the target area — gone?

3. Distribute-list: LSA still there, route missing only on this router — expected.

4. Wrong prefixes filtered → show ip prefix-list <name>: sequence and lengths (ge/le).

5. Black hole → replace the distribute-list with border filtering.

Operational verification

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

Evidence · next step

Inspect OSPF distribute-list/prefix policy and competing RIB routes for the exact prefix.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE
Key commandip prefix-list <name> permit|deny <prefix>
Scope / prerequisiteUse it to hide networks between areas, or to keep a route off one router.
Reference · 4
What next?3 suggested next steps
Catalog command links4
Evidence1
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

7 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 First 30 seconds Verify boundary

Immediate answer: Locate the exact filtering boundary and show whether the target prefix exists before and after that boundary.

Verification chain: source prefix/LSA → filtering attachment/direction → LSDB/RIB boundary → downstream advertisement → destination RIB/FIB

Stop condition: A missing route after a filter does not show the filter caused it unless the prefix is shown immediately before the filter boundary.

Step 2 Operational verification and known-good state Verify boundary
show ip prefix-list detail BLOCK-LAB
show ip ospf database summary 10.99.0.0
show ip route 10.99.0.0
show running-config | section router ospf

The prefix-list view shows each entry with a hit count, which tells you whether the filter is matching what you intended. The database lookup shows whether the Summary LSA exists in a given area. The route lookup shows whether the route is installed locally. The configuration shows which mechanism is in use and in which direction.

Known-good: the prefix is absent exactly where intended — from an area's database for an ABR filter, from one router's table for a distribute list — and present everywhere else.

Step 3 Verification and output interpretation Verify boundary

Verify the policy object first (show ip prefix-list, show route-map where applicable), then inspect the relevant OSPF database and route table separately. If an LSA exists but the route is absent, that can be the expected result of a local RIB filter rather than evidence that filtering failed. At ABR/ASBR boundaries, compare database summaries or external LSAs on both sides of the policy boundary to show whether advertisement changed. Use route detail to identify the OSPF route type and metric before assuming the filter matched the intended object. After modifying policy, confirm both the intended absence and the continued presence of unrelated routes; a broad prefix-list error can remove more than the target prefix.

Step 4 Step-by-step troubleshooting Narrow the fault

Boundary rule: A missing route after a filter does not show the filter caused it unless the prefix is shown immediately before the filter boundary.

Step 5 Verification & troubleshooting Narrow the fault

1. Decide the intent: hide a route from a whole area (filter on the ABR) or from one router's table (distribute-list in).

2. Confirm the prefix exists just before the boundary — in the ABR's routing table or database.

3. show ip prefix-list detail <name> → the entries and their hit counts.

4. After an ABR filter: show ip ospf database summary <prefix> in the filtered area returns nothing.

5. After a distribute-list in: the LSA is still in show ip ospf database, the route is gone from show ip route.

Step 6 Failure signatures and troubleshooting branches Narrow the fault
  • All inter-area routes vanished after a filter list was applied. The prefix-list lacks a final permit.
  • The filter has no effect. It is on a router that is not an ABR, in the wrong direction, or under the wrong area.
  • The route is gone on one router, and traffic sent through that router is lost. A distribute-list in on a transit router.
  • An external route is not affected by the area filter list. Filter lists act on Summary LSAs; filter external routes where they are redistributed.
  • distribute-list out does nothing to internal routes. It only applies to redistributed ones.
Step 7 When the problem is really fixed Narrow the fault
  • The prefix is missing where the design says it should be, and nowhere else.
  • Prefix-list hit counters show the intended entries matching.
  • No router forwards traffic for a filtered prefix toward a router that has no route for it.
  • The mechanism and its direction are documented.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

state · 1
Command lookup Jump straight to Cisco syntax
Key points

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.

Key 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.
ReferenceWhat it is1 section · depth on demand

What it is

OSPF filtering limits which routes are advertised between areas or installed in a router's routing table. Because all routers in an area must share the same database, it works only at particular points: on the ABR between areas, on the redistributing router, or locally between the database and the routing table.

ReferenceWhy it matters1 section · depth on demand

Why it matters

The question to ask of any OSPF filter is what it actually removes — the LSA, or only the local route. A distribute-list in takes the route out of this router's table, but the LSA stays in the database and is flooded on; routers further along still have the route and may send traffic to this router, which then has nowhere to send it. A filter on the ABR removes the information for the whole area. Choosing the wrong mechanism is the classic OSPF filtering mistake.

ReferenceImportant terms & boundaries7 sections · depth on demand

Key points

  • area <id> filter-list prefix <name> in|out on an ABR filters Summary LSAs going into (in) or coming out of (out) the named area.
  • area <id> range … not-advertise suppresses a whole block at the ABR.
  • distribute-list prefix <name> in under router ospf affects only the local routing table; the database is untouched.
  • distribute-list … out applies only to routes being redistributed into OSPF.
  • A route-map on redistribute decides which external routes enter OSPF at all.
  • Stub and totally stubby areas are built-in filters for external and inter-area LSAs.
  • Routes cannot be filtered between routers inside one area.
  • A prefix-list ends with an implicit deny: finish with permit 0.0.0.0/0 le 32 when the rest should pass.

In depth

Filtering OSPF routes: what can and can't be filtered

Inside an area, every router must have the same LSDB, so OSPF can't filter LSAs there without breaking the protocol. Filtering is possible where LSAs are generated or transformed: on ABRs, on ASBRs, and on the local routing table.

ToolWhereEffect
area <id> range … not-advertiseABRSuppresses type 3 summary LSAs for the range (documented in the Catalyst 9000 guide)
area <id> stub / nssaAll routers in the areaKeeps type 5 external LSAs out (the guide states they aren't sent into stub areas)
area <id> stub no-summary (totally stubby)ABRAlso replaces inter-area routes with a default
Route map on redistributeASBRControls which external routes enter OSPF
distribute-list … inAny routerKeeps routes out of the local routing table; the LSAs remain in the LSDB
area <id> filter-list prefix … in|outABRFilters type 3 LSAs between areas
ip ospf database-filter all outInterfaceStops sending LSAs on that interface (documented in the guide)
ABR1(config)# ip prefix-list NO-LAB seq 5 deny 10.30.200.0/24
ABR1(config)# ip prefix-list NO-LAB seq 10 permit 0.0.0.0/0 le 32
ABR1(config)# router ospf 1
ABR1(config-router)# area 30 filter-list prefix NO-LAB out
ABR1(config-router)# area 40 stub no-summary
R7(config)# router ospf 1
R7(config-router)# distribute-list prefix NO-LAB in
R7# show ip ospf database summary 10.30.200.0
R7# show ip route 10.30.200.0
% Subnet not in table

distribute-list in is local only

The router still has the LSA and still floods it to neighbours. Only its own routing table changes. Different routers in the same area can then route differently, which can cause black holes if a filtering router is in the path for others.

Recommendation

GoalPreferred tool
Hide an area's subnets from the restABR range not-advertise or filter-list
Keep external routes out of an areaStub or NSSA
Control redistributionRoute maps on the ASBR
Per-router exceptionsdistribute-list in, with care

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Filtering boundary matters

An ABR area filter-list can control inter-area prefix advertisement. A local inbound OSPF distribute-list can prevent routes from entering the local RIB while the LSA remains in the LSDB. This distinction is crucial: LSDB present + RIB absent can be a policy result, not an adjacency failure.

Quick reference

OSPF filtering is limited because routers in an area must have identical LSDBs. You can filter Type 3 summaries at an ABR with area filter-list or area range not-advertise, filter what a router installs in its own RIB with distribute-list in, and filter redistributed routes at the ASBR.

MethodWhereEffect
area X filter-list prefix ... in/outABRBlocks Type 3 LSAs
distribute-list inAny routerNot installed locally; LSAs still flooded
Route map on redistributeASBRControls external routes

distribute-list in can create black holes if neighbors still route through this router expecting it to have the route.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Mechanics and state ownership

The two main mechanisms act at different moments. The ABR filter list is applied when the ABR creates Summary LSAs. The direction is relative to the area named in the command: in filters what is advertised into that area, out filters what that area's prefixes look like to all other areas. What is filtered is never created, so no router in the receiving area hears of it.

The distribute list is applied after SPF, when the router is about to install its results. The calculation has already been done on a complete database; the list only stops certain results from entering the routing table. Nothing changes for any other router.

That is the source of the black hole. Suppose router B filters a prefix with distribute-list in, and router A reaches that prefix through B. A's database is unchanged, so A still calculates the path through B and forwards the traffic. B has no route for it and drops the packets. Inside an area a distribute list is therefore safe only on a router that nobody uses as transit for the prefix.

State model and protocol mechanics

OSPF is a link-state protocol, so filtering is not equivalent to simply preventing every unwanted prefix from being known. Routers inside an area are expected to maintain a consistent view of that area’s topology; many local distribute-list style controls therefore influence route installation rather than removing the originating LSA from the LSDB. Area filtering and summarization operate at ABR boundaries on inter-area information, while redistribution route-maps/prefix controls act as external routes are injected. The same prefix can consequently be visible in the LSDB but absent from the RIB on one router, or be summarized/filtered between areas while intra-area topology remains unchanged. Effective policy analysis requires naming the boundary: advertisement/injection, area transition, SPF candidate, or local RIB installation.

Limits and common misconceptions

A prefix absent from the RIB does not show it is absent from the OSPF LSDB, and a prefix present in the LSDB does not show the local router will install it. Packet ACLs are not OSPF route filters; they control data/control traffic, not route-policy semantics. Filtering inside a link-state area has architectural constraints because arbitrary per-router topology suppression would undermine the common SPF view. A permit or deny result also depends on where the prefix-list/route-map is attached, so reading the policy object without its attachment point is incomplete. Always interpret OSPF filtering as policy-boundary evidence rather than a generic “hide route” function.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

Design OSPF filtering around an explicit policy objective rather than around the nearest available command. If the goal is to stop external routes from entering OSPF, control redistribution at the ASBR. If the goal is to limit inter-area prefixes, apply supported ABR area-prefix policy in the correct direction. If the goal is only to prevent selected OSPF routes from entering one router’s RIB, use a local route-installation filter and understand that the LSDB may still contain the information. Use prefix-lists and route-maps with clear sequence/permit/deny logic and account for their implicit deny behavior. Document whether the policy acts inbound/outbound relative to the process/area boundary because the word “in” can refer to local route processing rather than packet forwarding.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 2328

Authoritative/upstream documentation reviewed for bounded claims in Routing → OSPF → OSPFv2 → Filtering. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%
Embedded reference data

Quick lookup tables

Filtering · operational reference

Compact state and interpretation boundaries for fast lookup.

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

Filtering operational reference

Topic-specific bounded interpretation: known-good protocol state, suspicious signatures and the next technical proof boundary.

BoundaryKnown-good for FilteringSuspicious signatureNext proof
IntentMatches OSPFv2 route-information filtering at ABR, redistribution and local RIB boundaries while preserving the distinction between LSDB flooding, route calculation and route installation designPolicy, area, family or metric input differsCompare effective configuration
Protocol stateStable expected adjacency/database/topology decisiona prefix absent from the RIB but still present in the LSDB, an ABR filter applied in the opposite direction from intended, a prefix-list sequence matching more or less space than expected, external redistribution policy being confused with inter-area filtering, or a local install filter being blamed for remote advertisement behaviorInspect peer/LSDB/topology detail
Route/forwardingExpected RIB/FIB next hop or multipath setProtocol state exists but route/path disagreesRIB/FIB/CEF and next-hop proof
ClosureOriginal test passes for explained reasonSymptom moved, was bypassed or state was forcedRegression test
Confirmation

Confirm action

Continue?