SlackwareThis Forum is for the discussion of Slackware Linux.
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.
What is the correct way to configure NetworkManager to handle multiple wired connections?
I have been using my laptop with Slackware 14.x and NetworkManager. More or less NM has worked but I only used the laptop at home. I configured both the wired and wireless to auto-connect. Simple arrangement. That worked fine when booting the laptop.
I now am using my laptop at home and work. I use both wired and wireless. Four connection points.
I prefer to configure all four points with auto-connect. That no longer works well when booting.
When I am at home and boot the laptop with the cable connected, NetworkManager always connects to the work connection because the name of the connection is alphabetically first. I have to wait for the laptop to finish booting, log in, and manually select my home wired connection.
Repeat ad nauseum.
With both wired connections configured not to auto-connect, booting with the cable connected results in NM connecting to eth0 rather than ignoring the cable. NM never creates a connection because auto-connect is disabled.
Seems there should be a sane timeout when a wired connection is unavailable and then try the next wired or wireless point.
Thus far my work-around is:
1) Disable the auto-connect on the wired connections.
2) Never connect the cable when booting.
3) Finish booting.
4) Insert the cable.
5) Use nmcli or nm-applet to select the desired wired connection.
Inconvenient. I am accustomed to several years at home when I toggle the cable that NM adjusts automatically. Seems I can't do that anymore.
I think I can leave the home wired to auto-connect, but then at work ensure I never connect the cable when booting. The caveat with that is should I connect the cable at work then NM will auto-connect to my home connection, which is unavailable.
I am not interested in wicd, et.al. I only want to know how to configure NM to better handle wired connections.
You have the option not to use NetworkMisManager in Slackware. I certainly don't. I rarely met such a poor ratio of junk installed to performance. If you're even slightly out of the ordinary, it will barf and frustrate you.
Was this directed to me or hitest, who seemed to ignore or not read the end of my original post?
Quote:
You have the option not to use NetworkMisManager in Slackware. I certainly don't. I rarely met such a poor ratio of junk installed to performance. If you're even slightly out of the ordinary, it will barf and frustrate you.
"NetworkMisManager"
What do you use?
NM works fine for me as long as I don't roam. Within the home, which has been the case until very recently, NM adjusts to whether I am on cable or wireless. No major complaints although I have struggled with dispatcher scripts working correctly to connect to my server.
NM seems to get confused when putting the laptop to sleep using one interface and then resuming from sleep with the other interface. I think the problem has been me with my dispatcher scripts, but I accepted the anomaly and don't change the interface until fully resumed from sleep.
NM works probably well enough with respect to choosing wireless points when roaming. There seems to be no thought put into handling wired in an sane manner. As I am new to roaming I got to the point of frustration with respect to wired connections. I am not above learning the problem is PEBKAC. I just want to know how to manage multiple wired connections in a sane manner. Perhaps there is no sane method with NM. I am sure many Slackers use a laptop in a similar manner. I hoped some would share how they manage going to and from multiple locations.
I accept that eth0 has precendence over wlan0. Fair enough. When booting seems to me NM should move to the next wired connection when there is no obvious response. Should take only one second to determine there is no gateway.
Part of the frustration is managing the firewall. Perhaps that too is PEBKAC. I use the alienbob online tool to generate the firewall rules for my rc.firewall. Those rules need to know the interface. Changing the interface means restarting the firewall. To avoid firewall issues perhaps I ought to hard-code both eth0 and wlan0 into the script although only one interface is used at any time.
Thanks, but no apology necessary. Besides, I am the last person who should get angry at somebody missing a point. The older I get the blinder I grow. I think the blindness is willful.
The reply could have been directed at me -- in the sense that Didier Spaier was trying to subtly say there is a solution as long as I do not close doors, er, my mind.
Perhaps I should test wicd. I wrote that line in my original post because I wanted to keep the discussion focused on NM not managing wired connections. I have no idea whether wicd does that better. I just don't know where I will find the time to test. That and the human tendency to stay with the devil we know rather than the devil we don't know.
Perhaps I should have started the thread differently. The problem might not be NM per se, but learning how to manage multiple locations. Roaming with my laptop is new to me.
Life is sooooo much simpler when only using rc.inet1.conf.
Seems there should be a sane timeout when a wired connection is unavailable and then try the next wired or wireless point.
I guess that autoconnect-retries-default is what you're looking for :
Code:
The number of times a connection activation should be automatically tried before switching to
another one. This value applies only to connections that can auto-connect and have a
connection.autoconnect-retries property set to -1. If not specified, connections will
be retried 4 times.
To take advantage of this feature, you'll need NetworkManager >=1.6.0 , which is included in -current (14.2 comes with 1.2.2).
I guess that autoconnect-retries-default is what you're looking for :
Interesting. If I find the time I'll try compiling the newer version on 14.2.
The description implies that after a default of 4 tries NM should bail or move another auto-connect connection. I wonder how much time is consumed between each try. The rc.firewall script executes rather quickly after NM is launched.
I had run across the autoconnect-priority option. I wondered whether that might help. If I assign a priority higher than zero to the home wired connection, then when at home NM should not try to start the work wired connection. Because of the higher priority, when I am at work then I think NM will still try to start the home wired connection, which will give the same results I have at home as described in the original post.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.