[SOLVED] How does network-manager determine which connection to use?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How does network-manager determine which connection to use?
On the latest Ubuntu upgrade (last month), my network-manager stopped using the same saved connection automatically. It still opens an ethernet connection, but instead of using the one that I have defined (and marked as "automatically connect" and given it a priority of 20), it creates a new generic connection with every reboot. Since it doesn't have the DNS settings that I need, I have to manually connect to my saved connection.
I'm guessing there's something going on behind the scenes that perhaps I could change in a config file somewhere, I would be grateful if anyone could help.
The connection profiles are located in /etc/NetworkManager/system-connections/ and you can remove any that are unwanted of course.
The list of connections can be got via
Code:
nmcli c
What does the following report?
Code:
nmcli d
Is the ethernet interface being managed by NM? It won't manage any interfaces that are included in /etc/network/interfaces by default.
Thanks for that, ferrari. It turns out that I had a connection defined in /etc/network/interfaces, but that file also had a line "ensp0 default" (or whatever device the ethernet connection gets labelled as these days). My guess is that the upgrade stuck that line in there, probably I approved a merge without paying attention.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.