OSPF filtering allows you to control which inter-area routes are advertised between different OSPF areas.
Why would you need this?
In many enterprise networks, security or design policies require that certain networks must not be reachable from specific areas. For example, a subnet used for internal services in Area 1 may not be allowed to appear in Area 0.
Assume that the network 10.1.12.8/30 must not be learned in Area 0.

Figure 1 – All routes advertised
Since inter-area routes are advertised by the Area Border Router (ABR), filtering is performed on the ABR. In this topology, R2 acts as the ABR and therefore controls which Type 3 LSAs are generated and flooded between Area 1 and Area 0.
The ABR as the Decision Point
The ABR determines whether a Type 3 LSA is advertised into another area. If the LSA is suppressed, routers in the destination area will never receive it and therefore will not install the corresponding route in their routing tables.

Figure 2 - Route blocked at ABR
This is the fundamental principle of OSPF inter-area filtering: control the generation and flooding of Type 3 LSAs at the ABR.
But how does OSPF filtering actually work?
It may seem simple, you block a route and it disappears.
To understand what really happens, we need to look at OSPF's internal behavior.Answer the question below
On which router is OSPF inter-area filtering performed?
To understand OSPF filtering, you must first remember that an ABR maintains a separate LSDB for each connected area.
In this topology, R2 has one LSDB for Area 1 and another LSDB for Area 0.
Figure 3 – Separate LSDB per area
The ABR Processing Sequence
When a Type 1 LSA is received from a specific area, the ABR installs it into the LSDB of that area.
In our example, Type 1 LSAs from Area 1 are stored in the Area 1 LSDB.
Figure 4 - Type 1 LSA installation
The ABR then runs the SPF algorithm for Area 1 and installs the resulting routes into its routing table (RIB).
After the SPF calculation, the ABR generates a Type 3 LSA to represent the Area 1 network inside Area 0.
Figure 5 – SPF calculation executed
Before flooding this Type 3 LSA into Area 0, the ABR evaluates it against its inter-area filtering policy.

Figure 6 - Policy evaluation process
To better understand how this works in practice, let's move to the CLI and configure it step by step.
Answer the question below
How many LSDBs does an ABR maintain in this topology?
There are three primary methods to perform OSPF inter-area filtering on an ABR:
Area Range with not-advertise
Inbound inter-area filtering
Outbound inter-area filtering
All inter-area filtering mechanisms operate on Type 3 LSAs generated by the ABR.

Figure 7 - OSPF Filtering Topology
OSPF inter-area filtering affects only Type 3 LSAs.
It does not impact intra-area LSAs (Type 1 and Type 2) or external LSAs (Type 5).Filtering with Area Range (not-advertise)
First, verify the current routing table on R3.
R3 learns four inter-area routes from Area 1:10.1.12.0/30
10.1.12.4/30
10.1.12.8/30
10.1.12.12/30
R3# show ip route ospf Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks O IA 10.1.12.0/30 [110/3] via 10.0.23.1, 00:00:02, GigabitEthernet0/0 O IA 10.1.12.4/30 [110/3] via 10.0.23.1, 00:00:07, GigabitEthernet0/0 O IA 10.1.12.8/30 [110/3] via 10.0.23.1, 00:00:07, GigabitEthernet0/0 O IA 10.1.12.12/30 [110/2] via 10.0.23.1, 00:00:07, GigabitEthernet0/0Now we will configure an OSPF area range with the
not-advertiseoption to suppress a specific prefix.40 % Complete: you’re making great progress
Ready to pass your CCNP exam?