How to persist ethtool settings through reboot on debian 8

7,957

Multiple possibilities come to mind:

  • Put the lines into /etc/network/interfaces (or whatever file you're using underneath interfaces.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, before exit 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 via crontab -e:

     [...]
     @reboot /sbin/ethtool -K eth0 lro off && /sbin/ethtool -K eth1 lro off
     [...]
    
Share:
7,957

Related videos on Youtube

pluto
Author by

pluto

Updated on September 18, 2022

Comments

  • pluto
    pluto almost 2 years

    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?

  • pluto
    pluto over 7 years
    The first point have worked for me I only change /usr/sbin/ethtool to /sbin/ethtool. Thank you for the solution
  • gxx
    gxx over 7 years
    @pluto Thanks for your comment, I've fixed the path. Sorry for the typo.