We said always that OSPF is a link-state routing protocol.
For most engineer stuying CCNA or CCNP, OSPF is misunsdertanding.
In reality, OSPF is a link-state routing protocol only within an area (intra-area); but almost a distance-vector routing protocol between areas (inter-area).
One of the advantages of link state protocols is that the link state database provides a “view” of the entire network but only within the area. Within the same area every OSPF router floods information about itself, its links, and its neighbors to every other router. From this flooded information each router builds an identical link state database. Each router then independently runs a shortest-path-first calculation on its database and calculates the best path to each destination.
When an OSPF domain grows large, the flooding and the resulting size of the link state database becomes a scaling problem. The problem is remedied by breaking the routing domain into areas: That first concept is modified so that flooding occurs only within the boundaries of an area in order to reduce the routing table and the LSDB sizes, therefore to protect the memory resources and CPU processing power. When a changes occurs in an area in the topology only the routers in this area trigger the SPF algorithm through the LSA Type 1 and LSA Type 2.
When an ABR receive the LSA Type 1 and LSA Type 2 within the area, it will only send the reachability information through the LSA Type 3to another area. ABR hides the topology information and only reachability information sends between the areas.
When ABR sends a summary type 3 LSAs into another area, it says I can reach for example network 22.214.171.124 and this my metric to reach it, and you can reach this network through me. Which mean is ABR will hide topology information.
To prevent routing loops, areas must be connected to the backbone area 0. All LSAs Type 3 must therefore pass into or out of area 0 when multiple areas are in use, whereas type 1 and 2 LSAs are confined to the local area. In other when we have multiple ABRs, an ABR ignores an LSA Type 3 learned through a non-backbone, this called as split-horizon inter-area loop prevention.
RFC 3509 explains OSPF ABR Behavior and split-horizon mechanism in the following section:
In OSPF domains the area topology is restricted so that there must be
a backbone area (area 0) and all other areas must have either
physical or virtual connections to the backbone. The reason for this
star-like topology is that OSPF inter-area routing uses the
distance-vector approach and a strict area hierarchy permits
avoidance of the “counting to infinity” problem. OSPF prevents
inter-area routing loops by implementing a split-horizon mechanism,
allowing ABRs to inject into the backbone only Summary-LSAs derived
from the Intra-area routes, and limiting ABRs’ SPF calculation to consider only Summary-LSAs in the backbone area’s link-state database.
The last restriction leads to a problem when an ABR has no backbone
connection (in OSPF, an ABR does not need to be attached to the
Keep in mind that the LSA Type 3 has flooding scope in one area, it never crosses ABR boundaries, it just gets re-generated when needed, the LSA Type 3 originated by R1 is flooded only in area 1. In this case R2 is also an ABR, and it is learning the network 126.96.36.199/24 first from R5 as a result it creates an LSA Type 3 with the Advertising Router: 0.0.0.2 (itsef) and floods this LSA 3 into area 0 as shown by the show ospfv3 data inter-area pre 188.8.131.52 command below, R1 receives this LSA 3 and regenerates another LSA 3 with the Advertising Router: 0.0.0.1.
R4, although it it has two interfaces in different areas (areas 1 and 2), it will not propagate LSAs from one area to the other, as it does not have an interface in area 0. The RFC 3509 describes that an ABR must have at least one interface in area 0.
RFC 3509 says in the following section:
Area Border Router (ABR):
Cisco Systems Interpretation:
A router is considered to be an ABR if it has more than one
area Actively Attached and one of them is the backbone area.
Now Does the rule of Summary LSA Type 3 (inter-area prefix LSA) described above apply to asb-summary LSA Type 4 (inter-area router LSA) as well?
Yes, the rule of split-horizon applies to both LSA Type 3 and LSA Type 4, of course the LSA Type 4 have effect on external route. Without having LSA Type 4 for an ASBR, routers will ignore all external routes injected by the corresponding ASBR losing the reachability.
This LSA is generated by an ABR and describes how to reach the ASBR, it lists the metric that the ABR uses to reach the respective ASBR. This LSA contains the router-ID of the ASBR and the metric to reach it. ABRs generate LSAs Type 4 based on the special “router routing” table which is visible when you issue the command show ip ospf border-routers or show ospfv3 border-routers with OSPFv3 AF. This command is the essense of the distance-vector OSPF behavior. During the inter-area path calculations, the ABR populates this table with “host” routing entries for every ABR and ASBR detected with the respective metrics. This table is never transferred to the main router routing table, but rather used for inter-area path computations and LSA Type 4 generation. Effectively, the metrics in this table are used as metric offsets for the paths learned from ABRs and ASBRs.
The LSA Type 3 is originated by an ABR into one area to describe links or the prefixes in another area.
The LSA Type 4 is also originated by an ABR, but it is used to describe how to reach an ASBR located in one area to routers in another area.
If you read RFC 2328, it actually groups both Type 3 and Type 4 LSAs into the same category of “Summary” LSAs or inter-area prefix LSA. There is of course the distinction of types, but since all the fields are the same with only a slight difference in meaning on the information carried by each LSA.
The LSA Type 3 has the “Prefix Address” which carries the subnet.
The LSA Type 4 has the “Destination Router ID” which carries the router ID of the ASBR.
From R3’s perpective, the best path to reach the external prefix 184.108.40.206/24 is through R4 because the best cost to the ASBR is through R4 which is 2, rather than the path through R1 with a metric4 to reach the ASBR R5. However, the path that is actually taken is the one through R1 and R2 in area 0.
Keep in mind that the LSA Type 4 has flooding scope in one area like an LSA Type 3, it never crosses ABR boundaries, it just gets re-generated when needed, the LSA Type 4 originated by R1 is flooded only in area 1.