Use it to hide networks between areas, or to keep a route off one router.
Filtering · OSPFv2
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.
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.
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
Operational reference
Fast context before you go deeper.
ip prefix-list <name> permit|deny <prefix>Primary Commands
Configuration and operational commands for this Topic.
ip prefix-list <name> permit|deny <prefix>ReferenceAdd a permit or deny entry for a prefix (with optional ge/le) to a prefix list.
Use when: Define prefix policy used by OSPF area filtering/distribute-list mechanisms.
Quick note: Verify the consuming OSPF filter and both LSDB/RIB effects.
Cisco IOS / IOS XE · mixedarea <area> filter-list prefix <name> inReferenceFilter type-3 summary LSAs entering an OSPF area on an ABR using a prefix list.
Use when: Filter inter-area prefixes being introduced into the specified area using Cisco OSPF area prefix filtering.
Quick note: Direction is viewed at the ABR/area boundary; test from the intended receiving area.
Cisco IOS / IOS XE · mixedarea <area> filter-list prefix <name> outReferenceFilter type-3 summary LSAs leaving an OSPF area on an ABR using a prefix list.
Use when: Filter prefixes advertised out of the specified area toward other areas.
Quick note: Compare source-area state, ABR LSDB and remote-area Type 3/RIB.
Cisco IOS / IOS XE · mixeddistribute-list prefix <name> inReferenceFilter routes installed from a routing protocol using a prefix list.
Use when: Filter which OSPF-derived routes enter the local RIB without necessarily removing their LSAs from the LSDB.
Quick note: Critical distinction: LSDB present + RIB absent can be expected under this policy.
Cisco IOS / IOS XE · mixedVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 inon 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 outdoes 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 · 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.
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.
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|outon an ABR filters Summary LSAs going into (in) or coming out of (out) the named area.area <id> range … not-advertisesuppresses a whole block at the ABR.distribute-list prefix <name> inunderrouter ospfaffects only the local routing table; the database is untouched.distribute-list … outapplies only to routes being redistributed into OSPF.- A route-map on
redistributedecides 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 32when 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.
| Tool | Where | Effect |
|---|---|---|
area <id> range … not-advertise | ABR | Suppresses type 3 summary LSAs for the range (documented in the Catalyst 9000 guide) |
area <id> stub / nssa | All routers in the area | Keeps type 5 external LSAs out (the guide states they aren't sent into stub areas) |
area <id> stub no-summary (totally stubby) | ABR | Also replaces inter-area routes with a default |
Route map on redistribute | ASBR | Controls which external routes enter OSPF |
distribute-list … in | Any router | Keeps routes out of the local routing table; the LSAs remain in the LSDB |
area <id> filter-list prefix … in|out | ABR | Filters type 3 LSAs between areas |
ip ospf database-filter all out | Interface | Stops 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
| Goal | Preferred tool |
|---|---|
| Hide an area's subnets from the rest | ABR range not-advertise or filter-list |
| Keep external routes out of an area | Stub or NSSA |
| Control redistribution | Route maps on the ASBR |
| Per-router exceptions | distribute-list in, with care |
Documented example, not captured output.
Filtering boundary matters
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.
| Method | Where | Effect |
|---|---|---|
area X filter-list prefix ... in/out | ABR | Blocks Type 3 LSAs |
distribute-list in | Any router | Not installed locally; LSAs still flooded |
Route map on redistribute | ASBR | Controls external routes |
distribute-list in can create black holes if neighbors still route through this router expecting it to have the route.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%Quick lookup tables
Filtering · operational reference
Compact state and interpretation boundaries for fast lookup.
| Filtering boundary | Typical effect |
|---|---|
| Redistribution/ASBR | Controls external route injection |
| ABR/area policy | Controls inter-area summary/prefix propagation |
| Local distribute filter | Can suppress RIB installation while LSA remains |
| Packet ACL | Traffic filtering, not route advertisement policy |
Filtering operational reference
Topic-specific bounded interpretation: known-good protocol state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for Filtering | Suspicious signature | Next proof |
|---|---|---|---|
| Intent | Matches OSPFv2 route-information filtering at ABR, redistribution and local RIB boundaries while preserving the distinction between LSDB flooding, route calculation and route installation design | Policy, area, family or metric input differs | Compare effective configuration |
| Protocol state | Stable expected adjacency/database/topology decision | a 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 behavior | Inspect peer/LSDB/topology detail |
| Route/forwarding | Expected RIB/FIB next hop or multipath set | Protocol state exists but route/path disagrees | RIB/FIB/CEF and next-hop proof |
| Closure | Original test passes for explained reason | Symptom moved, was bypassed or state was forced | Regression test |