Metrics, ECMP & Load Balancing
Read this concept as one more decision made about a packet in flight. The widget below lets you change the inputs and watch the consequence instead of memorising the rule.
Why it matters
When several paths reach the same prefix, a router needs a rule to choose one or to share traffic across several. That choice determines latency, loss, and how predictable the path looks to an observer.
On the wire
OSPF uses a cost derived from interface bandwidth, RIP uses hop count, and BGP compares a sequence of attributes before installing a next hop. ECMP installs multiple equal-cost next hops and hashes on a tuple such as source, destination, and ports so a flow stays on one path.
When it breaks
A hash that includes changing ephemeral ports can reorder packets within a flow when the set of next hops changes. Unequal link capacities treated as equal costs overload the slower path, and a single link failure silently shifts all its flows onto the remaining paths.
Forwarding lookup
Pick a destination, then click table rows to disable a route and watch longest-prefix matching react.
| Prefix | Next hop | Metric | State |
|---|---|---|---|
| 0.0.0.0/0 | 100 | matches | |
| 203.0.113.0/24 | 10 | no match | |
| 203.0.113.0/24 | 10 | no match |
Flow hash input
0.0.0.0/0 wins with /0: Fallback default route.