Equal Cost Multiple Paths (ECMP)
Different protocols should not be configured with the same
preference; if this occurs the tiebreaker is per the default
preference.
If multiple routes are learned with an identical preference using the
same protocol, the lowest cost route is used.
If multiple routes are learned with an identical preference using the
same protocol, and the costs (metrics) are equal, the decision of
what route to use is determined by the configuration of the ECMP.
ECMP is a routing technique for routing packets along multiple paths
of equal cost.
ECMP enables packet routing along multiple paths with equal cost and ensures load balancing.
ECMP not enabled:-
2 Paths are available from router R1 to router R4, with equal costs.
The IGP Shortest Path First (SPF) algorithm normally uses a tiebreaker
rule to select either router R2 or router R3 as the next-hop
(On ALU Service Router this is the lowest next-hop IP address).
Redundant paths may exist in the network between any traffic source and destination points.
If the total IGP cost of getting to a certain destination from a certain source happens to be the same for different
paths, those paths are referred to as Equal Cost Multiple Paths (ECMP).
In the example above, router R1 has 2 equal cost multiple paths to reach router R4, with an overall path cost of 200.
The standard Shortest Path First (SPF) implementation dictates the selection of a single path to a certain destination.
A tie-breaker rule has to be used in the case of multiple paths sharing the same total cost value.
On the ALU Service Routers, the tie-breaker states that the path with the lowest next-hop directly connected
interface address be used as the active path on the data plane.
A:R1# show router route-table
=====================================================
Prefix Protocol Metric
NextHop
-------------------------------------------------------
10.10.10.4/32 OSPF 200
10.1.2.2 (toR2)
The above example shows that, for packets sent from router R1 to router R4 with no ECMP, router R2 is the OSPF
next-hop for router R1, as indicated by the routing table.
Enabling ECMP
Configured at a global level for all applicable protocols (OSPF, IS-IS,
RIP).
A maximum of 16 ECMP routes can be configured.
All ECMP routes must have been learned from the same routing
protocol (same preference).
Multiple next-hops are installed in the routing table for the same
prefix, if the total end-to-end costs are equal.
*A:R1# configure router ecmp ?
- ecmp <max-ecmp-routes>
- no ecmp
<max-ecmp-routes> : [0..16]
ECMP can be enabled to optimize the use of network resources in such applicable scenarios.
When enabled, ECMP is applicable for all the active IGP protocols (OSPF, IS-IS, RIP).
Note that the candidate paths must be identical; that is, they must have the same cost values as well as the same
preference values if they are to be used for ECMP. This implies that all the ECMP routes must be offered by the same
IGP protocol.
By default, OSPF has a protocol preference of 10 and IS-IS has a preference of 15 (for Level 1 routes) and 18 (for
Level 2 routes). It is possible to modify the default preference values, if required.
The route with the lower preference value is preferred.
NOTE: If OSPF and IS-IS are running at the same time and provide a common route, and if both protocols are
configured to use the same preference value by the administrator, the OSPF route is used by the router, according to
the current Service Router implementation.
When ECMP is active, multiple next-hops may be installed in the routing table.
NOTE: Due to its limitations, RIP is not used in today’s IP/MPLS networks. RIP is just mentioned for the sake of
completeness.
When ECMP is enabled, the routing table of router R1 contains 2 entries for prefix 10.10.10.4/32, with both routers
R2 and R3 set as active IP next-hops.
This allows router R1 to distribute the incoming traffic flows over the 2 active links.
Traffic distribution across the equal-cost paths is as follows:
1. Packet-based in a round-robin fashion. This approach can easily cause out-of-order packets.
2. Flow-based using hashing on source and destination. This approach will depend upon the number and
distribution of flows.
A traffic “flow” can be generally defined as the data activity between a certain source and destination pair.
An internal hashing algorithm distributes the traffic flows across the 2 links in a load balancing fashion.
NOTE: Load balancing decisions on a per-packet basis is not implemented on the ALU Service Routers because sending
different packets that belong to the same flow on different links can potentially create sequencing problems at the
receiving end, if the delay characteristics on those different links are variational.
No comments:
Post a Comment