How to persist ethtool across reboots

wilcomir

New Member
Oct 16, 2022
15
1
3
Hello,

I have a couple of ethtool settings I want to persist across reboots. I have searched on this forum, and it seems that the common suggested method is to edit the /etc/network/interfaces file; the problem with that is that the file contains a big disclaimer explaining that you should not manually edit it.

I know that I can put something together with cron, but to be honest I'd prefer the network settings to be all in one place.

Is there a "correct" method to implement this?

Thanks!
V
 
I have searched on this forum, and it seems that the common suggested method is to edit the /etc/network/interfaces file; the problem with that is that the file contains a big disclaimer explaining that you should not manually edit it.

And on your search, you did not came along on one single of the existing suggestions for this method from one of the Proxmox staff members; e.g.: [1-10]?
I mean, if you would have, from whom exactly would you expect an answer now, that is more trustworthy as from the Proxmox developers themselves? ;)

Debian (the OS/distribution on which all Proxmox products are based on) also proposes this method in their wiki:
https://wiki.debian.org/NetworkConfiguration#Setting_the_speed_and_duplex

[1] https://forum.proxmox.com/threads/help-eno1-detected-hardware-unit-hang.117305/post-507532
[2] https://forum.proxmox.com/threads/still-errors-e1000.111448/post-480959
[3] https://forum.proxmox.com/threads/still-errors-e1000.111448/post-480483
[4] https://forum.proxmox.com/threads/proxmox-vms-no-route-to-host.110572/post-477383
[5] https://forum.proxmox.com/threads/trap-error-on-e1000-network-adapter.105758/post-456836
[6] https://forum.proxmox.com/threads/trap-error-on-e1000-network-adapter.105758/post-456790
[7] https://forum.proxmox.com/threads/eno1-detected-hardware-unit-hang.101825/post-439000
[8] https://forum.proxmox.com/threads/p...detected-hardware-unit-hang.95450/post-414247
[9] https://forum.proxmox.com/threads/e1000e-reset-adapter-unexpectedly.87769/post-384609
[10] https://forum.proxmox.com/threads/e1000-driver-hang.58284/post-302307
 
Hello Neobin,

thanks for taking your time compiling this list. I am afraid I was not able to correctly convey my point though, which is that the
/etc/network/interfaces file contains a disclaimer about _not_ editing it. This file is auto generated, and if I change something on the GUI I want my settings to be preserved.
The disclaimer suggests to use source or source-directories directives to do so, but as you have graciously demonstrated, this is not reflected in several threads as the common suggestion is just to edit the file and be done with it.

On top of that, with PVE 8.0 there have been some changes in the SDN portion of the release, and I am not sure whether the correct method should now change.

From my perspective, either I do not understand fully the disclaimer, or the disclaimer is outdated/not precise. There might be other option that do not come to mind, of course.

Cheers,
V
 
Network changes made through the webui are done by merging (adding/removing/re-adding) only the corresponding line(s). (You can see this in the preview field that comes up when you made an change/edit and before you actually apply the new configuration.) So, this should not interfere with other lines like e.g.: post-up.

The PVE documentation also states:
If you made manual changes directly to the /etc/network/interfaces file, you can apply them by running ifreload -a
https://pve.proxmox.com/wiki/Network_Configuration#_apply_network_changes
and also advises this method:
https://pve.proxmox.com/wiki/Network_Configuration#sysadmin_network_routed
https://pve.proxmox.com/wiki/Network_Configuration#sysadmin_network_masquerading

I have no experience with SDN in PVE (yet), but looks like its configuration is (at least partly/mainly) stored in separate files under: /etc/network/interfaces.d/:
https://pve.proxmox.com/wiki/Software_Defined_Network


But, I fully get why you might want to wait for a up-to-date clear answer on this from someone with way more insight to all of this than me. :)
 
Thanks for the additional insights;

I am happy that we are on the same page now - I fully agree that there is a mostly clear path forward here, but it seems to me this is just a tiny hole in the documentation. Editing the interfaces file is not something that one does on a daily basis, so even if the changes are overwritten, some kind of manual intervention is - in my opinion - acceptable.

All of that said, yes, let's see if I get an "official" answer here - as an example what you say about non interference with post-up statements is my expectation as well, but it is not confirmed anywhere I looked, nor in the disclaimer at the beginning of the file.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!