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

Supernode nodes don't seem to automatically forget about Edge nodes #1180

Open
ltxhhz opened this issue Jul 2, 2024 · 0 comments
Open

Supernode nodes don't seem to automatically forget about Edge nodes #1180

ltxhhz opened this issue Jul 2, 2024 · 0 comments

Comments

@ltxhhz
Copy link

ltxhhz commented Jul 2, 2024

supernode file: https://github.com/lucktu/n2n/blob/master/Windows/n2n_v3_windows_x64_v3.1.1_r1255_static_by_heiye.zip
version:

Welcome to n2n v.3.1.1-71-g9618512-dirty-r1255 x64_static for Windows
Built on Jan 31 2023 16:36:11

I installed supernode on Windows Server 2019.

According to the documentation here, supernode should forget about the edge node after 2 minutes.

n2n/doc/Faq.md

Lines 73 to 81 in fff50a7

### The edge repeatedly throws an "Authentication error. MAC or IP address already in use or not released yet by supernode" message. What is wrong?
The edge encountered n2n's protection against spoofing. It prevents that one edge's identity, MAC and IP address, can be impersonated by some other while the original one is still online, see some [details](Authentication.md). Mostly, there are two situations which can trigger this:
If you use a MAC or IP address that already is in use, just change those parameters.
If the edge prematurely has ended in a non-regular way, i.e. by killing it using `kill -9 ...` or `kill -SIGKILL ...`, it did not have a chance to un-register with the supernode which still counts the edge for online. A re-registration with the same MAC or IP address will be unsuccessful then. After two minutes or so the supernode will have forgotten. A new registration with the same parameters will be possible then. So, either wait two minutes or chose different parameters to restart with.
And, as a matter of principal, always end an edge by either pressing `CTRL` + `C` or by sending SIGTERM or SIGINT by using `kill -SIGTERM ...` or `kill -SIGINT ...`! A plain `kill ...` without `-9` will do, too. And finally, a `stop` command to the management port peacefully ends the edge as well.

> echo "r 1 edges" | nc64.exe -u -w1 127.0.0.1 5645
{"_tag":"1","_type":"begin","cmd":"edges"}
{"_tag":"1","_type":"row","community":"ltxhhz-net","ip4addr":"192.168.33.101/24","purgeable":0,"macaddr":"00:FF:B6:6B:4C:64","sockaddr":"49.118.105.11:8621","proto":"UDP","desc":"","last_seen":1719907638}
{"_tag":"1","_type":"row","community":"ltxhhz-net","ip4addr":"192.168.33.102/24","purgeable":0,"macaddr":"D6:1B:9E:17:FF:82","sockaddr":"49.118.105.11:5887","proto":"UDP","desc":"CM3588","last_seen":1719907638}
{"_tag":"1","_type":"row","community":"ltxhhz-net","ip4addr":"192.168.33.100/24","purgeable":0,"macaddr":"00:FF:F3:2A:03:51","sockaddr":"116.178.193.11:63908","proto":"UDP","desc":"","last_seen":1719906148}
{"_tag":"1","_type":"end","cmd":"edges"}

the output shows that the '192.168.33.100' node is more than 2 minutes behind the other node 'last_seen', which results in this edge node not being able to be re-registered

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

No branches or pull requests

1 participant