I have a weak and long ethernet cable in wall. Sometimes it is disconnected. Is it possible to use WDS as backup connection ?
I was thinking about using WAN port or one of LAN port as a primary for bond interfejs and WDS as backup. Is It possible ? Is it supported by openwrt ?
And the second step is to add such bond to br-lan as don't need separate network - just need redundant link if lose connection via cable in the wall.
What you're looking for, would essentially be willingly introducing a network loop, which is where nightmares come from.
If the ethernet link totally breaks you can use STP (Spanning Tree Protocol) for sure, I use it without problems with mixes of WDS and ethernet.
Just keep in mind that by default a wireless link gets a cost of a 10 Mbps Ethernet link. If the link is working in Fast Eternet (100 Mbps) or better it will win over the wireless always (you can reconfigure the link costs to change it).
If you want something adaptative (switching based on link degradation, not only "pure" link drop) my recomendation is developing a little application (C, python, lua, bash or any viable option) which monitors the health of each link and defines which one is the best.
The criteria can be simply the phy rate in Mbps or maybe a little more priority for the "default" one of them, but for sure you need an hysterisis criteria in order to avoid the "ping-pong" or bouncing effect, I mean, if you just check which one is "better" by a single threshold, the link variations could be surrounding the threshold and you can have changes in the best link determination with an oscillatory pattern very often (maybe few seconds)... and this should not happen in order to have network stability when you apply the final step (next paragraph).
With all this clarification, if you have that algoritm which evaluates and determines the best link with a proper hysterisis criteria, you can just force which link will win the STP decision via configuring a better path cost to the winner link, an then STP will converge for you, al close the loop turning to blocking state the losing connection.
If this makes sense to you, later I can give you more precise detail in which packages and configurations you need to put this to work.
Ethernet is good upto 90m , wifi about 10m indoors 30m outdoors.
Do you know why connection is dropping.
Is it damaged connectors that can be replaced ?
Thanks to everyone for the answer. @slh I'm worried about that, but I thought the "bond" mechanism would take care of it and prevent the loop.
I found the initial commit for bonding:
And in this example there is bond which is added to bridge:
config device option name br-lan option type bridge list ifname eth0.1 list ifname eth0.2 list ifname bond0 option mtu 1500 config device option name bond0 option type bonding list ports eth0.123 list ports eth0.124