Multiple wired Ethernet connections with KDE Plasma

I have a rather annoying issue to which I wasn’t able to solve myself. I have a wired Ethernet on my computer, and occasionally a second one (rarely a third one too). They both use DHCP, so no configuration is needed. However, from the Networks tray icon, or the settings application, I can only connect to one wired Ethernet at a time. When I connect to one, the other one automatically disconnects. Only one of them has Internet connectivity, the other ones are local networks.

Currently my workaround is to use wireless connectivity for Internet connection, but this introduces other issues since the local IP address changes.

How can I connect to multiple wired Ethernet networks with multiple adapters at the same time?

You most likely can’t. At least I don’t think so unless you have multiple network cards.
You have to configure the different networks to be able to reach each other where you create the networks.
Or maybe it is just a question of giving all the networks access to the internet.
Nobody other than you know how you want your network to act.

But it is done with the server that creates the networks, not on your Manjaro.

You’ll need to setup custom routing policies, I suspect. I haven’t done this, though, I’ve just done quite a bit of research on it.

Or you could try setting static IP addresses, so the settings don’t get rep-laced when a new network is connected…in fact, this might be the simplest option…keep the internet one on DHCP and make the rest Static…without a gateway

You can do that by using static IP assignment.

The most common use case is to establish connection to different networks - think of it like switch or a router.

The problem if same network will be routing but that can be worked around as well by setting max hops. Usually the network will prefer the network with the least amount of hops but will fall back to a connection with a higher number if the first is not available.

I think you should read some literature on network topology to get a better understanding of the concepts behind.

Thanks for the responses everyone!

I should clarify that the “other issues” are related to increased latency and lower throughput - not routing.


@bedna I do have separate network cards for every connection. One integrated (Internet), one PCIe (very rarely used but this is actually static IP) and one USB device (which is forced to be DHCP basically, and it even changes its MAC accress every connection because who knows why). Only one interface (the integrated) will ever have access to the Internet, the other ones are not connectable to the Internet.

Then again, my WIFI and Ethernet go to the same Internet-connected local network, there’s no issue in networking if they are both connected. In that light, it makes no sense to limit to only one wired connection at a time.

This starts to sound like a bug on the KDE side. There was no such issue with Gnome (which I will not go back to).


@Mirdarthos Everything else needs to be DHCP, but the Internet connectivity card could actually have a static IP address. I’ll try that, thanks!


@linux-aarhus As I wrote above, I can have Ethernet and WIFI connection to the same Internet-connected LAN and there’s no issue. Also, routing issues would come after I manage to somehow have two Ethernet connections active at the same time. The GUI tools at least don’t allow that, that’s the issue.

Currently every device is using DHCP, no configuration has been made whatsoever. If I click the connect on the left picture, the right picture results, and vica versa. The “shorter” Ethernet device and the WIFI are connected to the same LAN with Internet access.

It’s not possible to have two Ethernet devices (or any two devices of the same type I think) connected at the same time (without extra configuration). To me this is a bug.

PS. I have also studied IPv4 and routing in depth and have several years of work experience on top of that, but thanks for the effort anyway :slight_smile:

I actually kind of somewhat doubt this. I’ve al been on networks that apparently had to be DHCP. But I connected, copied the details is provided, and set them manually as static. It worked fine then.

But I’m with @bedna on this. To accom-plish this at the same time, You’d need different interfaces. Or you’d need to set multiple addresses on the same interface, something I remember vaguely hearing about a long time ago, but that’s it…

Edit:

See here:

https://superuser.com/a/775900

So I think you’d be able to do it with systemd

What if you try setting on 2nd and 3rd adapter:

nmcli connection modify <your profile name, eg. "... Wired"> ipv4.never-default true
1 Like

If this can be achieved with extra configuration, then it is not a bug.

