OSPF - External Route - E1 vs E2

written by: Ehsan Emad

In ospf, when we redistribute external route from any other routing protocol like BGP, EIGRP, or even static into OSPF, we call it "external route". The router is also known as ASBR ( autonomous system boundary router). External routes will flood to the entire OSPF domain with LSA type 5.

But when we check the global rib table with #show ip route command, we see that there is an "E2" ("N2") / "E1" ("N1") sign in front of the external route.

Simply E1 and E2's story is all about metric and nothing more.

We have the same story for N1 and N2 routes.

E2 (N2)

In type 2, the equation is --> E2 (N2) metric = redistribution metric.

please check the scenario.


In our topology from "R5" to reach ASBR1 (R2) cost is "1" and to reach ASBR 2 (R6) cost is also "1".

Both these routers are redistributing EIGRP external route into OSPF.

From router R5 to reach EIGRP route ( behind "ASBR 1 " also cost is 1 (same as reach "ASBR1") and to reach to EIGRP route ( behind "ASBR 2" cost is "1" which is the same cost to reach "ASBR 2."

External OSPF Type 2 routes do not increment in metric.


E1 (N1)

In type 1, the equation is metric = redistribution metric + metric to reach external route.

For example in router F cost to reach EIGRP route ( is 100.


If we check the "router E," we can see that even when we increase the cost to reach the EIGRP route to 100 on "router F," Still nothing changes for it.


Let's change the type of external route to "type 1" or E1.

In the picture below, you can see the configuration guide for it.

E1 Config

And now it's time for verification:

E1 Output

As you can see the sign before the route changed to "E1."

And here is the detailed output. the forwarding metric changed to "101."


Important notes:

  • E2 is the default external type in ospf.

  • E2 routes do not increment in metric.

  • Please consider that E1 routes are preferred over E2 routes.

  • same for N1 and N2.

  • An ABR does not install E2 and N2 route into RIB at same time.

  • An ABR does not install O E1 and O N1 routes into the RIB at the same time.

  • don't forget N>E :)

I hope you enjoyed it. I am waiting for your feedback.

Leave your comment