Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

OSPF External E1 vs E2 Reference

Direct answer

Routes redistributed into OSPF are external type 1 (E1) or type 2 (E2). An E1 route's cost includes the internal cost to the redistributing router; an E2 route keeps the same metric everywhere. E2 is the default.

When to use this

Use it when there are two exits and traffic takes the more distant one, or when choosing how redistributed routes should be compared.

First 30 seconds

1. show ip route <network> — E1 or E2, and via which ASBR?

2. show ip ospf database external <network> — compare type and metric from each ASBR.

3. Different types → the E1 wins.

4. Same type, different metrics → the lower wins regardless of distance.

5. Align type and metric on both ASBRs.

Operational verification

route redistributed with a metric type and metric → type 5 LSA flooded → ASBR reachable → E1 preferred over E2 → lowest cost (E1) or lowest metric, then nearest ASBR (E2) → installed

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard
Key commandshow ip route 203.0.113.0
Scope / prerequisiteUse it when there are two exits and traffic takes the more distant one, or when choosing how redistributed routes shoul…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification Verify boundary
show ip route 203.0.113.0
show ip ospf database external 203.0.113.0
show ip ospf border-routers

The route output shows the type ("type extern 2"), the metric and the forward metric — the cost to the ASBR. The LSA shows "Metric Type: 2 (Larger than any link state path)" or type 1, the metric, the advertising router and the forwarding address. border-routers lists the cost to each ASBR.

Known-good: the LSA has the intended metric type and metric, and the installed route points towards the intended ASBR.

Step 2 Failure isolation workflow Narrow the fault
  • All routers use the same exit although another is closer. E2 with different metrics; distance is ignored.
  • An exit with a higher metric is used. It is advertised as E1, which always beats E2.
  • Two exits meant to be equal are not. One ASBR redistributes with a different metric or type.
  • The metric is 20 everywhere and was expected to grow. That is E2 behaviour; set metric-type 1.
  • The route is missing although the LSA exists. The ASBR or the forwarding address is not reachable through an internal route.
  • E2 is assumed to be less preferred than internal routes with higher cost. It is: internal routes win over external ones regardless of metric.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

E1 always beats E2 for the same prefix. Between E2 routes the lower external metric wins, and distance to the ASBR counts only as a tie-break. Use metric-type 1 when distance should always count.

Key checks
  • show ip route <network> — type, metric and forward metric.
  • show ip ospf database external <network> — metric type, metric, advertising router, forwarding address.
  • show ip ospf border-routers — cost to each ASBR.
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

Routes redistributed into OSPF are external routes, and each is marked as type 1 (E1) or type 2 (E2). The type decides how its cost is calculated: an E1 route adds the cost of getting to the redistributing router; an E2 route keeps the same metric everywhere.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

E2 is the default, and with it every router sees the same metric for an external route however far away the exit is. With two exits, that can send traffic to the more distant one. Choosing the metric type is how that is controlled.

ReferenceHow it works1 section · depth on demand

How it works

E2 (default). The metric is whatever was set at redistribution — 20 unless specified — and does not grow on the way. A router ten hops from the ASBR sees the same [110/20] as its direct neighbour.

E1. Each router adds its own internal cost to the ASBR. The metric then reflects the whole path, as it does for internal routes.

The type is set where the route is redistributed:

router ospf 1
 redistribute static subnets metric 100 metric-type 1

Selection between external routes to the same prefix follows fixed rules:

1. An E1 route is preferred over an E2 route, whatever the metrics.

2. Between E1 routes, the lowest total cost wins.

3. Between E2 routes, the lowest external metric wins. If those are equal, the route whose ASBR is closest — the lowest forward metric — wins.

So with two ASBRs redistributing the same route as E2 with the same metric, each router still picks the nearer exit, but only as a tie-break. As soon as the metrics differ, every router uses the exit with the lower metric regardless of distance. Using E1 on both makes distance count always.

Inside an NSSA the same two types appear as O N1 and O N2.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

E1 adds internal cost; E2 ignores it except as a tie-breaker

RFC 2328 section 2.3 defines the two external metric types.

TypeTotal cost used for path selection
Type 1 (E1)External metric + internal cost to the advertising ASBR
Type 2 (E2)External metric only; internal cost breaks ties between equal E2 metrics

The RFC states that if both types exist for the same destination, type 1 paths always take precedence over type 2.

Cisco IOS XE defaults

Redistributed routes default to E2 with metric 20 (1 for BGP routes). default-information originate also defaults to E2.

C9300-ASBR1(config)# router ospf 1
C9300-ASBR1(config-router)# redistribute static subnets metric 20 metric-type 1
C9300-ASBR2(config-router)# redistribute static subnets metric 20 metric-type 2
C9300# show ip route 172.16.0.0
Routing entry for 172.16.0.0/20
  Known via "ospf 1", distance 110, metric 32, type extern 1
  Last update from 10.255.0.2 on TenGigabitEthernet1/1/1
C9300# show ip ospf database external 172.16.0.0 | include Metric|Advertising

When to choose which

DesignMetric type
One exit pointEither; E2 is simpler
Several ASBRs for the same prefix, nearest exit wantedE1 (internal distance counts)
Several ASBRs, one preferred regardless of locationE2 with different external metrics
Default route from two internet edgesE1 for nearest exit, or E2 with a lower metric on the primary

Common surprise

With E2 from two ASBRs with equal metrics, routers pick the ASBR with the lowest forward metric (internal cost to it). That looks like E1 behaviour, but only applies when external metrics are equal. If one ASBR uses E1 and the other E2, the E1 route always wins, whatever the metrics.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 2328

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → OSPF External E1 vs E2 Reference. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
ospf e1ospf e2o e1o e2external metric type
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

OSPF E1 vs E2 — Fast Check

External-path comparison

1. Route code O E1 or O E2.

2. External metric.

3. Advertising router.

4. Forwarding Address.

5. Internal cost to ASBR/FA.

6. Installed next hop/CEF.

Confirmation

Confirm action

Continue?