Feature Explorer AI AI

×

Subscribe now to get the Latest Updates

Watch a 2-minute overview video

User-defined flex hashing for MPLS traffic flows

More Information:

User-defined flex hashing for MPLS traffic flows

We can configure user-defined flex hashing to load-balance MPLS traffic based on TCP or UDP source and destination port information. User-defined flex hashing, which supports protocol versions IPv4 and IPv6, enables you to set byte offsets in packet headers to influence hashing computation. We specify two offsets, each 2 bytes in length, from the first 128 bytes of a packet. You can configure the selected bytes to be directly used for hashing or to be used only when the data pattern in these bytes matches specific values (conditional match). To provide load balancing in spine layers, configure flex hashing and encapsulate the traffic in VXLAN, thus enabling entropy at UDP source ports. At de-encapsulation, configure the no-inner-payload statement to load-balance based on the outer UDP header.

To configure user-defined flex hashing:
set forwarding-options enhanced-hash-key flex-hashing name ethtype mpls num-labels num_labels hash-offset offset1 base-offset1 offset1-value offset1_value offset1-mask offset1_mask offset2 base-offset2 offset2-value offset2_value offset2-mask offset2_mask

To configure a conditional match (repeat the following command with values for offsets and match data 2-4):
set forwarding-options enhanced-hash-key conditional-match name offset1 base-offset1 offset1-value offset1_value offset1-mask offset1_mask matchdata1 matchdata1 matchdata1-mask matchdata1-mask

To enable load balancing on VXLAN transit traffic based on the outer UDP header:
set forwarding-options enhanced-hash-key vxlan no-inner-payload

To troubleshoot, use the show forwarding-options enhanced-hash-key command.

Limitations:

Product / Application Software Introduced Release
QFX5210-64C Junos OS 20.4R1