Skip to content
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

Slow initial wireguard connection and gateway switch #89

Closed
goligo opened this issue May 1, 2021 · 2 comments · Fixed by #105
Closed

Slow initial wireguard connection and gateway switch #89

goligo opened this issue May 1, 2021 · 2 comments · Fixed by #105

Comments

@goligo
Copy link
Member

goligo commented May 1, 2021

The current mechanism to setup the wireguard connection and to switch to a different gateway in case of connection failure is unsatisfactory. The script is run once a minute and then uses a random delay of up to 60 seconds until it is started. So initially it may take up to two minutes, until a connection is established.

In case of a gateway failure, e.g. temporary loss of internet connection to one of our server locations, it is even worse - due to the random gateway selections, several tries to unavailable gateways can occur, before a working gateway is selected. Clients which are currently connected, will not automatically get a new IP address or use the new gateway, but rather try to use the old gateway. The DHCP lease time is set to 10 minutes, so it will take another 8 minutes, until clients will send a new DHCP request and eventually get a new IP address and gateway, which works again.

@awlx
Copy link
Member

awlx commented May 2, 2021

This is to be addressed with more logic in freifunkMUC/wgkex#39 @goligo. So we can make the GW selection process faster and wgkex based.

For the clients, that's bad luck and no real solution available.

@goligo
Copy link
Member Author

goligo commented May 2, 2021

While I see how wgkex can help with the Gateway selection, I would expect something like a connection monitor, that permantently checks the connection status and traffic of the wireguard tunnel, could do much better than a cron job running once a minute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants