Octet

What is the difference between E1 and E2 external routes, and which is the default?

Show the answer

Say this first

E2 is the default. Its metric is only the external cost set at the ASBR, the same on every router, so it ignores how far away the ASBR is. E1 adds the internal cost to reach the ASBR, so it picks the closest exit. An E1 route always beats an E2 route for the same prefix, whatever the numbers.

Go deeper

Defaults on IOS

  • Redistributed routes get metric type 2 and seed metric 20.
  • Routes redistributed from BGP get seed metric 1.
  • default-information originate produces an E2 default with metric 1.

Tie breaking inside E2

With two ASBRs advertising the same E2 prefix with the same metric, routers compare the forward metric, the internal cost to each ASBR, and pick the lower one. So E2 is not totally blind, it just shows the same number in the routing table.

Choosing

Cisco IOS
router ospf 1
 redistribute static metric 50 metric-type 1
  • E1 when there are several exits and each router should use the nearest one.
  • E2 when there is one exit, or when the external cost should dominate, for example to keep a backup ISP exit as backup with a higher external metric.

In the routing table

Output
O E1     198.51.100.0/24 [110/52] via 10.0.12.2, 00:02:11, GigabitEthernet0/0/0
O E2     203.0.113.0/24 [110/20] via 10.0.12.2, 00:02:11, GigabitEthernet0/0/0

The E1 route shows 50 plus an internal cost of 2. The E2 route shows only its seed metric.

Traps

  • Saying E2 routes are compared by metric only. Equal E2 metrics fall back to the cost to the ASBR.
  • Thinking a low E2 metric beats an E1 route. Type 1 externals always win over Type 2.
How did you do?