-
Notifications
You must be signed in to change notification settings - Fork 47
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
Random unexpected port after walk_to #1310
Comments
There is certainly a reason. Long story short, this is by design: it is occurring because IPv8 is continuously trying to be smart about the ports it uses to more effectively traverse your network address translation. This is also why the big warning block is in our "Creating your first overlay" documentation: never, ever, depend on the You can get a more complete overview from https://www.usenix.org/legacy/event/usenix05/tech/general/full_papers/ford/ford.pdf (if you're interested). |
Although a port change can happen and is expected behavior, communication breaks down after this. The |
Indeed. I'll put this on the roadmap. |
I looked through the IPv8 internals and analyzed the different address updates. The only thing that makes sense to me would be that this is a faulty remap in whatever address translation is being used. I don't think we can do anything about this root cause within IPv8. However, we can mitigate this behavior for experiment setups. What we can do is add functionality to Peers to make their addresses "read-only", ignoring the sender address reported by the Operating System. This would allow you to set up an experiment for well-known (IP, port) tuples. @bacox would that work for you? |
When I use a manual introduction between two communities using
walk_to
, on rare occasions it uses a random port for the connection.Around 5% of the runs have this behavior.
Description
For community A the host and port are set to
192.168.55.10:9090
.For community B the host and port are set to
192.168.55.11:9091
.The communities run in separate docker containers.
When using a manual
walk_to(192.168.55.11,42:9091)
the connection can end up like('192.168.55.11', 51061)
when I callget_peers()
. In normal occasions, the host and port looks like('192.168.55.11', 9091)
.Output
Currently I do not have a traceback of an error because no error is thrown.
The output in my application is as follows:
Is there an explanation why some connections end up with a random port instead of the port that is creates the community with?
The text was updated successfully, but these errors were encountered: