Closed bbigras closed 1 year ago
Yea - that's just a byproduct of the eventual consistency of the raft log. This is where potentially using the meshdns
service is useful. It will resolve nodes to their ip address at <node-id>.<mesh-domain>
. Where mesh-domain
defaults to "webmesh.internal" and can be overridden at bootstrap.
IPAM itself is a plugin and you could write your own to do it. The only built-in one right now does dynamic assignments. I am thinking a built-in static one may not be a terrible idea.
On second glance - there is some room for the leader to reuse an existing IP address under certain conditions. It's just a gamble if I want to allow that. My initial thought process at the time was it was more important to never have a collision than it was to try to reuse things. Every "Join" is effectively you saying hello for the first time.
7eab325e397ee9b5f291897093d83b2c384ffebf adds the ability to include static address assignments in the built-in IPAM plugin. This should provide more predictability in simpler setups.
Nice.
I tried --mesh.meshdns
yesterday. I think it would work fine for me on Linux since I'm already using "split dns" with resolved, but statics IPs should be simpler on Android (nix-on-droid) and Windows for me.
btw, webmesh is now in nixpkgs https://repology.org/project/webmesh/versions :tada:
btw, webmesh is now in nixpkgs https://repology.org/project/webmesh/versions tada
Sweet! I'll add it to the website. I also need to update that webmesh-git
package to pin versions now. With perhaps another one that builds from main
. Will do that with this next release.
Gonna close this issue for now since we at least have an interim solution, but as always - I'll need to keep improving documentation.
I'm not super familar with NixOS - But I've added a link to your package here: https://webmeshproj.github.io/documentation/installation-instructions/#nixos
Feel free to let me know if I should add more context. Or you are also welcome to open a PR to the website repo. It's just a simple Hugo app.
Originally posted by @tinyzimmer in https://github.com/webmeshproj/webmesh/issues/7#issuecomment-1670259363
Today I'm trying to connect my rpi (at home) to my vps (as the server). The rpi gets 172.16.0.2 at first, but if I restart the node, it gets 172.16.0.3. If I restart it again, I get 172.16.0.2 again. Is that normal?