× NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Orbi WiFi 7 RBE973
Reply

LAG Configuration: which hash mode to use for linux bond.

robfantini
Aspirant

LAG Configuration: which hash mode to use for linux bond.

Hello   I've got lAG working with a few nodes in our proxmox cluster.

 

/etc/network/interfaces  use this per proxmox wiki suggestion:

auto bond0
iface bond0 inet manual
       slaves eth0 eth1
       bond_miimon 100
       bond_mode 802.3ad
       bond_xmit_hash_policy layer2+3


auto vmbr0
iface vmbr0 inet static
        address 10.1.10.8
        netmask 255.255.255.0
        gateway 10.1.10.1
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0

My question is which  'hash mode' should I use on the switch.

 

Currently this is used , i think it is the default:   3 Src/Dest MAC, VLAN, EType, incoming port

Model: GSM7352Sv2|ProSAFE 48-port Managed L3 Gigabit Stackable Switch
Message 1 of 4

Accepted Solutions
LaurentMa
NETGEAR Expert

Re: LAG Configuration: which hash mode to use for linux bond.

Hi robfantini

 

You are using a NETGEAR Fully Managed Switch since you see default LAG hashmode 3 Src/Dest MAC, VLAN, EType, incoming port.

 

This is good news, Fully Managed Switches offer seven different, selectable hashmodes with Layer 2 (MAC), Layer 3 (IP), Layer 4 (TCP/UDP) source and destination parsing combinations, for maximum interop and performance.

 

Smart Managed Switches instead offer fixed Layer 2 (MAC) destination parsing only for packets entering the LAG.

 

You show bond_xmit_hash_policy layer2+3 in your proxmox cluster configuration file for bond0 LAG interface. I am almost sure it is LACP based and using source and destination hashing algorithm, so based on MAC and IP sources and destinations.  

 

First, please make sure your LAG is using LACP, so with Static Mode = Disabled (it is by default Disabled on Fully Managed Switches, so LACP is used by defaut). But please check.

 

Second, with current proxmox configuration, you should stay with default 3 Src/Dest MAC, VLAN, EType, incoming port algorithm, it will work OK and this is our most "compatible" mode.

 

If your proxmox can support bond_xmit_hash_policy layer3+4 instead, it would be even better with our switch LAG configured with 6 Src/Dest IP and TCP/UDP Port fields algorithm instead. This would bring to even better performance for hashing, and maximum interoperability this time.

 

Capture.PNG

 

Let us know how it goes!

Regards,

View solution in original post

Message 2 of 4

All Replies
LaurentMa
NETGEAR Expert

Re: LAG Configuration: which hash mode to use for linux bond.

Hi robfantini

 

You are using a NETGEAR Fully Managed Switch since you see default LAG hashmode 3 Src/Dest MAC, VLAN, EType, incoming port.

 

This is good news, Fully Managed Switches offer seven different, selectable hashmodes with Layer 2 (MAC), Layer 3 (IP), Layer 4 (TCP/UDP) source and destination parsing combinations, for maximum interop and performance.

 

Smart Managed Switches instead offer fixed Layer 2 (MAC) destination parsing only for packets entering the LAG.

 

You show bond_xmit_hash_policy layer2+3 in your proxmox cluster configuration file for bond0 LAG interface. I am almost sure it is LACP based and using source and destination hashing algorithm, so based on MAC and IP sources and destinations.  

 

First, please make sure your LAG is using LACP, so with Static Mode = Disabled (it is by default Disabled on Fully Managed Switches, so LACP is used by defaut). But please check.

 

Second, with current proxmox configuration, you should stay with default 3 Src/Dest MAC, VLAN, EType, incoming port algorithm, it will work OK and this is our most "compatible" mode.

 

If your proxmox can support bond_xmit_hash_policy layer3+4 instead, it would be even better with our switch LAG configured with 6 Src/Dest IP and TCP/UDP Port fields algorithm instead. This would bring to even better performance for hashing, and maximum interoperability this time.

 

Capture.PNG

 

Let us know how it goes!

Regards,

Message 2 of 4
robfantini
Aspirant

Re: LAG Configuration: which hash mode to use for linux bond.

thank you for the fast response.  It is good to know that the default is OK to use.

 

'Static Mode'  is disabled on all lags.  that must be the default since I did not adjust.

 

thanks for your suggestion on layer3+4 .   I'll try using on a node with the suggested settings.

Message 3 of 4
robfantini
Aspirant

Re: LAG Configuration: which hash mode to use for linux bond.

re: "You show bond_xmit_hash_policy layer2+3 in your proxmox cluster configuration file for bond0 LAG interface. I am almost sure it is LACP based and using source and destination hashing algorithm, so based on MAC and IP sources and destinations. "

 

you are of course correct about LACP   per  https://www.kernel.org/doc/Documentation/networking/bonding.txt:

 

"

layer2+3

		This policy uses a combination of layer2 and layer3
		protocol information to generate the hash 
.. 
		This algorithm is 802.3ad compliant.

::

Message 4 of 4
Top Contributors
Discussion stats
  • 3 replies
  • 24486 views
  • 2 kudos
  • 2 in conversation
Announcements