On rocky 9 i have a system with its network connections set through /etc/NetworkManager/system-connections/
When i manually edited the keyfile in this location directly nothing happens after reloading systemctl NetworkManger .
I want to be able to do this or find a file that i can change networking setting as I’ll then create a script in my kickstart to add static network info to loads of machines.
Currenly on rocky 8 it works as expected but with rocky 9 networking is different.
I added mtu=9000 on the keyfile and nothing happened after rebooting NetworkManager. I had to add it via
ip link set mtu 9000 dev ens192
But after reboot it went back to mtu 1500.
My standard install does only minimal. Kickstart is mainly inserting SSH key for root so that I can log in after install. Then I run ansible playbook that may use rhel-system-roles.network to configure network. https://access.redhat.com/articles/3050101
You should be trying to run nmcli con reload. That forces Network Manager to re-read connection profiles. Additionally, nmcli con down and then nmcli con up would help too.
Two other things. If you’re going to put mtu manually in your connection profiles, you need to put it under [ethernet]. Example.
Lastly, it’ll be better to use nmcli to do your work. Run nmcli con show and your interface name and look for mtu. You’ll find that it’s 802-3-ethernet.mtu. Running nmcli con mod NAME 802-3-ethernet.mtu would help you set the value.
As an aside, since you want to do this in a kickstart, you may want to review the RHEL 9 documentation linked in the post before mine to help you too.
might also do the trick (i.e. push new settings to kernel).
Seems redundant. The
nmcli con mod ens192 802-3-ethernet.mtu 9000
should ensure on its own that proper section of the correct file has the “mtu=9000”.
But, if proper section of the correct file already has the “mtu=9000” (via manual edit),
then you don’t need to write it with nmcli (again).