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
- 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.
How it works
Router types
| Router type | Definition |
|---|---|
| Internal router | All OSPF interfaces in one area |
| Backbone router | At 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
| Type | Name in Junos output | Originated by | Scope | Describes |
|---|---|---|---|---|
| 1 | Router | Every router | Area | The router's links and their costs |
| 2 | Network | DR | Area | The routers attached to a broadcast segment |
| 3 | Summary | ABR | Area | A prefix from another area |
| 4 | ASBRSum | ABR | Area | How to reach an ASBR in another area |
| 5 | Extern | ASBR | Whole domain, except stub and NSSA areas | An external route |
| 7 | NSSA | ASBR in an NSSA | NSSA only | An external route inside an NSSA |
| 10 | OpaqArea | Routers with traffic engineering | Area | Traffic 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.
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 type | Type 3 | Type 4 and 5 | Type 7 | Default route |
|---|---|---|---|---|
| Backbone (0) and standard | Yes | Yes | No | Only if one is advertised |
| Stub | Yes | No | No | From the ABR, if configured |
| Totally stubby | No (only the default) | No | No | From the ABR, if configured |
| NSSA | Yes | No | Yes | Optional, configured on the ABR |
| Totally stubby NSSA | No (only the default) | No | Yes | From 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.
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.
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-rangesummarizes on an ABR;restrictsuppresses 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-metricoption underarea <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.