Well, February turned into the OSPF month here at the farm. I'm going to wrap it up with today's post unless we get a flurry of comments. ;-)

Question 2 supplied the output of the "show ip ospf database" command on R1, along with asking which LSAs R1 used to calculate its cost to reach 21.0.0.0/8 - an E1 route. This question had a somewhat simple solution if you noticed that the figure listed the route as an E2 route. R1, to determine the cost of a route to an E2 route, just needs to look at the LSA for the E2 route, because OSPF does not have to add the internal OSPF cost to these routes. So, the only hard part was to figure out which LSA was the Type 5 LSA for the E2 route for 21.0.0.0/8. For more background, read this earlier blog post on E2 externals.

(FYI, I will also comment later as if this route were a External type 1 route, which makes for a more interesting discussion.)

To begin, it helps to know how to interpret the "show ip ospf database", particularly the headings, because the headings don't list the LSA types. The output lists LSAs per area (on ABRs). For each area, it lists Type 1 in the first section, then type 2, type 3, type 4, and type 7. Type 5 LSAs are considered external, so they sit at the end of the command output. The only hard part is that the headings don't list the LSA types by number for most types of LSAs.

You may recall from the last post that area 1 has no Type 2 LSAs, because inside area 1, there are no cases where a DR needs to be elected AND for which that router has at least 1 neighbor on that subnet. So, in the Area 1 LSDB, there should be 2 Type 1 router LSAs (R1 and R2), several type 3 summary LSAs, and 2 type 4 LSAs (1 for each ASBR). R1 will also know about the 2 type 5 external LSAs, although they're technically not listed as part of area 1. If you look at this link, you'll see an annotated version of the output.

Now, back to the question. Since the cost is determined along by the type 5 LSA for 21.0.0.0/8, you can examine the two type 5 LSAs, and figure out which one is for network 21. The output lists the Link ID of 21.0.0.0, and the question asked "which of the following link-ID's...". Since this is the only LSA used to calculate the cost, the only correct answer is answer F, which lists link ID 21.0.0.0. (To be fair, I may have thrown some of you off with a comment in the previous post about the right answers being all over the place - my apologies.)

A more interesting question is to change 21.0.0.0/8 from an E2 route to an E1 route. In tat case, the internal OSPF cost must be added to the type 5 LSA, which makes the question a lot harder. In that case, the cost must be calculated by R1 as follows:

- R1 sees an LSA type 5 for an External Type 1 route (21.0.0.0/8). The advertising router is listed as 4.4.4.4
- R1 must find an LSA for router 4.4.4.4, either 1) a Type 1 Router LSA, or 2) a type 4 Summary ASBR LSA. Since R4 (4.4.4.4) is in a different area, R1 finds a type 4 Summary ASBR LSA.
- The Type 4 LSA lists Link ID 4.4.4.4, with the advertising ABR as R2 (2.2.2.2), and the cost from the advertising ABR (2.2.2.2) to reach the ASBR (4.4.4.4)
- R1 calculates the intra-area cost to reach 2.2.2.2, using Type 1 and Type 2 LSAs.
- R1 adds the costs: 1) calculated cost to reach the ABR (R2), 2) plus the cost for the ABR to reach the ASBR (R4) per the typ 4 LSA, and 3) plus the cost listed for the E1 route in the type 5 LSA.

So, if the question 2 had been changed to make 21.0.0.0/8 an E1 route, then the answers would have been

- A (R1 Type 1 LSA)
- B (R2 Type 1 LSA)
- E (R2's Type 4 Summary ASBR for 4.4.4.4)
- F (Type 5 external created originally by R4)

Moving on to something else for the next post, unless you fire away - let me know your thoughts.