Cannot set NIC speed/duplex permanently?

rbach

Member
Aug 21, 2020
3
0
6
46
I have some issues with periodic network dropouts on one of my VM's... And based on my 20+ experience ensuring that the physical NIC runs as fixated speed/duplex is often a good way ensure network stability.

On proxmox host:
Edited /etc/network/interfaces and added 1 line to set it with ethtool.

iface eno1 inet manual
pre-up /usr/sbin/ethtool -s eno1 speed 1000 duplex full autoneg off


However after a reboot it doesn't seem to have effect.
Running ethtool eno1 shows that advertisted link modes is all.
If I manually run ethtool -s eno1 speed 1000 duplex full autoneg off and look at ethtool eno1 it only reports advertised link mode 1000baseT/Full.

What am I missing here???


root@proxmox01:~# ethtool eno1
Settings for eno1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
 
pre-up /usr/sbin/ethtool -s eno1 speed 1000 duplex full autoneg off
on a hunch and without having tested it - does it work if you change pre-up to post-up? (if you set the settings before activating the link it could be that they are reset to default)

I hope this helps!
 
No, changing it to post-up doesn't work either.?

This must be totally basic configuration... I mean fixating speed/duplex on a NIC.
Who knows how to do it on Proxmox?
 
Well... I ended up using crontab instead to ensure it gets set during reboot:

I'd edit root's crontab (crontab -e) and add them via: @reboot /path/to/script
 

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!