OSPF Reference
Open Shortest Path First (OSPF) reference covering area types, LSA types, default interface costs, and DR/BDR election. Values are based on OSPFv2 (RFC 2328) and common Cisco IOS defaults.
OSPF Area Types
Stub and NSSA areas reduce LSA flooding and routing table size at the cost of losing detailed external routing. A Totally Stubby/Totally NSSA area additionally blocks inter- area summary LSAs (Type 3), leaving only a default route.
| Area Type | Allowed LSAs | Blocked LSAs | Default Route |
|---|---|---|---|
| Backbone (Area 0) | Type 1, 2, 3, 4, 5, 7 (if ASBR present) | — | No default injected |
| Standard (non-backbone) | Type 1, 2, 3, 4, 5 | — | No default injected |
| Stub | Type 1, 2, 3 | Type 4, 5 (external) | Default route injected (Type 3) |
| Totally Stubby | Type 1, 2 | Type 3 (summary), 4, 5 | Default route injected (Type 3) |
| NSSA | Type 1, 2, 3, 7 | Type 4, 5 | Optional default route (Type 7) |
| Totally NSSA | Type 1, 2, 7 | Type 3 (summary), 4, 5 | Default route injected (Type 3) |
LSA Types
| Type | Name | Originated By | Scope | Description |
|---|---|---|---|---|
| 1 | Router LSA | Each router | Area | Lists links/interfaces and costs. Flooded within the area only. |
| 2 | Network LSA | DR on broadcast/NBMA segment | Area | Lists routers on the multi-access segment. Generated by the DR. |
| 3 | Network Summary LSA | ABR | Area | Advertises inter-area prefixes between areas. Flooded into neighboring areas. |
| 4 | ASBR Summary LSA | ABR | Area | Advertises reachability to an ASBR. Flooded into neighboring areas (except stub/NSSA). |
| 5 | AS External LSA | ASBR | Entire AS (except stub/NSSA) | Advertises external routes redistributed into OSPF. Flooded domain-wide. |
| 6 | Group Membership LSA | — | — | Used by MOSPF (multicast OSPF). Not used by standard OSPFv2. |
| 7 | NSSA External LSA | ASBR in NSSA | NSSA area | Carries external routes within an NSSA. Translated to Type 5 by the ABR for the rest of the AS. |
Default Interface Costs (Cisco, reference BW 100 Mbps)
OSPF cost is calculated as reference-bandwidth / interface-bandwidth. The default reference bandwidth on Cisco IOS is 100 Mbps, so any interface ≥ 100 Mbps gets cost 1. Set auto-cost reference-bandwidth (in Mbps) to a higher value (e.g., 100000 for 100 Gbps) in modern networks to differentiate high-speed links.
| Interface Speed | Default Cost | Note |
|---|---|---|
| ≥ 100 Mbps (Fast Ethernet+) | 1 | Reference bandwidth default 100 Mbps (Cisco). Adjust with auto-cost reference-bandwidth. |
| 10 Mbps (Ethernet) | 10 | Standard 10 Mbps Ethernet. |
| 1.544 Mbps (T1) | 64 | Serial WAN link. |
| 64 kbps | 1562 | Low-speed serial. |
| 0 (loopback) | 1 | Loopback interfaces default to cost 1. |
DR / BDR Election
- Election occurs on broadcast and NBMA network types (not point-to-point). The router with the highest OSPF priority becomes the DR; ties are broken by the highest router ID.
- Default priority is
1. A priority of0disqualifies a router from becoming DR or BDR. - The router with the second-highest priority becomes the BDR.
- Election is non-preemptive: once a DR and BDR are elected, a new router with a higher priority will not take over until the current DR/BDR reset or the OSPF process restarts.
- The DR originates the Type 2 (Network) LSA for the segment.
Related Tools
- Cisco Interface Config Generator — generate interface configs including OSPF cost and priority.
- Cisco Administrative Distance Reference — route-source believability values.
Technically Reviewed By
Senior Enterprise Network Engineer — 25+ years of IT and network infrastructure experience, including enterprise Cisco switching, routing, wireless, firewalls, VPN, network access control, SD-WAN, and large-scale network operations.
Last reviewed: 2026-09-02
Calculations are performed using standards-based formulas and verified against known reference values. All computation runs client-side in your browser.