Introduction to OSPF External Routes
An external route (redistributed from another routing protocol, static route or connected route) will be tagged as a Type 5 LSA (E route). This LSA is circulated throughout the OSPF domain except for Stub, Totally Stubby and Not-so-stubby areas.
External routes are propagated through an OSPF area as a type 5 from an ASBR, or type 7 LSA from an ASBR in an NSSA. These routes from outside the OSPF domain, can either be E1 or E2 routes and they are treated in slightly different ways. In this article we will discuss the difference E1 vs E2.
E1 or External Type Routes –
The cost of E1 routes is the cost of the external metric with the addition of the internal cost within OSPF to reach that network.
E2 or External Type2 Routes –
The cost of E2 routes will always be the external metric, the metric will takes no notice of the internal cost to reach that network.
If 2 external type 2 routes exist with the same metric to the same destination the route with the lowest metric to the ASBR will is used. Also if an E1 and E2 route exist to the same destination the E1 route will always be preferred irrespective of the metric.
Related- OSPF N1 and N2 Routes
OSPF External E1 vs E2
Basically the difference between E1 and E2 external routes is:
E1 includes – the internal cost to ASBR added to the external cost,
E2 does not include – internal cost. it is same as external cost.
Below Diagram will help in understanding how OSPF E1 and E2 external routes are calculated external routes within the OSPF domain –
Related – OSPF Cost Calculation
Network 10.1.1.0/24 will be redistributed on R3 into OSPF domain with seed metric (cost) of 20. This holds true for both E1 and E2 routes.
Now, when R2 needs to calculate metric/cost to network 10.1.1.0/24, E1 and E2 route cost computation will be different as illustrated –
For E1 Route Cost –
For E2 Route Cost –
In the same way, R1 will calculate E1 and E2 cost for Network 10.1.1.0/24 as –
For E2 Route Cost = 20
Are you preparing for your next interview?
Please check our e-store for e-book on OSPF Interview Q&A. All the e-books are in easy to understand PDF Format, explained with relevant Diagrams (where required) for better ease of understanding.