summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-05-17 14:01:25 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-05-17 14:01:25 -0700
commit0e009810599a7702a05b7ae8d3d9851bb57b57f1 (patch)
treec253cea25c045526fd8abf7d10f41a3436f4489a
parentd41b6eb0c81225381aab7afae488ca437a0d2883 (diff)
downloadinfinitytier-0e009810599a7702a05b7ae8d3d9851bb57b57f1.tar.gz
infinitytier-0e009810599a7702a05b7ae8d3d9851bb57b57f1.zip
docs
-rw-r--r--service/README.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/service/README.md b/service/README.md
index ecab6e75..e063f349 100644
--- a/service/README.md
+++ b/service/README.md
@@ -151,7 +151,13 @@ This returns an array of 16-digit hexadecimal network IDs. Unlike /network under
* Methods: GET, POST, DELETE
* Returns: { object }
-DELETE for networks is final. Don't do this unless you really mean it!
+By making queries to this path you can create, configure, and delete networks. DELETE is final, so don't do it unless you really mean it.
+
+It's important to understand how network IDs work. The first ten digits (most significant 40 bits) of a network ID are the ZeroTier address of the controller. This is how clients find it. The last six digits (least significant 24 bits) are arbitrary and serve to identify the network uniquely on the controller.
+
+Thus a network's first ten digits *must* be the controller's address. If your controller is *deadbeef01*, then the networks it controls must have IDs like *deadbeef01feed02* or *deadbeef01beef03*. This API however *does not* enforce this requirement. It will allow you to add arbitrary network IDs, but they won't work since clients will never be able to find them.
+
+To create a new network with a random last six digits safely and atomically, you can POST to */controller/network/##########\_\_\_\_\_\_* where ########## is the controller's address and the underscores are as shown. This will pick a random unallocated network ID, which will be returned in the 'nwid' field of the returned JSON object.
<table>
<tr><td><b>Field</b></td><td><b>Type</b></td><td><b>Description</b></td><td><b>Writable</b></td></tr>