ECMP is a capability of the underlying operating system. It can be achieved via equal-cost static routes independently of dynamic routing protocols. Still, the question arises whether the resulting load-sharing behavior is packet-based or flow-based.
The only ECMP-capable operating system I have tested is Linux (enable ECMP when compiling), which does per-flow balancing, unless forced to alter its behavior by the equalize flag of the IP utility.
Link-state protocols such as OSPF and IS-IS were designed to support ECMP, depending on the implementation. GateD is capable of ECMP; however, you must alter the MULTIPATH definition in the sources to enable this feature (see Example 9-22). In my GateD lab, ECMP is disabled.
./gated-public-3_6/src/gated/rt_table.h: /* * The number of multipath routes supported by the forwarding engine. */ #ifndef RT_N_MULTIPATH #define RT_N_MULTIPATH 6 #endif /* RT_N_MULTIPATH */
Zebra ospfd is capable of ECMP as well; isisd is not yet capable of ECMP. Including ECMP support has to be decided at compile time (configure --enable-multipath=6). It is highly recommended that you read the ECMP RFCs (RFC 2991 and RFC 2992) for a better grasp of this delicate matter.
Keep in mind that load balancing is done only on outbound traffic; be aware of what really resembles a flow when testing your setup, so as not to misjudge the behavior of a correct configuration! Example 9-23 shows an example combination of the ECMP-capable Linux kernel and the Zebra ospfd.
[root@callisto:~#] ip route 192.168.201.2 via 192.168.14.254 dev eth0 proto zebra metric 11 equalize 192.168.17.0/29 via 192.168.14.254 dev eth0 proto zebra metric 16 equalize 192.168.13.0/29 via 192.168.14.254 dev eth0 proto zebra metric 16 equalize 192.168.7.0/24 via 192.168.14.254 dev eth0 proto zebra metric 20 equalize 184.108.40.206/24 via 192.168.1.254 dev eth1 proto zebra metric 20 equalize 192.168.2.0/24 via 192.168.1.254 dev eth1 proto zebra metric 20 equalize 192.168.80.0/24 via 192.168.1.254 dev eth1 proto zebra metric 20 equalize 192.168.1.0/24 dev eth1 scope link 192.168.201.0/24 proto zebra metric 20 equalize nexthop via 192.168.14.254 dev eth0 weight 1 nexthop via 192.168.1.254 dev eth1 weight 1 192.168.14.0/24 dev eth0 scope link 192.168.44.0/24 via 192.168.1.254 dev eth1 proto zebra metric 20 equalize 192.168.45.0/24 via 192.168.1.254 dev eth1 proto zebra metric 20 equalize 127.0.0.0/8 dev lo scope link default via 192.168.1.254 dev eth1