Only TCP/UDP port load balancing

Hi, is there a way to do ECMP load balancing based only on the transportation header ports? I don’t want to consider the 5-tuple flow (addrs, proto, ports), just the ports.

This is not what I would call a “Beginner Basics” question.

The only thing I can think of off hand is the LACP layer 2 hash algorithm, but I think the best you can do is XOR between the last bit of the IP address and port number. Not perfectly random, but it works pretty good in the layer 2 link aggregation world.

Not with ECMP I believe, but something similar can be achieved by using https://wiki.mikrotik.com/wiki/Manual:PCC