RPi 3B+: Configure NIC to 100baseT/Full manually?

Hi there,

I upgraded my Raspberry to the current model 3B+, but I only have a 2-pair wired network connection with 100MBit. Unfortunately, auto negotiation does not work and my brandnew RPi does not have a network connection at all. If I configure the NIC manually with ethtool (sudo ethtool -s eth0 speed 100 duplex full autoneg off) I get a link and a network connection.

Is there an elegant way to configure the lan adapter permanently to 100baseT/Full that I have a network connection even after a restart/reboot?

Thanks for your thoughts!

1 Like

Either edit /etc/network/if-pre-up.d/ethtool to test for eth0 and set it correctly, or add another file in that directory that does it.

Thanks for you answer, nabsltd. But what do you mean with “test for eth0”?

You don’t want to apply that change to every interface (like the loopback, or WiFi), so you’d add something like this to the existing “ethtool” file

if [ "$IFACE" == "eth0" ]
then
    SETTINGS="$SETTINGS speed 100 duplex full autoneg off"
fi

Put those lines right before the last line in the “ethtool” file and it should work.

1 Like