-
Notifications
You must be signed in to change notification settings - Fork 94
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
Babeld check internet access before sharing [was: Babeld gateways prioritization [was: ForceWAN Web Interface]] #93
Comments
I think it is clear enough. An example: you plug internet into WAN port of your LiMe router and use WiFi from LiMe router for accessing internet in your house, but you don't want your internet to be shared with the rest of the LiMe network. Or even you plug in but by default you don't want to use it for accessing the internet (e.g. because or erratic connection performances due to ISP). |
This was actually misunderstood, sorry. This would be solved by a "simple checkbox" in the web interface which basically tells a router "Please announce that you have Internet connectivity to the rest of the mesh, even if you can't detect it with your poor watchping method" |
Ok, so the problem would be mitigated also with a solution like replacing watchping as discussed on #66. Use directly connected gateway:
Share direct internet access with other nodes:
|
Coming back to the original scope of the issue: announce internet access without checking, some ways to do this:
For the last two options, would the wan be always shared or some commands (like the ones here) have to be issued? EDIT: yes, the gateway has the default route anyway, but the other nodes have it just if BMX6 is instructed to share it. |
For example, in More elegant would be to add a "openwrt" section in /etc/config/lime* files with relative openwrt.lua file for editing generic openwrt options not included in the other sections?
where SPACER could be more or less whatever special character that uci likes (in the option names there's usually no special character, so any of them should be ok, for example we can safely use here the colon |
On #403 @gmarcos87 pointed out that announcing a non-working internet connection is a very bad idea as Android's apps does not like it at all. |
The idea is then to add a configuration option that is: This node is a gateway, announce it to the mesh. I'm thinking it can be problematic, someone can break connectivity just by announcing false connections. |
To address this case we should just improve watchping to download a small file from some reliable server (like https://fedoraproject.org/static/hotspot.txt or http://network-test.debian.org/nm or http://networkcheck.kde.org/ or http://start.ubuntu.com/connectivity-check.html or http://detectportal.firefox.com/success.txt or the empty http://connectivity-check.ubuntu.com, there are more urls by Google and Apple here: https://stackoverflow.com/a/14030276/) and compare its content with the expected one rather than using ICMP ping (or replace watchping with some better tool). Anyway, Babeld (which will replace BMX6 in the next 19.something release) just announces all the default routes it gets, without checking in any way, correct? |
Confirmed. If a default route is received by the router, Babeld does not check if it works.
I think that we can do something even better than an on/off switch: in case of wireless WAN connections, the quality can be estimated and communicated to Babeld as a metric (or something else? See Babeld man page for more options: https://www.irif.fr/~jch/software/babel/babeld.html ).
otherwise, seems that options EDIT: every node shares info on its default4 route, if every node evaluates and communicates its metric the result could be verrry weird. We need some Babeld pro user/dev to give an opinion on the option I propose. |
Minimal |
Babel is not in charge of checking if the routes published by the kernel are good or not, it assumes that they are. babel-pinger package in openwrt https://github.com/openwrt-routing/packages/blob/master/babel-pinger/Makefile |
Sorry for not reporting the content also here but I threw a couple of ideas in this email: https://lists.libremesh.org/pipermail/lime-users/2020-November/001828.html In order to detect if a node has internet access we can use the check-internet package. Both for ensuring that this runs only on the nodes which actually have a WAN connection and for executing corrective actions, we can use watchping extending it with the configurable option to use check-internet instead of ping. Alternatively, we can copy the watchping package with a new name (e.g. watch-check-internet) and just rewrite the needed parts. What to do in case of working/non-working internet is more dubious. We could instruct Babeld to stop sharing the broken internet access to the rest of the mesh, like it was done in the previous releases, see for example in bmx6-auto-gw; One small problem I see with this is that anyone directly connected to the gateway LibreMesh node will still be using the broken internet connection, no? I mean, the other nodes will stop receiving the broken route but the very node connected via WAN to the internet (let's call this node "the gateway") will still use the broken route, no? An idea to solve this: in the case that Babeld can share the route from all the gateways to all the gateways (I don't know if this is already is the default...), each gateway can evaluate its own connection and increase its metric (i.e. decrease the priority) and Babeld has an option to consider this value (reflect-kernel-metric, did not manage to have it working yet). Once the metric has been modified, the watch-check-internet script should make sure to check using the local WAN interface (this could be done with curl's |
A user wants to configure what happens when he has WAN access. The options would be to force share, force not to share, or let the algorithm choose what to do.
In spanish: wan autodetecte que tiene internet, o que lo fuerces a que no o a que si.
The text was updated successfully, but these errors were encountered: