The ECMP hash algorithm requires the opaque value of the FEC (see ECMP Hash Algorithm) and is based on RFC 6388 section 2.4.1.1.
The candidate upstream LSRs are numbered from lower to higher IP addresses.
The following hash is performed: H = (CRC32 (Opaque Value)) modulo N, where N is the number of upstream LSRs. The ‟Opaque Value” is the field identified in the FEC element after ‟Opaque Length”. The ‟Opaque Length” indicates the size of the opaque value used in this calculation.
The selected upstream LSR U is the LSR that has the number H above.