OSPF External Metric Types
When an external route is redistributed into OSPF, it becomes an external route, which can be designated as either type 1 (E1) or type 2 (E2).
-
Metric Type E1 (External Type 1):
- The cost of an E1 route is the sum of the external cost (the seed metric set at the ASBR) and the internal OSPF cost to reach that ASBR.
- This means the cost to reach the external destination is cumulative, with each internal link to the ASBR being factored into the path selection.
- Use Case: E1 routes are useful when you want OSPF to find the best overall path, considering both the cost to the gateway to the external network and the internal network links.
-
Metric Type E2 (External Type 2):
- The cost of an E2 route is fixed and only includes the external cost, ignoring the internal cost to reach the ASBR.
- Every OSPF router in the domain will see the same metric cost for the external network, regardless of their distance to the ASBR.
- Use Case: E2 routes are often used in active/passive setups where you want a primary exit point to always be preferred. By setting a higher, fixed seed metric on a secondary ASBR, the E2 metric will ensure the primary exit is always chosen.