How do I set network speed to 100Mbps?

    • OMV 4.x
    • How do I set network speed to 100Mbps?

      Hi there. Im using an Orange pi zero plus on my gigabit network and its connecting at the correct 1000Mbps speed. But Id like to set the speed to only 100Mbps for power saving reasons.

      If I SSH and :
      ethtool -s eth0 speed 100 duplex full autoneg off

      It sets it to the 100Mbps I want, but as you know; on reboot the nas will reconnect at 1000Mbps. How can I permanently set the eth0 speed to 100Mbps? Is there a config file I can edit ?

      All the best,
      _John C
    • _John C wrote:

      How can I permanently set the eth0 speed to 100Mbps?
      Most simple solution is to add the line to /etc/rc.local above the exit 0 line which must remain. If you're not familiar with Linux or the command line better check the file for syntax errors:

      Source Code

      1. /bin/bash -n /etc/rc.local
      This should produce no output at all. If errors are reported you need to edit rc.local again (if something's wrong here the board might not boot the next time). If it doesn't work after a reboot you need to specify absolute path for /sbin/ethtool
    • I can use xubuntu with mousepad for editing. Would you be ok with this method? And if so; Is this ok ?


      Shell-Script

      1. #!/bin/sh -e
      2. #
      3. # rc.local
      4. #
      5. # This script is executed at the end of each multiuser runlevel.
      6. # Make sure that the script will "exit 0" on success or any other
      7. # value on error.
      8. #
      9. # In order to enable or disable this script just change the execution
      10. # bits.
      11. #
      12. # By default this script does nothing.
      13. ethtool -s eth0 speed 100 duplex full autoneg off
      14. exit 0
      Display All
      Or do I also need to remove the # from line 1 ?

      Thank you

      The post was edited 2 times, last by _John C ().

    • Shell-Script

      1. #!/bin/sh -e
      2. #
      3. # rc.local
      4. #
      5. # This script is executed at the end of each multiuser runlevel.
      6. # Make sure that the script will "exit 0" on success or any other
      7. # value on error.
      8. #
      9. # In order to enable or disable this script just change the execution
      10. # bits.
      11. #
      12. # By default this script does nothing.
      13. /sbin/ethtool -s eth0 speed 100 duplex full autoneg off
      14. exit 0
      Display All
      This ok ?
      Do I need to make a change to line 1 ?

      #!/bin/sh -e

      to

      !/bin/sh -e

      Thank you
    • Job done,
      Sent edited file back and then "/bin/bash -n /etc/rc.local". No output/errors. So the file is ok.

      ethtool reports "Duplex: Full"
      But my network switch is reporting "100Mbps Half Duplex". ???????

      Strange
      Images
      • Putty.png

        32.25 kB, 1,024×768, viewed 4 times
      • Switch.png

        97.02 kB, 1,024×768, viewed 5 times