1

I have two Ethernet connections on my Ubuntu 18.04 desktop:

  • PCI ... wired Ethernet connected to the main network
  • USB ... wired Ethernet connected to a switch and a local device

After rebooting, Ubuntu always tries to connect to a network via the USB connection which fails. It leaves the PCI connection disabled.

To connect to a network, I need to manually click on Settings -> PCI -> Connect which resolves the issue immediately.

I changed Network settings to no avail. Found similar questions here and here but it also did not help.

How can I ensure that after rebooting, Ubuntu 18.04 connects using PCI Ethernet connection and not using the USB Ethernet connection? I'd like to leave the USB connection enabled if possible.

Petr Vepřek
  • 111
  • 4

1 Answers1

2

In terminal, type nm-connection-editor, and select the profile for your PCI ethernet card, then change the "Connect automatically with priority" to 1, and confirm that the profile for the USB ethernet is set to 0.

enter image description here

Update #1:

You can set the MAC address here...

enter image description here

heynnema
  • 68,647
  • 15
  • 124
  • 180
  • Thanks for your answer. Unfortunately, it did not help. However, it led me to `/etc/NetworkManager/system-connections`. There, I found a named profile that specified MAC of the PCI Ethernet connection. There was also an `eth.conf` configuration in the same directory that had no MAC specified. I deleted the named profile and added MAC to `eth.conf`. This finally solved the problem. – Petr Vepřek Apr 08 '22 at 08:51
  • @PetrVepřek You can set the MAC address right in the NetworkManager GUI, see Update #1 in my answer. – heynnema Apr 08 '22 at 13:35
  • @PetrVepřek Please see my answer. If it helps to resolve your problem, please remember to accept it by clicking on the checkmark icon that appears just to the left of my answer. Thanks! – heynnema Apr 08 '22 at 13:36
  • @PetrVepřek Status please... – heynnema Apr 21 '22 at 16:53
  • Problem solved as described in the above comment. Cheers. – Petr Vepřek Apr 22 '22 at 16:59
  • @PetrVepřek Thanks for your response. As you can see in Update #1 in my answer, there's a GUI way to add/edit MAC addresses in your ethernet configuration profile. – heynnema Apr 22 '22 at 17:03