Some Hot Tips on OSPF Filtering and OSPF Area Types

Here is the list of some of the tricky concepts of Types of OSPF areas and OSPF Filtering;

OSPF routers do not advertise routes, instead they advertise LSAs. Any
filtering applied to OSPF messages would need to filter the transmission
of LSAs. However, inside one area, all routers must know all LSAs, or
the whole SPF concept fails, and routing loops could occur. As a result,
OSPF cannot and does not allow the filtering of LSAs inside and area,
specifically the type-1 and type-2 LSAs that describe the intra-area
topology.

OSPF is a link state protocol that populates the Link State Database, LSD, to give routers the same area and identical perspective of the OSPF routing domain that perspective is tempered by the type of area the routers are in.

An ABR can also be an ASBR.

When an external Route is defined as an E1, ABRs generate a type 4 (ASBR Summary) LSA into non-backbone, non-stub areas.

The type 4 LSA reflects the cost from that area’s ABR to the ASBR (itself) that redistributed that route into the OSPF domain. This cost is added to the area router’s cost to reach its ABR plus the metric of the external LSA.

Inter-area Routes
Inter-area routes are those generating in another area within the same Routing domain as the local router with the exception of the default route generated by the ABR into stub and totally stubby areas. This default route is not propagated outside of a stub or totally stubby area.

The flooding of LSAs within an area can be prevented with the “ip ospf database-filter all out” commnd which can be applied to an interface.

Several methods filter routes on the local router, whether the router is in the same or a different area than the originater of the routes. Most filtering does not remove the networks from the Link State Database, LSD. the Routes are removed from the routing table, which prevents the local router from using them to forward traffic.

Within the NSSA, when the type 7 LSA reaches the ABR, the LSA is changed to a type-5 and propagated into the backbone. The route now appears as an ordinary external route the routers in non-stub areas outside of the NSSA.

A default route is not automatically generated into an NSSA. A special statement on the NSSA ASBR “Area X default-information originates” will advertise a default route into the NSSA with a type-7 LSA. This default route is propagated into non-stub area in the rest of the OSPF routing domain, by the same rules that apply to any other external routes.

Stub Areas
Native Inter-area and Intra-area route are advertised into the area, but not external routes. In place of external routes the ABR automatically advertise a default route into the stub area as an inter-area route (IA).

Some filtering methods do not remove routes from LSD of area Routers. Routes are only removed from the routing table of the local router. Other routers in the same area that do not have filters applied will continue to advertise the routes. A possible result is a BLACK HOLE in the routing domain, that means an OSPF neighbors could forward traffic to a router that is filtering the route to which it has the lowest cost path.

When filtering routes, the most common method of selecting routes is by subnet and another method is the source of the routes and in OSPF it is the Router-ID.

To choose the best inter-area route, a router uses distance Vector logic of taking its known metric to reach the ABR and adds the metric for that subnet as advertised by the ABR.

If and area has 20 Routers, and the engineer want to filter the route so that five of the routers do not learn the route, type-3 LSA filtering cannot be used. Type-3 LSA filtering can only filter the LSA from being flooded throughout the entire area.