Metrics and ECMP
Metrics and ECMP
This domain tests cost manipulation and equal-cost multipath. Expect questions on where the metric is set, what the default is, and when ECMP does not happen.
Core rules
- The OSPF interface metric is configured under the interface with
metricin SR OS; it is not derived from bandwidth automatically. The default is 10, so all links look equal until you change it. Verify the value inshow router ospf interface. - Costs are 16-bit and additive along the path; the path with the lowest total wins.
- ECMP installs multiple next hops when costs are exactly equal. SR OS caps this with OSPF
max-ecmp-routesand the router-level ECMP setting; the effective limit is the lower of the two. - ECMP normally requires equal cost and the same route type and source area; a type 1 and a type 2 external with the same numeric metric are not automatically equal.
- Reference bandwidth or manual metrics should be consistent across the area, or suboptimal paths appear.
Worked example
Three parallel point-to-point links between R1 and R2 each carry metric 10. With max-ecmp-routes 2 only two next hops install; setting it to 3 gives three. If one link is left at the default 10 and the others are set to 5, the 5-cost links form an ECMP pair and the 10-cost link is unused.
Traps that cost marks
- Assuming SR OS auto-costs by bandwidth - it does not; the default metric is 10.
- Setting
max-ecmp-routesabove the router ECMP limit and expecting more paths. - Mixing external type 1 and type 2 and expecting ECMP.
- Changing the metric on one side of a link only; both directions need consistent design.