Zerotier with pacemaker clustered services

This may be me making this harder than it needs to be, or maybe not. If I join 2 cluster servers to zerotier and they each get a Zerotier IP, and I then want to assign an IP that moves between the 2 servers based on pacemaker on linux, I’m not super clear how to do that. I’m guessing if it’s in the same subnet it should work just like it does with the physical network connections, but I won’t have a client ID (or I’ll have n client IDs) for this IP. How do I tell Zerotier to not use that IP address for new clients?

I’m using my own controller, so I guess I need to make an API call, but I’m not finding anything in the docs.


How do I tell Zerotier to not use that IP address for new clients?

You could modify the Auto Assign Range so it doesn’t include addresses you want to manually manage.

It looks like the API docs are missing the network member update endpoint.

The tutorial is missing how to set and ip address as well. Sorry.

The controller readme gets close to explaining.

Will try to get those updated. Good luck!

It may be those things would make it clear - but - most posts I found said that for non-auto assigned IPs they still needed to be in the same subnet - but I’m not super clear how to set the subnet, when it’s just a range of auto assigned IPs? If I want to do a /22 or something, will that work? Or is ZeroTier entirely layer 2 basically, and I can ?somehow? push whatever netmask I want to a given ZeroTier network?


You just need a “Managed Route” with no “via”. You can change that too.

On the web ui, the form looks like this:

The tutorial has an example

curl -X POST "http://localhost:9993/controller/network/${NWID}/" -H "X-ZT1-AUTH: ${TOKEN}" \
-d '{"ipAssignmentPools": [{"ipRangeStart": "", "ipRangeEnd": ""}], "routes": [{"target": "", "via": null}], "v4AssignMode": "zt", "private": true }'

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