OSPF – External routes Part 2: Type 5’s in multiple normal areas.

Welcome back to the 2nd post about OSPF and external routes.

Last time we spoke of OSPF and how it behaves in regard of external routes in a single “normal” area.

By normal, it implies an area that accepts all types of LSA’s.

For the sake of completeness, I want to create the same scenario, but this time, the same route is redistributed into two different regular areas. This will make it apparent to you which LSA/route will be prefered under a couple of different circumstances.

What i want to accomplish with this post, is to demonstrate how type 5 LSA’s are flooded throughout the OSPF domain. I will also show how each router chooses what path to use getting to the 100.100.100.0/24 external network.

The topology i will be using is shown below:

<dd class="wp-caption-dd">
  Topology of multiple regular areas
</dd>

As you can see, the topology contains 5 routers. It is split up into 3 areas. Area 0, Area 1 and Area 2.

R1 is a single-area router, residing solely in area 0.

Two of the routers (R2 and R3) are ABR routers. Router R4 and R5 are ASBR’s in area 1 and area 2 respectively.

All of the routers IP addresses ends in their router-numbers. All the routers OSPF router-id is set to the number in each octet (So R1 is 1.1.1.1 and so forth).

The network we are redistributing into the OSPF domain is 100.100.100.0/24.

First of, lets see what R4 and R5 have in their link state database:

R4:

And R5:

As you can see, on R4 we have a type 4 LSA describing how to get to the ASBR 5.5.5.5 (R5). This is expected as R4 have no idea on how to get to R5 since its in a different area, and hence we dont receive any type 1 LSA describing this router. The reverse can be seen on R5.

On both routers we have two type 5 LSA’s. This is also OK since type 5 LSA’s will be flooded to all regular areas.

And lets now check out what R1 sees:

As can be seen, on R1 we have 2 type 4 LSA’s present. Each one representing an ASBR in a different area. We also receive 2 type 5 LSA’s. Again, one from each ASBR.

Remember that the type 4 LSA’s are being created by the ABR’s, R2 and R3 respectively. We can verify this by checking out the type 4’s in more detail:

The “Link State ID:” field lists the ASBR’s router-id. The “Advertising Router:” field lists the ABR that created the type 4 LSA.

So getting back to our 100.100.100.0/24 route. On R1 we get two equal type 5 LSA’s, so we install them both into the routing table:

And here’s the detail on the route:

I want you to pay attention to the forwarding metric again. Even though its in seperate areas and the metric for the route itself is still 20, we meassure the cost to the ASBR, which right now is 74 for both.

Lets alter the cost to get to R4, and see what happens:

And the detail of the route on R1:

Allright, there we go. Now we only have a single path to the 100.100.100.0/24 route, because we made the distance to the ASBR (4.4.4.4) that much larger. We can confirm our reasoning by checking the border-router command:

Here we have proof that the distance to the ASBR comes into play. 110 versus 74, and the 74 wins.

An interesting effect of changing the cost to 4.4.4.4 so dramatically is that R2 will now also choose the path over R3 in order to get to 100.100.100.0/24:

I hope this post has shed some light on the same topic as last time, but emphasized what happens when the route originates in multiple areas.

Until next time, take care!!