How to persist ethtool settings through reboot on debian 8
Hello how can i persist the following setting through reboot on a debian 8?
ethtool -K eth0 lro off
ethtool -K eth1 lro off
I already have try to add it under /etc/network/interfaces.d/ifcfg-bond0 with the following option:
ETHTOOL_OPTIONS='-K eth0 lro off'
ETHTOOL_OPTIONS='-K eth1 lro off'
But this doesn't work. Can somebody help me please?
Solution 1:
Multiple possibilities come to mind:
-
Put the lines into
/etc/network/interfaces
(or whatever file you're using underneathinterfaces.d
:iface eth0 inet static [...] post-up /sbin/ethtool -K eth0 lro off post-up /sbin/ethtool -K eth1 lro off
(Actually maybe this is the most appropriate place, because it keeps network settings in one place.)
-
Put the lines into
/etc/rc.local
, which is executed during startup, beforeexit 0
at the bottom:[...] /sbin/ethtool -K eth0 lro off && /sbin/ethtool -K eth1 lro off exit 0
-
Put these lines into the
crontab
of a user which is able to run the commands, edit it viacrontab -e
:[...] @reboot /sbin/ethtool -K eth0 lro off && /sbin/ethtool -K eth1 lro off [...]