USB Ethernet dongle off after reboot

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.

Is there a /etc/sysconfig/network-scripts/ifcfg-enp0s20f0u3 on your system? If so, can you post the content of it?

/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:

[connection]
id=Profile 1
uuid=2c0e70ed-2a16-4961-8100-bdf67f486714
type=ethernet
permissions=user:wright:;
timestamp=1663860194

[ethernet]

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=disabled

[proxy]

There isn’t anything there that seems to be specific to the interface involved, and both my built-in PCI network and the USB one are sharing the same Profile.

I’m still trying to read up on this new networking setup.

That is the way.

NM in el9 does use different format and location.

Use:

nmcli d s
nmcli c s
nmcli c s enp0s20f0u3

to see current status.

NM should be dynamic and thus activate links as they do show up. I.e. even if interface shows up delayed.

Wait! “Share profile”? There can be multiple connections defined for a device, but not one connection for many devices.

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.

Linking this here, I found this document to be quite helpful in getting a handle on this new way of configuring interfaces: RHEL 9 Configuring and managing networking.

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.

I wrote this bug up today for a feature enhancement to Settings to allow this field to be set: https://bugzilla.redhat.com/show_bug.cgi?id=2129952