Hey folks, I’m running Rocky 9, my system has a poorly supported built in ethernet port, so I’m needing to use a USB Network adapter for connectivity until that bug gets squashed.
Unfortunately, every time I reboot the system, the USB ethernet is not connected, and I have to manually go into Settings to turn this back on. The network connection seems to have the same name each boot (enp0s20f0u3), but I’m stumped on how to make sure that this comes up each boot. It is odd that Settings isn’t doing this for me, I have the ‘Connect Automatically’ setting checked.
/etc/sysconfig/network-scripts/ is empty. It doesn’t appear that anything is supposed to be there under Rocky 9/RHEL 9. /etc/NetworkManager/system-connections/ is the new location where these seem to be stored.
Right now all I have there is the default Profile 1, which contains this:
I’m not seeing the ‘Share profile’ you mentioned, but I think I have it figured out now. I had to use the CLI nmtui command and was then able to edit my profile, I saw the same thing that was in the Settings GUI, with the addition of a line under the profile name labeled as ‘Device’. I set that field to use the interface name, and after saving it seemed to lock the profile to only use that specific interface rather than be shared among all the interfaces, which seemed kinda crazy to me to begin with once I noticed that.
I did a reboot, and the connection was up on the USB interface this time, which was an improvement!
I was then able to set up a new Profile and set the Device to be the PCI connection, so now I have separate profiles for both interfaces.
I’m going to guess that the default profile being shared among any available interfaces was the problem with my connection not coming up, though it isn’t clear why the profile wasn’t activating on an interface with an active connection. But locking the profile to the device has resolved it, did another reboot to confirm and still working.
It would have been nice if the Settings GUI app let the profile be locked to the device without having to go to the command line.
That is interesting, because the installer generates distinct “profile” (connection) for each device and when it does, it adds the MAC address to the config so that a connection is used only for device that has that MAC address.
If you create connection with nmcli con add type ethernet, then you have to specify ifname, that is connection.interface-name – again to bind connection to specific device. You can afterward run nmcli con mod to erase the ifname and add specific MAC. IME, binding to MAC is more comfy than binding to device name. The “persistence” of the names remains subjective.
That could very well be on me then… Originally there was only the built in PCI network port, and it wasn’t until I ran into issues troubleshoot the driver used that I ended up adding the USB port. And I think during that troubleshooting I deleted the Profile that was originally there and recreated it, so that one may well have been device specific at install time.
But it is still concerning that the GUI for Settings doesn’t allow a way for a profile to be tied to a device. It isn’t uncommon to add interfaces after a system is running, new NICs, etc.