Score:0

Persistently configuring 10Mbps ethernet interface

il flag

In order for my cell modem gateway to run in low power mode its ethernet interface must be configured to 10Mbps full duplex (not auto, even if the connected device is 10Mbps).

On my SBC running Ubuntu 20.04, which is connected to the modem via ethernet, after boot I can run ethtool -s eth0 speed 10 duplex full to successfully establish a link. This won't persist reboot however.

I tried adding the above command to a script in the following locations:

/etc/networking/if-pre-up.d/
/etc/networking/if-up.d/
/etc/networkd-dispatcher/configuring.d/
/etc/networkd-dispatcher/no-carrier.d/
/etc/networkd-dispatcher/routable.d/
/usr/lib/networkd-dispatcher/no-carrier.d/

However none of them are being executed. The OS (customized by manufacturer) appears to be running NetworkManager although the eth0 config is specified in a yaml file within /etc/netplan/

If I boot the SBC with the cellmodem configured for auto, then the if-up script is run (but not pre-up or any others).

What's the best way to ensure this script runs before trying to bring up the interface?

nobody avatar
gh flag
Hm maybe over udev rule or creating a systemd.service.
Terrance avatar
id flag
You could always add a line to the `/etc/crontab` file that reads `@reboot root bash -c 'sleep 5 && /usr/sbin/ethtool -s eth0 speed 10 duplex full'`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.