Yikes! Of the 10 answers in 2 different questions last post, we've got at least a handful of choices for 9 of the 10 - and the answer that no one chose is actually a correct answer! I'll take that as confirmation that there's at least enough confusion on this topic as to be a useful discussion for those going after the CCNP routing test. And, it seems like for those that offered an opinion, there's no big difference in difficulty on the LSA questions that are mostly theoretical versus those that relay on variations of "show ip ospf database". So, I'll cover both styles, focusing on the more theoretical view of OSPF today.

To approach these kinds of questions, you need to keep several facts in mind - facts that I'll phrase with an eye towards predicting the contents of the OSPF database in an area. You can then re-think your own answers, and then I'll show why I think certain answers are right or wrong.

So, when thinking about what LSAs to expect to see on a router, related to **internal routes**, consider the following:

- Type 1 and 2 LSAs only exist inside a single area, and are not forwarded to other areas by ABRs.
- Type 2 LSAs are only created when a) a Designated Router (DR) exists, and b) that DR has at least one OSPF neighbor.
- Type 3 LSAs ("summary network" LSAs) are created by ABRs, based on type 1, 2, and 3 LSAs in one area, to advertise subnets in one area into another area.
- As a result of #3 above, type 3 LSAs describe subnets in other areas, but not the topology in other areas.

More facts - this time for **external routes**:

- 5. ASBR's create a type 5 LSA external LSA to list it's own RID, the subnet of the external route, and the external cost associated with the route as it is injected to the OSPF network. It creates 1 such LSA for itself - not one per route.
- 6. Type 5 LSAs are flooded throughout the OSPF domain, including into other areas. (Exception - stubby areas - which I'm assuming are NOT configured.)
- 7. When ABRs flood a Type 5 LSA into another area, the ABR then creates a type 4 LSA to list a) the ASBR's RID and 2) the ABR's cost to reach the ASBR.

Finally, keep in mind that all routers attached to the same area end up with an identical copy of the LSDB, and that ABRs have a copy of the LSDB for each area to which it attaches.

Armed with these facts, the answers should be clearer, but not necessarily 100% clear. So, if you're into the questions, and want to ponder, take a moment and answer the following questions:

What LSAs, by type, are in area 1's LSDB? Area 0's? Area 4's?

Click to the next page to see the answers, and some analysis, of the correct answers to last week's question.

I didn't letter the answers, but if you consider them to be A - E, the right answers are D and E. Of course, some of you may argue on a few answers based on wording, but as long as we understand each other, and it's worth the few minutes to read this, then that's hopefully worth it.

Applying the rules, the Area 1 database should have:

- 1 type 1 LSA for R1
- 1 type 1 LSA for R2

Since there are no subnets in area 1 for which a DR needs to be elected, there are no type 2 LSAs

Multiple type 3 LSAs, 1 each for subnets:

- 10.1.235.0/24
- 10.1.34.0/24
- 12.0.0.0/8
- 22.0.0.0/8

Two Type 4 LSAs:

- 1 for ASBR 4.4.4.4, ABR listed as 2.2.2.2
- 1 for ASBR 5.5.5.5, ABR listed as 2.2.2.2

Two Type 5 LSAs:

- 1 for E1 route 11.0.0.0/8, R5 (5.5.5.5) as ASBR
- 1 for E2 route 21.0.0.0/8, R4 (4.4.4.4) as ASBR

Click here to see a PDF with all those LSA's listed, in order, on R1.

Then, how does R1 calculate the cost? It must first determine the topology, based on known LSAs, and then add the cost of each outgoing interface. But R1's view of the topology is based on only these LSAs. So, for the three answers (A, C, and E) that mention R1, let me now describe why I think each is either right or wrong:

**Answer A: incorrect.** The short version is that if you believe the documentation in the question, and the figure, you can rule out this answer without thinking about area 1's OSPF database. First, note that the route for 21.0.0.0/8 is an External type 2. External type 2 routes' cost is the cost listed in the Type 5 LSA - no other LSAs required. So, if you remembered that fact, answer 1 could be ruled out immediately. (For review on external LSAs, see earlier posts here and here.)

**Answer C: incorrect.** This answer refers to the External type 1 route for 11.0.0.0/8, and asks whether R1 uses any type 2 LSAs. As with answer A, you can rule out this answer without looking at a lot of detail. Type 2 LSAs only exist when a DR is elected, and the DR has at least 1 neighbor, AND type 2 LSAs are not flooded by ABRs into neighboring areas. Inside Area 1, no such need for a DR exists. The only type 2 LSA in the internetwork diagram would be for subnet 10.1.235.0/24, and it's in area 0 - so ABR R2 will not flood that Type 2 LSA into area 1. So, again thinking theoretically, R1 - internal to area 1 - will have no Type 2 LSAs, so R1 cannot use a type 2 LSA to calculate the cost to reach 11.0.0.0/8.

**Answer E: correct.** This answer suggests the R1 uses a type 3 LSA when calculating the cost for 22.0.0.0/8. According to the question, 22.0.0.0/8 is on an interface connected to R4, and inside area 4, with R4 being the only router attached to the subnet - in other words, there is currently no DR with a neighbor in network 22.0.0.0/8. So, 22.0.0.0/8 will be an intra-area route in area 4.

ABR R3 will then advertise a type 3 LSA for 22.0.0.0/8 into area 0, which floods to R2 and R5. This LSA lists R3's cost to reach 22.0.0.0/8 (74).

R2 then creates a new type 3 LSA for 22.0.0.0/8, and floods that LSA into area 1. This LSA lists R2's cost to reach 22.0.0.0/8 (78).

Now back to the actual answer E. R1's calculation of cost requires a mathematical model of the network similar to what's depicted in the following figure. Note that only the 2 area 1 Type 1 LSA's, plus the single Type 3 LSA for 22.0.0.0/8, are shown in the figure.

R1's calculation uses only this more limited information. To calculate the cost, R1 adds the cost associated with R1's S0/0/0 interface (in R1's Type 1 LSA), and adds the cost listed in the type 3 LSA for 22.0.0.0/8. Follow this link to see the more detailed show commands that list the rest of the details.

Ask away. I'm happy to clarify. Also, tell me why you think answers B and D are either incorrect or correct, or suggest what you think is in the area 0 and area 4 LSDBs. Enjoy!

Wendell