Flip ZeroTier IP from one server to another one

Hi! Lets say I have two computers, A and B, bot with ZeroTier working, and everything is working fine. Now I want to add an extra IP x.x.x.x to one of the servers, for example server A. If I go to the myzerotiercom, I can go to “Managed IPs”, and click the “+” button and add it, and everything works, I can ping it.

Now I can flip the IP by removing it from server A and adding it to the server B (via myzerotier), and everything works as expected.

The question is, can I do this from zerotier-cli or via API or any other way that is not via myzerotiercom?

I have tried several options, but none of them works:

  • Adding the same IP to both servers from myzerotiercom. I was hoping that, somehow, ZeroTier detect that one of the server is down and start sending traffic to the other one, but no. Both servers have the IP, but only one replies to ping (from a third one), and if I shut it down, ping starts timing out.
  • I have tried adding the IP directly to the interface. This “works”, but there is no route, I can not ping it from a third server. It looks like the configuration always goes from top (myzerotiercom) to bottom, and no changes can be done in the other way.

Any other hint?
Thanks!

Hello.
There is an api for that. https://docs.zerotier.com/central/v1#tag/network-member

This is the same api that the web ui uses, so it should work if it’s working for you with the ui.

This topic was automatically closed after 30 days. New replies are no longer allowed.