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
RFC add babeld-auto-gw-mode #844
Conversation
packages/babeld-auto-gw-mode/files/etc/watchping/wan-ok.d/babeld-gw
Outdated
Show resolved
Hide resolved
Amazing SAn, thanks!!!! |
Thank you @ilario for letting me know about this, I did not notice. In my previous tests, when an Internet gateway of a router failed, any other router stopped using it, and they automatically (after several minutes) switched to a working Internet gateway. Any other router but itself. The router with the failing Internet gateway did not automatically switch to a working one, so all its clients were not able to reach the Internet unless the router was manually rebooted. |
Hi! To fix #822 what do you think about Increasing the metric, by a very large amount, of the default gw when it is not working so that this route is not used if there is other default route distributed by other node. |
@G10h4ck what do you think? I will try this idea and report back but I would love a confirmation that it is sound. |
0be853f
to
8f372ae
Compare
I have implemented and tested this using the new qemu cloud work from guido (#813). It is working as expected :) @amuuza can you test it?! |
Note that ipv6 support is still not done. |
Hi @spiccinini |
Quite there! In that same line you also have to replace |
Weird. Try deleting the feeds/ directory and run again the update. |
Thanks. Everything seems ok now, I don't know why. It is now compiling. I'll let you know when the tests are done. |
I did the test:
RouterA, RouterB and RouterC are wirelessly meshed. If RouterB is reaching the Internet through RouterA, and ISP-A loses its Internet connectivity, then both RouterA and RouterB obviously lose their Internet connectivity. After 8 minutes approximately, Router B switches its Internet gateway automatically to ISP-C. However, RouterA will not switchover automatically. |
@amuuza thanks for testing!! So it is not working as expected for you. Can you check that you have correctly installed the new package babeld-auto-gw-mode in RouterA ? (with opkg -l | grep babel) |
Ooooh, I forgot to include it with Menuconfig!! Ilario told me so, but I forgot!! I'll do everything again and let you know. By the way, isn't there any way to do the tests through software? Maybe GNS3? |
I reinstalled RouterA, now with the right image (I hope so). I waited for more than 10 minutes and there was no automatic switchover. It only worked when I manually rebooted the router. There is a just a little improvement: this time it only required a manual reboot to work, there was no need to take out the active (but without Internet) WAN cable to make it work. While waiting for the switchover I entered your suggestions:
@spiccinini, if you want me to test something while being on IRC, let me know which UTC times are ok with you. |
For testing with software I am using full virtualization with qemu as explained in https://github.com/libremesh/lime-packages/blob/master/TESTING.md#development-with-qemu-virtual-machine In particular to test this I used this PR #813 that allows to create multiple mesh clouds interconected. But I had to do some manual things to do the WAN/internet access. |
OK so it is not working as expected yet.
Ok this looks good :)
Can you grep using
I am usually online from 10 to 20 UTC-3. Thanks for all the work! |
Oops, sorry, I did
Cool. Maybe later today or tomorrow, I'll let you know. |
8f372ae
to
73e1840
Compare
73e1840
to
1aa97c6
Compare
I've found a bug! I have already fixed it. @amuuza You will have to run the feed update, please check if there is an error delete the feeds/libremesh folder and re run the feeds update. |
Yes, now it does work!! Thank you! In one or two minutes RouterA was back online, despite having its no-internet-WAN connected. |
I think this is an important step for Internet sharing. Now I have some questions about metrics and monitoring... but I'll ask them in the list. |
Sorry, ipv6 support is not done yet, I will work on that now. |
Travis build is failing with
I don't know if there is something we can do other than changing the docker registry. |
seems there are some options here: https://docs.travis-ci.com/user/docker/ |
Hello, |
This reverts commit 8503f88.
I have reverted the ipv6 support as it may be problematic in some scenarios. I propose that we merge this with ipv4 and then if there is need of ipv6 support we can implement it (I reverted the ipv6 patch so we can have it at hand in the git history). |
Seems a good idea to me, at worst changing the route metric may confuse DHCP client so it may forget to remove it when the lease is lost, but since we increased the metric so much and don't share that route to other nodes, even if the route remain after the lease is lost it should not create any problem. |
I see I've been asked for a review, but I can't hardly read any code. What I have done is testing it, if that's enough to give an approval review let me know and I'll do it. |
Given that we need 2 reviews to merge, in my opinion, testing is a valid review. |
@@ -0,0 +1,11 @@ | |||
#!/usr/bin/lua |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any concrete use of the lime-config
hotplug.d subdirectory?
It looks like a grouping that is not documented, and it is not clear for me if it should be there or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed lime-config hotplug.d documentation is missing, it was introduced in early 2019.
hotplug.d for lime-config is similar to having a generic run_asset
configured with ATCONFIG
but it is enabled just by puting the script in the directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did some comments... looks pretty straightforward. haven't tested it out myself, but have read each line.
I am a little worried how the ipv6 conversation is harder... @altergui may be you want to contribute to it (as I remember you are invested in ipv6 support).
Thanks @spiccinini for working on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it. It works.
Wow, just saw this in the mailinglist. Great to see progress and a fix for this feature! Will also test it the next days. Thanks for the work!!! |
By default babeld will redistribute all the routes installed even if they "don't work". For example when the internet provider use DHCP and the service is not working but interface is up, the route is installed but not working and babeld will anounce the non working route to the network.
This package provides a solucion using watchping hooks that adds routes with a special protocol number (7) when the WAN port has a working internet access and removes this route when the internet connection is not working as detected by watchping.
Fixes #93 #822
Open questions:
Should the route be installed with itsNosrc
attribute?Should we remove the default gw route when the internet connection is not working and replace it with a route to only the src address? This would fix Internet failover for every router #822 any other ideas?DONETODO: add ipv6 supportNot for this PR