IP Load Sharing
The IP route table can contain more than one path to a given destination. When this occurs, the Layer 3 device selects the path with the lowest cost as the path for forwarding traffic to the destination. If the IP route table contains more than one path to a destination and the paths each have the lowest cost, then the Layer 3 device uses IP load sharing to select a path to the destination.
IP load sharing uses a hashing algorithm based on the source IP address, destination IP address, and protocol field in the IP header, TCP, and UDP information. IP load sharing is also called "Equal-Cost Multi-Path (ECMP) load sharing or just ECMP.
The term "path" refers to the next-hop router to a destination, not to the entire route to a destination. Thus, when the software compares multiple equal-cost paths, the software is comparing paths that use different next-hop routers, with equal costs, to the same destination. In many contexts, the terms "route" and "path" mean the same thing. The term "path" is used in this section to refer to an individual next-hop router to a destination, while the term "route" refers collectively to the multiple paths to the destination. Load sharing applies when the IP route table contains multiple, equal-cost paths to a destination.
IP load sharing applies to equal-cost paths in the IP route table. Routes that are eligible for load sharing can enter the routing table from any of the following routing protocols:
Administrative Distance for Each IP Route
The administrative distance is a unique value associated with each type (source) of IP route. Each path has an administrative distance. The administrative distance is not used when performing IP load sharing, but the administrative distance is used when evaluating multiple equal-cost paths to the same destination from different sources, such as between static IP routes, OSPF, and BGP4.
The value of the administrative distance is determined by the source of the route. The Layer 3 device is configured with a unique administrative distance value for each IP route source.
When the software receives multiple paths to the same destination and the paths are from different sources, the software compares the administrative distances of the paths and selects the path with the lowest administrative distance. The software then places the path with the lowest administrative distance in the IP route table. For example, if the Layer 3 switch has a path learned from OSPF and a path learned from IBGP for a given destination, only the path with the lower administrative distance enters the IP route table.
Here are the default administrative distances on the RUCKUS Layer 3 device:
- Directly connected: 0 (this value is not configurable)
- Static IP route: 1 (applies to all static routes, including default routes and default network routes)
- Exterior Border Gateway Protocol (EBGP): 20
- OSPF: 110
- Interior Gateway Protocol (IBGP): 200
- Local BGP: 200
- Unknown: 255 (the router will not use this route)
Lower administrative distances are preferred over higher distances. For example, if the router receives routes for the same network from OSPF and from IBGP, the router will prefer the OSPF route by default.
Because the software selects only the path with the lowest administrative distance, and the administrative distance is determined by the path source. IP load sharing applies only when the IP route table contains multiple paths to the same destination, from the same IP route source.
IP load sharing does not apply to paths that come from different sources.
Path Cost
The cost parameter provides a common basis of comparison for selecting from among multiple paths to a given destination. Each path in the IP route table has a cost. When the IP route table contains multiple paths to a destination, the Layer 3 switch chooses the path with the lowest cost. When the IP route table contains more than one path with the lowest cost to a destination, the Layer 3 switch uses IP load sharing to select one of the lowest-cost paths.
The source of a path cost value depends on the source of the path:
- IP static route: The value you assign to the metric parameter when you configure the route. The default metric is 1.
- OSPF: The Path Cost associated with the path. The paths can come from any combination of inter-area, intra-area, and external Link State Advertisements (LSAs).
- BGP4: The path Multi-Exit Discriminator (MED) value.
Static Route, OSPF, and BGP4 Load Sharing
IP load sharing and load sharing for BGP4 routes are individually configured. Multiple equal-cost paths for a destination can enter the IP route table only if the source of the paths is configured to support multiple equal-cost paths. For example, if BGP4 allows only one path with a given cost for a given destination, the BGP4 route table cannot contain equal-cost paths to the destination. Consequently, the IP route table will not receive multiple equal-cost paths from BGP4.
The load sharing state for all the route sources is based on the state of IP load sharing. Since IP load sharing is enabled by default on all RUCKUS Layer 3 devices, load sharing for static IP routes, OSPF routes, and BGP4 routes also is enabled by default.
In the following table, the default and the maximum number of paths for a static IP route and OSPF depend on the value for IP load sharing, and are not separately configurable.
Default Load Sharing Parameters for Route Sources
Route Source |
Default Maximum Number of Paths |
Maximum Number of Paths |
||
|---|---|---|---|---|
Static IP route |
4 |
8 |
32 |
|
OSPF |
4 |
8 |
32 |
|
BGP4 |
1 |
4 |
32 |
|
Default Load Sharing Parameters for Route Sources for ICX 8200 Devices
|
Route Source |
Default Maximum Number of Paths |
Maximum Number of Paths |
|
|---|---|---|---|
|
Static IP route |
4 |
8 |
|
|
OSPF |
4 |
8 |
|