Route selection on 2 similar routes?

vyos-1-2

#1

Hey,

Can someone tell me what is the expected behaviour if a VyOS Router has 2 routes to the same destination installed?
They both have exactly the same preferences (distance, metric).

vyos@vyos:~$ show ip route 0.0.0.0/0
Routing entry for 0.0.0.0/0
  Known via "static", distance 1, metric 0, best
  Last update 09:54:07 ago
  * 172.0.0.25, via eth2.27
  * 172.0.0.41, via eth2.26

I somehow try to understand the final route selection.


#2

Hi Mr_Funken!

take a look at : https://cumulusnetworks.com/blog/celebrating-ecmp-part-two/

The new options are not yet implemented into the cli, but to change behavior you actually could change sysctrl yourself :slight_smile:


#3

Thanks for the link :slight_smile:

What did you mean with that the “new” options are not yet implemented?
I didn’t know of ANY options related to ECMP in VyOS. Or did I missed something?


#4

The linux kernel that vyos 1.2.0 is using (4.19) have configurable options to enable L3/L4 load balancing, these options is in the kernel, but are not at the moment configurable for the user in the cli :slight_smile: more info about these options is found in the cumulus paper linked above


#5

Sry for asking you so many questions :x

Do I understand it right, that ECMP is already enabled by default and I can switch between the L3 and L4 hash mode by setting sysctl -w net.ipv4.fib_multipath_hash_policy=1 ?


#6

Ahh… sorry, options for activating Layer4 hashing is actually implemeneted into the cli now.
Enable these settings to activate it:

set system ip multipath layer4-hashing
set system ipv6 multipath layer4-hashing

And, yes L3 ECMP is enabled by default :slight_smile: