In OSPFv2, what do LSA types 1, 2, 3, 4, 5 and 7 describe, who originates each, and how far does each flood?
answer
- topology versus reachability
- the DR speaks for a segment
- ABRs rewrite at every border
- one type floods unchanged AS-wide
- a not-so-stubby exception
basics
~20 sTypes 1 (router) and 2 (network, from the DR) map an area's topology and stay inside it; ABRs originate 3 (network summary) and 4 (ASBR summary) per area; ASBRs' type 5 floods AS-wide except stub areas and NSSAs, whose own externals use type 7.
solid answer
~40 sA **type 1 router-LSA** comes from every router and lists its links in one area; a **type 2 network-LSA** comes from the designated router of each multi-access segment and lists the routers on it. Both are flooded through one area only, and together they are the area's topology. ABRs originate **type 3 summary-LSAs** (a network or range outside the area) and **type 4 summary-LSAs** (the route to an ASBR) into each area; they are area-scoped too, so the next ABR originates its own copy with its own cost. An ASBR originates **type 5 AS-external-LSAs**, the only kind that floods unchanged through the whole AS, except stub areas and NSSAs. Inside an NSSA (RFC 3101) an ASBR originates **type 7** instead, which never leaves that area; an NSSA ABR translates it into a type 5.
go deeper
Know that routers describe their links in one LSA type, ABRs summarise between areas, and external routes have their own LSA type.
Give all six types with originator and scope, and explain why type 4 exists when type 5 already names its ASBR.
Explain that summaries are regenerated at each ABR, which types each area type admits, and how to localise a missing route by LSA type.
Weigh how much of the database each area type removes against the path information that loss costs routers inside it.
## Why OSPF has several LSA types A **link-state advertisement (LSA)** is one unit of the OSPF database. RFC 2328 splits the database into kinds because areas need two different sorts of information: - **Topology** inside an area: which router connects to which segment, at what cost. Every router in the area needs all of it to run SPF. - **Reachability** from outside the area: which destinations exist beyond the border and at what cost, with no detail of the path. Each LSA is identified by its **LS type**, its **Link State ID** and its **Advertising Router**, and each type has a **flooding scope** that decides how far it travels. ## The six types interviewers ask about | Type | Name | Originated by | Describes | Flooding scope | |---|---|---|---|---| | 1 | Router-LSA | Every router, once per attached area | Its links in that area and their costs; B, E and V bits | One area | | 2 | Network-LSA | The designated router of a broadcast or NBMA segment with two or more routers | The routers attached to that segment | One area | | 3 | Summary-LSA (IP network) | ABRs | A network or area address range outside the area, with a cost | One area; each ABR re-originates | | 4 | Summary-LSA (ASBR) | ABRs | The cost to reach an ASBR located outside the area | One area; each ABR re-originates | | 5 | AS-external-LSA | ASBRs | A destination outside the AS, with external metric type 1 or 2 and a forwarding address | The whole AS, except stub areas and NSSAs | | 7 | Type-7 AS-external-LSA (RFC 3101) | ASBRs inside an NSSA, and NSSA ABRs for a default | An external destination, same layout as type 5 | One NSSA only | Some identifiers worth knowing: - A router-LSA's Link State ID is the router's **Router ID**; its links are typed point-to-point, transit network, stub network or virtual link. - A network-LSA's Link State ID is the designated router's **interface address**, and it has no metrics: the cost from a segment to its routers is zero. - A type 3 LSA's ID is the **network address**; a type 4 LSA's ID is the **ASBR's Router ID**. ## Which LSA crosses which border The phrase "crosses a border" hides the real mechanism: 1. **Types 1 and 2 never cross.** They are the area's topology, and that topology is exactly what areas hide. 2. **Types 3 and 4 do not cross either: they are regenerated.** An ABR runs SPF in each attached area, then originates fresh summary-LSAs into every other attached area, with **itself** as advertising router and **its own** cost. The next ABR down the line repeats the process. A summary seen in area 2 names area 2's ABR, not the router that first had the route. 3. **Type 5 is the one that floods unchanged.** Its advertising router stays the original ASBR everywhere. That is why type 4 exists: a router in another area needs a route to that ASBR, which its own area's topology does not contain. 4. **Type 7 stops at the NSSA border.** An NSSA ABR elected or configured as translator originates a new type 5 for each type 7 whose **P-bit** is set and whose forwarding address is non-zero, and floods that type 5 into the other areas that accept externals. A type 7 address range on the translator can fold several type 7s into one type 5. Two rules decide what ABRs put in summaries: - AS-external routes are **never** advertised in summary-LSAs. - Only **intra-area** routes are summarised into the backbone; both intra-area and inter-area routes are summarised into other areas. ## How area types prune the list | Area type | Types present inside it | |---|---| | Normal area or backbone | 1, 2, 3, 4, 5 | | Stub area | 1, 2, 3 (including a default), no 4, no 5 | | NSSA | 1, 2, 3, 7, no 4, no 5 | An implementation feature often called "totally stubby" (a term in no RFC) goes further and lets the ABR send only the default type 3 into a stub area. ## Reading a database by type When a route looks wrong, the type tells you where to look: - A missing **intra-area** route points at types 1 and 2 inside the area. - A missing **inter-area** route points at the type 3 from the ABR and at the ABR's own view of the other area. - A missing **external** route needs both the type 5 and a path to its ASBR: a router or type 4 inside the area, or a forwarding address it can reach.
- Why does an OSPF type 3 LSA's advertising router change at each ABR, while a type 5's never does?Summary-LSAs are area-scoped: each ABR computes routes in one area and originates new summaries into another, signed with its own Router ID and cost. AS-external-LSAs are AS-scoped and flooded as originated, so the ASBR stays the advertising router everywhere; routers in other areas then need a type 4 to find that ASBR.
- Which LSA types does an internal router in an OSPF stub area hold?Types 1 and 2 for its own area, plus type 3 summaries for inter-area destinations and a type 3 default that its ABRs originate. It holds no type 5, because externals are not flooded into stub areas, and no type 4, because without type 5 there is no ASBR to reach. With the ABR suppressing summaries, only the default type 3 remains.
saying these in an interview costs you the question
- Type 3 summary-LSAs are flooded across the whole AS unchanged.
- Type 4 LSAs carry the external prefixes themselves.
- Every router on a broadcast segment originates its own network-LSA.
- Type 7 LSAs are flooded into area 0 so the backbone learns NSSA routes.
- Type 5 LSAs reach every area, stub areas included.
- An ABR summarises type 5 external routes into type 3 LSAs.