IP route sharing and the ECMP hardware table are introduced in IP Route Sharing and ECMP. The following sections provide guidelines for managing the ECMP hardware table:
The ECMP table contains gateway sets, and each gateway set defines the equal-cost gateways that lead to a destination subnet. When IP route sharing is enabled, subnet entries in the LPM table can be mapped to gateway set entries in the ECMP table, instead of to a single gateway within the LPM table.
For improved ECMP scaling, each LPM table entry points to a gateway set entry in the ECMP table. Each gateway set entry is unique and appears only once in the ECMP table.
Each gateway set entry for the platforms listed above is unique and appears only once in the ECMP table. Multiple LPM table entries can point to the same gateway set entry. This efficient use of the ECMP table creates more room in the ECMP table for additional gateway set entries. It also makes IP route sharing available to every entry in the LPM table.
The following command allows you to configure the maximum number of next-hop gateways for gateway sets in the ECMP table:configure iproute sharing max-gateways max_gateways
Each gateway entry in a gateway set consumes ECMP table space. As the max_gateways value decreases, the ECMP table supports more gateway sets. If you configure the max_gateways value to 32, the switch supports route sharing through up to 32 gateways per subnet, but supports the smallest number of gateway sets. If you do not need to support up to 32 different gateways for any subnet, you can decrease the max_gateways value to support more gateway sets.
To determine which gateways might be added to the ECMP table, consider how many local gateways are connected to the switch and can be used for ECMP, and consider the max_gateways value.
For example, suppose that you have four ECMP gateway candidates connected to the switch (labeled A, B, C, and D for this example) and the max_gateways option is set to 4. For platforms that allow a gateway set entry to support multiple subnets, this configuration could result in up to 11 gateway sets in the ECMP table: ABCD, ABC, ABD, ACD, BCD, AB, AC, AD, BC, BD, and CD.
If there are 4 gateways and you set max-gateways to 4, you can use the choose mathematical function to calculate the total number of gateway set possibilities as follows:
(4 choose 4) + (4 choose 3) + (4 choose 2) = 11
(TGW choose MGW) + (TGW choose MGW-1) + ... + (TGW choose 2) = TGWsets
In the formula above, TGW represents the total local gateways, MGW represents the max_gateways value, and TGWsets represents the total gateway sets needed to support all possible shared paths.
On ExtremeSwitching switches, an ECMP table-full condition produces the following message:
Noti:Card.IPv4FIB.ECMPTblFull Slot-1: IPv4 route can not use sharing on all its gateways. Hardware ECMP Table full. Packets are HW forwarded across a subset of gateways. (Logged at most once per hour.)