Category Archives: Redistribution

Redistribution to OSPF.

To inject the route, the autonomous System Border Router (ASBR), which is by definition a router that connects to a non-OSPF routing domain, uses the¬†redistribute¬†command. The redistribute command, which might be more descriptively named the “get-routes-from-elsewhere” command, pulls routes into OSPF. To represent those routes, OSPF often times creates a type 5 LSA. (In other cases, a type 7 is created; that happens when the area is an NSSA area. More maybe on that before we’re done.)

Type 5 LSAs come in 2 types, or metric types: External type 1 and type 2 (default). I’ll touch on the simpler type 2 today.

LSA type 5, metric type 2 (often called external 2 or external type 2 to avoid confusion with the LSA types) is:

  • Created by the ASBR
  • LSA contains the metric as dictated by the ASBR
  • Flooded by ABR’s to other normal (non-stubby) OSPF areas
  • The flooding process does not change the metric in the type 5 LSA
  • Routers choose “best” route based on the metric in the ASBR; the OSPF cost calculation ignores the costs inside the OSPF domain, instead using only the cost listed in the type 5 LSAs.

To create an “E1” (OSPF type 5, external metric type 1) LSA, the router injecting the LSA into OSPF – the ASBR – must override the default of E2, specifically choosing to inject the route as an E1. When making the route an E1, the rules are similar to E2, with one big difference: In addition to the external metric, the OSPF costs (internal metric) are considered when calculating the metric for each possible route. Summarizing the rules:

Type 5 LSA is created by the ASBR
Type 5 LSA contains the metric as dictated by the ASBR
Type 5 LSA is flooded by ABR’s to other normal (non-stubby) OSPF areas
The flooding process does not change the metric in the type 5 LSA
When flooding into another normal area, the ABR injects a type 4 LSA
Routers choose “best” route based on the metric in the type 5 LSA, PLUS the OSPF cost from the router to the ASBR.
Of these points, the first 5 are true about both E1 and E2 routes. The last point is the part that’s unique to E1 routes, and the part that needs some discussion.

In summary of the above post, The E2 has a metric of 20 and ignore calculating the cost inside the OSPF domain. E2 route metric will always remain constant.

Note: If a metric is not specified, OSPF puts a default value of 20 when redistributing routes from all protocols except Border Gateway Protocol (BGP) routes, which get a metric of 1.

While E1 override the default E2, means routers choose “best” route based on the metric in the type 5 LSA, PLUS the OSPF cost from the router to the ASBR. Oder definition of it is E1 has a default metric of 20 too but routes increases metrics with every hop.

https://www.networkworld.com/article/2233586/cisco-subnet/fun-with-ospf-type-5-lsas.html
https://www.networkworld.com/article/2233671/cisco-subnet/fun-with-ospf-lsa-type-5–external-type-1.html#tk.drr_mlt
https://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8606-redist.html
https://learningnetwork.cisco.com/thread/55532

Advertisements