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.
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 (126.96.36.199/32) behind "ASBR 1 " also cost is 1 (same as reach "ASBR1") and to reach to EIGRP route (188.8.131.52/32) 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.
In type 1, the equation is metric = redistribution metric + metric to reach external route.
For example in router F cost to reach EIGRP route (184.108.40.206) 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.
And now it's time for verification:
As you can see the sign before the 220.127.116.11 route changed to "E1."
And here is the detailed output. the forwarding metric changed to "101."
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.