Enabling load sharing among next-hop routes

For more information, see OSPF equal-cost multipath (ECMP) for different subnets available through the same next-hop routes.


[no] ip load-sharing 2-4

When OSPF is enabled and multiple, equal-cost, next-hop routes are available for traffic destinations on different subnets, this feature, by default, enables load-sharing among up to four next-hop routes.

1 - 4 : Specifies the maximum number of equal-cost next-hop paths the router allows.

Default: 4; range: 2–4

The no form of the command disables this load-sharing so that only one route in a group of multiple, equal-cost, next-hop routes is used for traffic that could otherwise be load-shared across multiple routes.

For example, in Example of load-sharing traffic to different subnets through equal-cost next-hop routers, the next-hop routers "B", "C", and "D" are available for equal-cost load-sharing of eligible traffic. Disabling IP load-sharing means that router "A" selects only one next-hop router for traffic that is actually eligible for load-sharing through different next-hop routers.

Default: Enabled with four equal-cost, next-hop routes allowed.


This command enables or disables load-sharing for both IPv4 (OSPFv2) and IPv6 (OSPFv3) operation. For more information, see the IPv6 Configuration Guide for your switch.

In the default configuration, IP load-sharing is enabled by default. However, it has no effect unless IP routing and OSPF are enabled.