Tumbleweed: using Ethernet (bridge) and a Wlan on the same PC simultaneously?
I am using KDE Networkmanager. I have at home a dlan magic2 standard as connecting eithernet standard interface. As the house is old and the electrical wiring (maybe some appliance, who knows) is prone to fall out of order from time to time, I have also a wlan router branched on dlan on another phase (line) (which is not disturbed) in order to backup. Now what I would like to achieve is, to be able to use the ethernet bridge toghether with the wlan, switching interface when the ethernet fails. But that does not seems to work as because of the metric (when Ethernet alone is active the metric is 600, when wlan is also active then Ethernet gets a metric of 425 and the precedence on wlan with 600 - which is intended, I know). Now this would be a logical case but,when the transfer of data on Ethernet dlan fails it is not that the Ethernet fails. Because the interface is still active, only the connection to the internet fails because the transmission of the data is too disturbed (has IP but does not transmit data). Is it possible to set up a fallback mechanism to have wlan stepping in, only in case the LAN is disturbed, put into practice using the Networkmanager (KDE)? How would be the steps to follow?
On Wed, Dec 11, 2024 at 1:10 PM Stakanov via openSUSE Users <users@lists.opensuse.org> wrote:
I am using KDE Networkmanager. I have at home a dlan magic2 standard as connecting eithernet standard interface. As the house is old and the electrical wiring (maybe some appliance, who knows) is prone to fall out of order from time to time, I have also a wlan router branched on dlan on another phase (line) (which is not disturbed) in order to backup. Now what I would like to achieve is, to be able to use the ethernet bridge toghether with the wlan, switching interface when the ethernet fails.
If ethernet fails, NetworkManager will remove any route via this interface.
But that does not seems to work as because of the metric (when Ethernet alone is active the metric is 600, when wlan is also active then Ethernet gets a metric of 425 and the precedence on wlan with 600 - which is intended, I know).
Now this would be a logical case but,when the transfer of data on Ethernet dlan fails it is not that the Ethernet fails.
Does the Ethernet fail or does the Ethernet not fail?
Because the interface is still active, only the connection to the internet fails because the transmission of the data is too disturbed (has IP but does not transmit data).
Is it possible to set up a fallback mechanism to have wlan stepping in, only in case the LAN is disturbed, put into practice using the Networkmanager (KDE)?
How would be the steps to follow?
Run a service that monitors whatever condition you define as "failure" and changes route metric accordingly. Linux will use the route with a "better" metric.
In data mercoledì 11 dicembre 2024 12:33:22 Ora standard dell’Europa centrale, Andrei Borzenkov ha scritto:
Run a service that monitors whatever condition you define as "failure" and changes route metric accordingly. Linux will use the route with a "better" metric.
It does not fail. It drops in speed to be substantially frozen. Imagine I have a dlan in my house. It is on two floors. On the upper floor the quality of electrical wiring is better than in the lower floor (I have not an idea why, but a damage to the heating with moist walls years ago may have causes some oxidation). The quality within the lower floor (were I am) is also not homogeneous. The dlan adapter on the line that is hit by disturbances is another than the line that the WLAN router uses to give service. Both have(!) to service via dlan to reach the router in the first floor because the house is of concrete and the wlan signal from above does not suffice, not even using a repeater. So If the Ethernet "fails" to load, that is takes a lifetime to load pages, the WLAN is still instantaneously, because on another electrical line. But here the situation you describe does not fit because networkmanager will not preceive this as a failure (the line still stands has IP but is really slow), so in my experience it will not use the faster wlan available. I cannot confirm what you say. if I start Ethernet first during boot and then WLAN the first will get the higher metric and the second will get the lower. And they will keep them until I manually disconnect them (this is what I have checked with "route -n". The opposite is with first wlan and then ethernet. I am connecting with a wire guard vpn to the net, that does not make the connect faster, but when the Ethernet has a good day it works well, when the WLAN works also. Even if both are connected. Now why I am actually still using Ethernet over dlan if it is disturbed? Because I have a bridge in order to give internet to a virtual machine I use. And I found out I cannot get this to work with wlan apparently. (I did find somewhere - I think on "serverfault", the reason why this is so, but I admit in the meanwhile I forgot again. If you think this is wrong information you can "save my soul" by telling me how to make (without security loss on the host machine) to make a bridge for virtual machine work on wlan. What service could I run that does the thing you are describing above?
11.12.2024 18:31, Stakanov via openSUSE Users wrote:
In data mercoledì 11 dicembre 2024 12:33:22 Ora standard dell’Europa centrale, Andrei Borzenkov ha scritto:
Run a service that monitors whatever condition you define as "failure" and changes route metric accordingly. Linux will use the route with a "better" metric.
It does not fail. It drops in speed to be substantially frozen.
As I said - whatever condition should trigger failover. ...
What service could I run that does the thing you are describing above?
You will need to write one.
11.12.2024 20:50, Stakanov via openSUSE Users wrote:
In data mercoledì 11 dicembre 2024 18:47:48 Ora standard dell’Europa centrale, Andrei Borzenkov ha scritto:
You will need to write one. and in what language one has to write such a script? (programming language, obviously).
Any language you are comfortable with including shell script. The challenge is not to chose language, but to formalize the conditions. "Pages load slowly" is not something that can be measured by computer. "Ping takes more than 3 seconds" is and can be easily used in script with ping -w 3 -c 1 "Loading of Google takes more than 5 seconds" is and can again be relatively straightforward used in scripts, e.g. $ curl -L --no-progress-meter -w '%{stderr}%{time_total}\n' https://google.com/ > /dev/null 1.000897 And then your script can call something like nmcli connection modify your-ethernet-connection ipv4.route-metric 1000 nmcli device reapply yout-ethernet-interface (unfortunately, kernel does not allow modification of the metric metric of the existing route, you need to delete and create new one).
Hello, In the Message; Subject : Re: Tumbleweed: using Ethernet (bridge) and a Wlan on the same PC simultaneously? Message-ID : <CAA91j0VrFb6rDKdRRQXpyGQsMbGQ=gRS89FwPrisjw9-gH4x_Q@mail.gmail.com> Date & Time: Wed, 11 Dec 2024 14:33:22 +0300 [AB] == Andrei Borzenkov <arvidjaar@gmail.com> has written: AB> On Wed, Dec 11, 2024 at 1:10 PM Stakanov via openSUSE Users AB> <users@lists.opensuse.org> wrote:
I am using KDE Networkmanager. I have at home a dlan magic2 standard as connecting eithernet standard interface. As the house is old and the electrical wiring (maybe some appliance, who knows) is prone to fall out of order from time to time, I have also a wlan router branched on dlan on another phase (line) (which is not disturbed) in order to backup. Now what I would like to achieve is, to be able to use the ethernet bridge toghether with the wlan, switching interface when the ethernet fails.
AB> If ethernet fails, NetworkManager will remove any route via this AB> interface. No, NetworkManager will not remove any routes associated with an interface when a link goes down. This means that the routes will remain in the kernel routing table, and backup interfaces and gateways may not work as expected. To modify this behavior, Stakanov can disable the NetworkManager ignore-carrier option as follows: 1. Create a file in the /etc/NetworkManager/conf.d/ directory with a number greater than 00, such as 99. ex. 99-carrier.conf 2. Add the following contents to the file: # cat /etc/NetworkManager/conf.d/99-carrier.conf [main] ignore-carrier=no 3. Restart the NetworkManager service: # systemctl restart NetworkManager. Best Regards. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Distinguish between what is meaningful to me and what is meaningless, and forget what is meaningless to me. This is where individuality comes into play. This is a function that computer cannot perform." -- Shigehiko Toyama (in Japanes) --
Hello, In the Message; Subject : Re: Tumbleweed: using Ethernet (bridge) and a Wlan on the same PC simultaneously? Message-ID : <87msh1fprf.wl-nomiya@lake.dti.ne.jp> Date & Time: Thu, 12 Dec 2024 14:12:52 +0900 [MN] == Masaru Nomiya <nomiya@lake.dti.ne.jp> has written: [...] MN> 2. Add the following contents to the file: MN> # cat /etc/NetworkManager/conf.d/99-carrier.conf MN> [main] ignore-carrier=no [...] This way of writing is misleading. The correct way to write it is like this. [main] ignore-carrier=no Best Regards. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "To hire for skills, firms will need to implement robust and intentional changes in their hiring practices ― and change is hard." -- Employers don’t practice what they preach on skills-based hiring --
Hello, In the Message; Subject : Re: Tumbleweed: using Ethernet (bridge) and a Wlan on the same PC simultaneously? Message-ID : <CAA91j0UnwMYxtEQDRT7y40sVtF07aRQg7+dUmviieUow-9FAbg@mail.gmail.com> Date & Time: Thu, 12 Dec 2024 10:13:47 +0300 [AB] == Andrei Borzenkov <arvidjaar@gmail.com> has written: AB> On Thu, Dec 12, 2024 at 8:13 AM Masaru Nomiya <nomiya@lake.dti.ne.jp> wrote: MN> > [main] ignore-carrier=no MN> > AB> This is the default. ? $ man 5 NetworkManager.conf says; ignore-carrier This setting is deprecated for the per-device setting ignore-carrier which overwrites this setting if specified (See ignore-carrier). Otherwise, it is a list of matches to specify for which device carrier should be ignored. See the section called “Device List Format” for the syntax how to specify a device. Note that controller types like bond, bridge, and team ignore carrier by default. You can however revert that default using the "except:" specifier (or better, use the per-device setting instead of the deprecated setting). and, ignore-carrier Specify devices for which NetworkManager will (partially) ignore the carrier state. Normally, for device types that support carrier-detect, such as Ethernet and InfiniBand, NetworkManager will only allow a connection to be activated on the device if carrier is present (ie, a cable is plugged in), and it will deactivate the device if carrier drops for more than a few seconds. A device with carrier ignored will allow activating connections on that device even when it does not have carrier, provided that the connection uses only statically-configured IP addresses. Additionally, it will allow any active connection (whether static or dynamic) to remain active on the device when carrier is lost. Note that the "carrier" property of NMDevices and device D-Bus interfaces will still reflect the actual device state; it's just that NetworkManager will not make use of that information. Master types like bond, bridge and team ignore carrier by default, This setting overwrites the deprecated main.ignore-carrier setting above. Am I misunderstanding? Best Regards. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ " Reading widely about things that don't seem immediately or practically useful, in the hope that what you learn now may prove meaningful later—that's pretty much the definition of a liberal- arts education. Who knew that one of its best defenders would turn out to be a computer scientist? " -- "What Does It Really Mean to Learn?" THE NEW YORKER --
Hello, In the Message; Subject : Tumbleweed: using Ethernet (bridge) and a Wlan on the same PC simultaneously? Message-ID : <4695473.iomTQH8mdA@silversurfer> Date & Time: Wed, 11 Dec 2024 11:10:28 +0100 Stakanov via openSUSE Users <users@lists.opensuse.org> has written:
I am using KDE Networkmanager. I have at home a dlan magic2 standard as connecting eithernet standard interface. As the house is old and the electrical wiring (maybe some appliance, who knows) is prone to fall out of order from time to time, I have also a wlan router branched on dlan on another phase (line) (which is not disturbed) in order to backup. Now what I would like to achieve is, to be able to use the ethernet bridge toghether with the wlan, switching interface when the ethernet fails. But that does not seems to work as because of the metric (when Ethernet alone is active the metric is 600, when wlan is also active then Ethernet gets a metric of 425 and the precedence on wlan with 600 - which is intended, I know).
Now this would be a logical case but,when the transfer of data on Ethernet dlan fails it is not that the Ethernet fails. Because the interface is still active, only the connection to the internet fails because the transmission of the data is too disturbed (has IP but does not transmit data).
Is it possible to set up a fallback mechanism to have wlan stepping in, only in case the LAN is disturbed, put into practice using the Networkmanager (KDE)?
How would be the steps to follow?
I'm sleepy, so I'll just give you the gist. 1. Have you installed plasma-nm, too? 2. In the network settings, have you set both LAN and WLAN to automatic connection? 3. Have you set the priority of WLAN connection to be lower than LAN connection? With these settings, you should be able to test it by plugging and unplugging the network cable. Best Regards & Good Nigh. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "To hire for skills, firms will need to implement robust and intentional changes in their hiring practices ― and change is hard." -- Employers don’t practice what they preach on skills-based hiring --
On 12/11/24 05:10, Stakanov via openSUSE Users wrote:
How would be the steps to follow?
If Ethernet is not failing, I'm not sure what can be done. I assume what you're trying to say is the data through the Ethernet over power line is what's failing. Unless that is reflected in the Ethernet dropping, there's nothing to cause the switch over. If you have decent WiFi, maybe you should forget about using Ethernet over power.
In data mercoledì 11 dicembre 2024 15:40:28 Ora standard dell’Europa centrale, James Knott ha scritto:
On 12/11/24 05:10, Stakanov via openSUSE Users wrote:
How would be the steps to follow?
If Ethernet is not failing, I'm not sure what can be done. I assume what you're trying to say is the data through the Ethernet over power line is what's failing. Unless that is reflected in the Ethernet dropping, there's nothing to cause the switch over. If you have decent WiFi, maybe you should forget about using Ethernet over power.
Yes, you go the perfectly right. I described in my post right now to Andrei. The data flow over the ethernet is ridiculously slow when the disturbance happens. The IP of course stays. I would change to wifi but I have a virtual KVM running on the PC and it will not work with the bridge if I use wifi. At least I never manged it to work.
On 2024-12-11 16:34, Stakanov via openSUSE Users wrote:
In data mercoledì 11 dicembre 2024 15:40:28 Ora standard dell’Europa centrale, James Knott ha scritto:
On 12/11/24 05:10, Stakanov via openSUSE Users wrote:
How would be the steps to follow?
If Ethernet is not failing, I'm not sure what can be done. I assume what you're trying to say is the data through the Ethernet over power line is what's failing. Unless that is reflected in the Ethernet dropping, there's nothing to cause the switch over. If you have decent WiFi, maybe you should forget about using Ethernet over power.
Yes, you go the perfectly right. I described in my post right now to Andrei. The data flow over the ethernet is ridiculously slow when the disturbance happens. The IP of course stays. I would change to wifi but I have a virtual KVM running on the PC and it will not work with the bridge if I use wifi. At least I never manged it to work.
You could convert the WiFi to ethernet with some sort of AP or WiFi Point near the the computer. If you can manage WiFi from the internet router directly to your computer, using both the 2Ghz and 5Ghz bands, that would give you good speed. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
In data giovedì 12 dicembre 2024 13:24:28 Ora standard dell’Europa centrale, Carlos E. R. ha scritto:
On 2024-12-11 16:34, Stakanov via openSUSE Users wrote:
In data mercoledì 11 dicembre 2024 15:40:28 Ora standard dell’Europa centrale, James Knott ha scritto:
On 12/11/24 05:10, Stakanov via openSUSE Users wrote:
How would be the steps to follow?
If Ethernet is not failing, I'm not sure what can be done. I assume what you're trying to say is the data through the Ethernet over power line is what's failing. Unless that is reflected in the Ethernet dropping, there's nothing to cause the switch over. If you have decent WiFi, maybe you should forget about using Ethernet over power.
Yes, you go the perfectly right. I described in my post right now to Andrei. The data flow over the ethernet is ridiculously slow when the disturbance happens. The IP of course stays. I would change to wifi but I have a virtual KVM running on the PC and it will not work with the bridge if I use wifi. At least I never manged it to work.
You could convert the WiFi to ethernet with some sort of AP or WiFi Point near the the computer.
If you can manage WiFi from the internet router directly to your computer, using both the 2Ghz and 5Ghz bands, that would give you good speed.
-- Cheers / Saludos,
Carlos E. R. (from 15.5 x86_64 at Telcontar)
yes, but I will have to buy one more(!) router to do this. A bit "short on money....... BTW, I would like to drop an advice to look at aliexpress for the bananapi one openwrt router. for 119-130 Euro this one is really fast, has openWRT on it (although yet limited to the snapshot because the device is bleeding edge new, until ca spring next year when the final 24 will be out and will support it, then you have all the advantage of the package system. But I can tell you it is really fast!
participants (5)
-
Andrei Borzenkov
-
Carlos E. R.
-
James Knott
-
Masaru Nomiya
-
Stakanov