Member Selection with Resilient Hashing

Selection of a LAG member ports involves an indexed lookup into a “Flow Set” table based on a hash key generated from a hashing on packet fields. The selection of a member port involves the following steps:
  1. Selected packet fields > Hash key > Flow Set table index calculation > Member port from Flow set table
  2. The Flow Set table index calculation is the following: index = hash_key % N, where N equals the number of entries in the Flow Set table for this LAG
  3. The number of entries (N) in the Flow Set table for a LAG must be a power of 2. This is a hardware requirement.

Flow Set Table shows a possible assignment of Flow Set table entries to member ports where N (the number of entries in the Flow Set table) is four times M (the number of ports in the aggregator).

Table 1. Flow Set Table
Index Member
0 P_1
1 P_1
2 P_1
3 P_1
4 P_2
5 P_2
6 P_2
7 P_2
... ...
N-4 P_M
N-3 P_M
N-2 P_M
N-1 P_M

With Resilient hashing, even distribution is accomplished by software filling the Flow Set table with each member port occupying the same number of entries. The number of entries in the Flow Set table should be significantly larger than the number of ports in the aggregator. A large number of entries in the Flow Set table allows for more even distribution when the number of ports in the aggregator is not a power of 2.