OSPF · Topic 3 of 4

OSPF Area Types, Router Types and LSA Types

Learn OSPF backbone, stub, totally stubby and NSSA areas, ABR and ASBR roles, LSA types 1 to 7 and the Junos stub default-metric rule for the JN0-364.

  • 5 min
In a nutshell
  • Router types: internal, backbone, ABR, ASBR; one router can be several types.
  • LSA 1 router, 2 network (DR), 3 summary (ABR), 4 ASBR summary (ABR), 5 external (ASBR), 7 NSSA external.
  • Type 7 is translated to type 5 at the NSSA ABR.

What it is

OSPF splits a large network into areas to keep each link-state database small. Every area connects to the backbone area 0, and routes between areas pass through it.

A router's type depends on where it sits: inside one area, on the border between areas, or on the border with another routing domain. Each type originates particular LSA types, and each area type blocks some LSA types to cut the database down further.

Area 1internal routerABRArea 0backboneABRArea 2External domainASBROSPF domaintype 5 LSA

How it works

Router types

Router typeDefinition
Internal routerAll OSPF interfaces in one area
Backbone routerAt least one interface in area 0
Area border router (ABR)Interfaces in area 0 and at least one other area
AS boundary router (ASBR)Injects external routes into OSPF, usually through an export policy

A router can be more than one type at once, for example an ABR that is also an ASBR. In Junos a router becomes an ASBR as soon as an export policy injects a route into OSPF.

LSA types

TypeName in Junos outputOriginated byScopeDescribes
1RouterEvery routerAreaThe router's links and their costs
2NetworkDRAreaThe routers attached to a broadcast segment
3SummaryABRAreaA prefix from another area
4ASBRSumABRAreaHow to reach an ASBR in another area
5ExternASBRWhole domain, except stub and NSSA areasAn external route
7NSSAASBR in an NSSANSSA onlyAn external route inside an NSSA
10OpaqAreaRouters with traffic engineeringAreaTraffic engineering information, used by RSVP

At the ABR of an NSSA, type 7 LSAs are translated into type 5 LSAs for the rest of the domain.

ASBR in NSSAtype 7NSSA ABRtranslate to type 5Area 0 and other areas

External route types

External routes have a metric type. Type 2 (the Junos default for exported routes) keeps the external metric as is. Type 1 adds the internal cost to reach the ASBR. Set it in the export policy with then external type 1. Both have Junos preference 150; internal OSPF routes have 10.

Area types

Area typeType 3Type 4 and 5Type 7Default route
Backbone (0) and standardYesYesNoOnly if one is advertised
StubYesNoNoFrom the ABR, if configured
Totally stubbyNo (only the default)NoNoFrom the ABR, if configured
NSSAYesNoYesOptional, configured on the ABR
Totally stubby NSSANo (only the default)NoYesFrom the ABR, if configured

Configuring area types in Junos

Every router in the area must agree on the area type, because it is checked in hellos.

user@router# set protocols ospf area 0.0.0.1 stub

On the ABR, Junos does not send a default route into a stub area unless you configure a metric for it:

user@abr# set protocols ospf area 0.0.0.1 stub default-metric 10

Totally stubby: add no-summaries on the ABR so type 3 LSAs are blocked and only the default remains.

user@abr# set protocols ospf area 0.0.0.1 stub default-metric 10 no-summaries

NSSA, with a default route injected by the ABR:

user@router# set protocols ospf area 0.0.0.2 nssa
user@abr# set protocols ospf area 0.0.0.2 nssa default-lsa default-metric 10
user@abr# set protocols ospf area 0.0.0.2 nssa no-summaries

In hierarchy form, the stub area on the ABR:

protocols {
    ospf {
        area 0.0.0.1 {
            stub default-metric 10 no-summaries;
            interface ge-0/0/1.0;
        }
    }
}

Summarizing between areas

An ABR can summarize the type 3 LSAs it sends for an area with area-range:

user@abr# set protocols ospf area 0.0.0.1 area-range 10.1.0.0/16

The other areas then receive one summary for 10.1.0.0/16 in place of every subnet inside it. Add restrict to suppress the range completely.

Reading area and LSA information

user@router> show ospf database netsummary
user@router> show ospf database asbrsummary
user@router> show ospf database external
user@router> show ospf database nssa
user@router> show ospf overview

show ospf overview shows the router ID, whether the router is an ABR or ASBR, and the type of each area.

Exam tip

In a stub area, show ospf database should show no Extern or ASBRSum entries for that area. If the routers there also have no default route, check whether default-metric is set on the ABR.

Common mistakes

Expecting Junos to inject a default route into a stub area automatically. The ABR needs stub default-metric before it originates the default.

Configuring stub on the ABR only. The stub flag must match in hellos, so internal routers in that area need stub too, or adjacencies fail.

Confusing type 4 with type 5. Type 4 tells routers how to reach an ASBR in another area. Type 5 carries the external prefix itself.

Watch out

no-summaries belongs on the ABR. It turns a stub area into a totally stubby area, and with no default-metric the area then has no route out at all.

What to remember for the exam

  • Router types: internal, backbone, ABR, ASBR; one router can be several types.
  • LSA 1 router, 2 network (DR), 3 summary (ABR), 4 ASBR summary (ABR), 5 external (ASBR), 7 NSSA external.
  • Type 7 is translated to type 5 at the NSSA ABR.
  • Stub blocks types 4 and 5; totally stubby also blocks type 3; NSSA allows type 7.
  • Junos ABR sends a default into a stub area only with stub default-metric <n>.
  • area-range summarizes on an ABR; restrict suppresses the range.
  • External preference 150, internal 10; Junos exports as external type 2 by default.

Check yourself

  • Which LSA type does an ABR use to advertise a prefix from one area into another?

    Type 3, the network summary LSA.

  • In a Junos stub area, internal routers have no default route. What is missing on the ABR?

    The default-metric option under area <id> stub, which makes the ABR originate the default route.

  • What happens to a type 7 LSA at the NSSA ABR?

    The ABR translates it into a type 5 LSA and floods it into the rest of the OSPF domain.

Topic 3 of 4 in OSPF

Test yourself on OSPF

The full Juniper JNCIS-SP JN0-364 question bank has 860 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.