OSPF External E1 vs E2 Reference
Cheat sheet · https://pcornel.dk/topic.php?topic=241
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.
Remember
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.
First 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.
Verify in this order
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
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=241