0

I have just upgraded to Rocky Linux 9 and haven't been able to set the nic bond Transmit Hash Policy to 1. I'm using NetworlManager rather than the ifcfg files which is used by default in EL9.

I have tried the following steps: #sysctl -w net.ipv4.fib_multipath_hash_policy=1 #cat /proc/net/bonding/nm-bond | grep Hash Transmit Hash Policy: layer2 (0)

Also: #echo 1 > /proc/sys/net/ipv4/fib_multipath_hash_policy #cat /proc/net/bonding/nm-bond | grep Hash Transmit Hash Policy: layer2 (0)

Also: #nano -w /etc/sysctl.d/99-sysctl.conf Then added: net.ipv4.fib_multipath_hash_policy=1 And rebooted Regardless It seems ot be stuck at Layer2 (0)

But I do get is working with: #echo 1 > /sys/class/net/nm-bond/bonding/xmit_hash_policy

cat /proc/net/bonding/nm-bond | grep Hash

Transmit Hash Policy: layer3+4 (1) However, the setting isn't persistent through reboots.

What is the proper way to do this in EL9?

Thank you

Steven Lutz
  • 101
  • 2

1 Answers1

0
nmcli conn mod nm-bond +bond.options xmit_hash_policy=layer3+4
Tomek
  • 3,390
  • 1
  • 16
  • 10
  • I tried that with the response: ]# nmcli conn mod nm-bond bond.options xmit_hash_policy=Layer2+3 Error: unknown connection 'nm-bond'. so I i tried ]# nmcli con modify Bond\ connection\ 1 bond.options xmit_hash_policy=Layer2+3 Error: failed to modify bond.options: failed to set bond option "xmit_hash_policy". – Steven Lutz Jan 06 '23 at 22:14
  • `xmit_hash_policy` is only applicable in `balance-xor`, `802.3ad` and `tlb` bonding modes. Have you set mode to one of these? Please have a look at `bonding.rst` in `kernel-doc` rpm for more info. – Tomek Jan 07 '23 at 15:59
  • Yes, the mode was set to 4 / 802.3ad already. The answer that worked for me was posted on the Rocky Foums: nmcli con modify Bond\ connection\ 1 +bond.options "xmit_hash_policy=1" https://forums.rockylinux.org/t/bond-hash-policy-persistence-issue-in-rl-9-1/8459 – Steven Lutz Jan 08 '23 at 01:02
  • Ok, I understand what happened. The command I proposed would remove the setting for bonding mode, hence the error. I've updated the answer. – Tomek Jan 08 '23 at 14:31