Dev.to
7/21/2026

The original title is: "ECMP Explained: Two Equal Paths, and the Kernel Hashes Flows Across Them"
Original: ECMP Explained: Two Equal Paths, and the Kernel Hashes Flows Across Them
Short summary
A hands-on Protocol Lab tutorial covering ECMP (equal-cost multipath) using containerlab and FRR. Two routers connected by parallel links demonstrate how Linux's fib_multipath_hash_policy determines flow distribution: L3 hashing (default) sends all same-src/dst-IP flows to one link, while L4 hashing splits them evenly. The lab includes topology, configs, RFC references, and verification commands.
- •ECMP keeps multiple equal-cost paths and hashes flows across them rather than picking one
- •L3 hashing (default) causes all same-src/dst flows to land on one link; L4 hashing distributes evenly
- •Lab uses containerlab with FRR and iperf3 to demonstrate the behavior with reproducible configs
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



