ip load-sharing
Syntax
ip load-sharing
2 - 4
no ip load-sharing
2 - 4
Description
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.
Specifiers
2 - 4
-
Specifies the maximum number of equal-cost next-hop paths the router allows.
Default: Enabled with four equal-cost, next-hop routes allowed
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 are used for traffic that could otherwise be load-shared across multiple routes.
Disabling load-sharing means that router "1" selects only one next-hop router for traffic that is actually eligible for load-sharing through different next-hop routers.
In the default configuration, load-sharing is enabled by default for both IPv4 and IPv6. However, it has no effect unless routing and OSPF are enabled.
Example
In the figure, 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. The ECMP inter-area routes to destination network 2001:db8:0:e::/64 consist of the following next-hop gateway addresses:
-
2001:db8:0:b::b:101
-
2001:db8:0:c::c:101
-
2001:db8:0:d::d:101
However, the forwarding software distributes traffic across the three possible next-hop routes in such a way that all traffic for a specific host is sent to the same next-hop router.
As shown in the figure, one possible distribution of traffic to host devices is:
-
Traffic to host "A" passes through next-hop router "3"
-
Traffic to host "B" passes through next-hop router "2"
-
Traffic to host "C" passes through next-hop router "3"
-
Traffic to host "D" passes through next-hop router "4"
IP packet destination
Next hop used
2001:db8:0:e::100
2001:db8:0:b::b:10
2001:db8:0:e::110
2001:db8:0:c::c:20
2001:db8:0:e::120
2001:db8:0:b::b:10
2001:db8:0:e::130
2001:db8:0:d::d:30