-
-
Notifications
You must be signed in to change notification settings - Fork 113
draft: fix: create bridge for dsa switches #1203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
For quickly testing, I used the same setup described in #1197 based on OpenWrt 23.05 and patched the files from this pull request directly on the flashed routers. Maybe I should repeat the tests flashing them with the code already patched? Extract from lime-config output on YouHua WR1200JS: Extract of lime-config output on PlasmaCloud PA1200: I got these ping results via cable, to be compared with #1197 (comment): Which are amazing, much better than the ones from #1192 and #1197. When connecting via cable, I cannot connect via ssh to the YouHua WR1200JS router I am directly connected to... Here are the lime-reports of the two DSA routers (the one for the YouHua I got connecting to SSH from the PA1200 router): PlasmaCloud_PA1200-LibreMesh_master-PR1203-OpenWrt_23.05-report.txt At this boot, I could not connect via ssh to the YouHua WR1200JS router I am directly connected to... So I had to connect from the PA1200 router: YouHua_WR1200JS-LibreMesh_master-PR1203-OpenWrt_23.05-report.txt After a reboot I could connect normally: YouHua_WR1200JS-LibreMesh_master-PR1203-OpenWrt_23.05-report-bis.txt What is not working for me is the DHCP in the DSA routers: when I connect to the named AP of YouHua WR1200JS or the one of PlasmaCloud PA1200, I am not receiving an IPv4. Connecting to the named AP of TP-Link WDR3600 I got these ping results: Connecting to the named AP of TP-Link WR841N v13 I got these ping results: which are much better than the ones reported here #1197 (comment) |
|
PlasmaCloud_PA1200-LibreMesh_master-PR1203-OpenWrt_23.05-report.txt: YouHua_WR1200JS-LibreMesh_master-PR1203-OpenWrt_23.05-report-bis.txt: This would explain why DHCP does not work on a cabled connection, because dnsmasq is configured to only answer requests from anygw (via br-lan). I don't understand why it doesn't work when connected via wifi. A bit surprising that you were able to ping into the internet from a cabled connection and receive a reply. I guess this is because of the swconfig devices in the network that were still bridging their ethernet ports to bat0. While experimenting, I found out that for some reason it doesn't seem to be possbible to add a bridge as direct member to another bridge: This explains why br0 is not member of br-lan. What does work, however, is adding a bridge vlan subinterface of a bridge to another bridge. This is what I'm doing in my home setup to work around the fact that one can not run batadv on top of a bridge that contains a batadv mesh interface (usually called bat0). Here is how that looks like: Here, bat0 can not be member of br-dsa, because then I couldn't run batadv on top of br-dsa.4. So we could fix this by adding a bridge vlan to br0 with some arbitrary vlan number x and set all ports to untagged. Then use br0.x everywhere instead of br0. But this only works if the then vlan aware bridge ignores the 1ad tags and forwards them as-is. edit: On top of br-dsa.3 I added an 802.1ad vlan subinterface and an IP address: Then on another swconfig device (TL-WDR3600), I added a switch vlan in /etc/config/network: The two devices are connected via a dumb switch and vlan 3 is untagged. Then I added a normal vlan subinterface and a 802.1ad vlan subinterface on top of that and set another IP adress: I was then able to ping 192.168.1.1 from the wdr3600. Pinging 192.168.1.2 from the fb4020 worked only sometimes. It always worked while pingng it from the wdr3600. So I changed the mac addresses on both devices: Then it worked flawlessly in both directions. So the DSA switch ignored the 802.1ad tags, which is good. |
|
Hi, while I appreciated a lot the response from @pony, I tried to make it work unsuccessfully. However when i tested it the swconfig device see the dsa one via While investigating on other solutions I found this workaround:
This way:
here is the patch I'm using: https://github.com/libremesh/lime-packages/commit/202fba11df5a73c4170949a5ab3c440e41368da7.patch To test this one can apply the patch to a local copy of lime-packages Example script to copy the patch to the device
#!/bin/bash
uscp="scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
ip=10.13.15.35
then apply and reboot the device I'm doing futher tests on this to try to make anygw works also via cable, and/or to try to configure mesh protocols on a bridge containing all dsa user_ports (like in the example from @pony). But for now, this patch could be a dirty workaround that provides an alternative to manual configuration. edit: 31-07 |
|
Small update on this: I'm testing this setup which gave some good results:
the dsa device has this configuration:
Here:
|
|
Some good updates on this. I found that adding an entry in the bridge forwarding database with the anygw macaddress associated to the br-lan interface prevents the malformed entry to appear. However this doesn't make the malformed entry disappear if it is already present, one have to wait that it is removed because it is stale or run
What do you think? @G10h4ck @ilario @javierbrk to configure all dsa user ports with 802.1ad babeld and batadv protos ** semi-off-topic: related to this #1170 maybe it could be useful to write down in /etc/config/lime-node the configuration of the specific ethernet interfaces. I.e. in this case a dsa device without specific configuration for ethernet ports must create a section like this for lan1, lan2, lan3, lan4, wan |
Nice!!
Seems that within the LibreMesh code this happens only here: @javierbrk
I think it is ok to include it on all devices. It does not pull any additional dependency and it adds 30 kB, which is not too much.
Maybe using this hotpulg net thing?
Still have to find the time for testing, sorry.
Wait, I don't understand... That line is for fixing another issue, no? Or adding this bridge entry fixes both issues?? Like, it fixes the dsa-dsa cabled router ping issue and also allows us to use the wired interfaces both for lan and for mesh?
Can you rephrase the proposal? Is that LibreMesh should pre-fill the lime-node file with the specific configuration for all wired interfaces on dsa routers? |
|
replaced by #1214 |
An host can ping the anygw of a dsa device if no other libremesh node is connected via cable, with the bridge fdb fix and the nftables rule anygw restarts to work correctly via cable for hosts connected via cable. I'm not sure about #1121. I think it partially got solved by discontinuing the configuration of batadv on eth0. In the tests of this fix I'm connecting dsa-dsa dsa-swconfig dsa-hosts devices via cable without noticing errors or loops. So I would say yes!
Yes, but maybe also on swconfig devices, pre-separating each port with vlans eth0.2, it could be useful. |
WIP based on the solution proposed by @pony1k in #1121 (comment)
Related to #1192 #1121