To address this, as simply as possible, Ethernet and WiFi are on separate pathways and share the internet only via separate preconfigured processes. Your router will route traffic correctly in accordance with the expected differences in technologies. A multi-homed Ethernet configuration is usually only relevant for server configurations; as far as I am aware.

That is all.

This is possible. But this:

…isn’t. Because this is a very advanced setup. And not something I’ve ever done before.

So it’s a bug that it cannot automagically read your mind and do what you want it to do? Something advanced, not common, and not standard? By default. Yeah, that makes perfect sense! :wink:

The bug is that when I click “Connect”, the system disconnects another unrelated connection. Is that not a bug?

Nope. Because I’m sure it’s not disconnected, completely. I think the DHCP overwrites the routing table, as it’s supposed to do. You can observe the same thing with an improperly configured VPN connection. That’s why it’ll need more advanced configuration.

You mentioned:

…and while I might be wrong, I have no idea how this is possible…

What you describe is expected, because there can only be one :crossed_swords: Ethernet connection; without further configuration they will each compete for the prize.

I believe @linux-aarhus has already indicated that the most common use case [of multiple Ethernet connections] is to establish connection to different networks.

What you wish to happen would require advanced trickery, but is arguably possible. You could for example connect to another computer, or router, or local computer acting as a router, and in turn connect to the Internet. With the experience you tout, you should already know this.

It is not a bug. Nor, I dare say, is it generally recommended for a desktop system.

It also indicates that it can happen, as a lot of people in the thread have said. But like @soundofthunder said,

…so quite obviously the Gnome settings-editor did something…advanced.

So you could try figuring out the name of their connection manager and install it on Plasma. Will this work? :man_shrugging:

Which is why the other is disabled.

You can setup some pretty advanced stuff but you have to be well versed in network topology and routing to be able to create a stable setup.

Such advanced setup is topic for self study as it can be quite challenging.

1 Like

To further your advanced study: Best Practices for Using Multiple Network Interfaces (NICs) with NI Products.

The concepts are fairly portable. Good luck.

It might be

$ pamac search network-manager-applet
[...]
network-manager-applet  1.34.0-1                                                                                                                                                                                                                        extra
Applet for managing network connections

$ pamac info network-manager-applet
Name                  : network-manager-applet
Version               : 1.34.0-1
Description           : Applet for managing network connections
URL                   : https://gitlab.gnome.org/GNOME/network-manager-applet
Licences              : GPL LGPL
Repository            : extra
Installed Size        : 629.3 kB
Groups                : --
Depends On            : libappindicator-gtk3 libmm-glib libnma libsecret networkmanager nm-connection-editor
Optional Dependencies : --
Provides              : --
Replaces              : --
Conflicts With        : --
Packager              : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date            : Wed 04 Oct 2023 18:34:49
Validated By          : MD5 Sum  SHA-256 Sum  Signature

… from the extra repository. So you could try that:

pamac install network-manager-applet

And see if that works, and if so peruse the config files because this’ll only create config files that the kernel uses to understand how to do it.

I got an idea.
Can you not hardcode the nameserver in /etc/resolvconf.conf?

# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
#name_servers=127.0.0.1

If you uncomment and change the 127.0.0.1 to your local dns, wont that be used by all connections?

It would, if you set the file to immutable.

But then, then comes the rest of the traffic/routing…

Yes, it might, and that’s a perfect way to prevent all connections outside of the machine you’re on.

127.0.0.1 is one of the so-called loop back addresses, and that one in particular, is also called localhost.

Redirecting a site to 127.0.0.1 is often employed (via /etc/hosts) to prevent access to a site. To test, add the following to /etc/hosts:

127.0.0.1  google.com

Save, and close it, then try to use Google to perform a search! (don’t forget to remove the line later, if you still want to use Google). :wink:

This is also how blocklists work, however, sometimes with an alternate loop back address.

1 Like

Yes, you most likely do not have your local DNS on your localhost. xD
My guess is that his router is his local DNS (or the server he set up his networks with)