Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

How to setup a routing network manually

maqi edited this page Jun 18, 2013 · 4 revisions

Explains the steps to setup a routing network manually

Step 1 : Preparing a key file

./routing_key_helper -c -n 20

this will generate a key file containing 20 keys, indexed from 0 to 19. this file can then be copied to other machines to ensure each node joining the network can have the full knowledge of all nodes that shall appear in the network, and also bearing the ID that can be recognized by all the others.

Step 2 : Setup a bootstrap pair

Shell A Shell B
./routing_node -sb -i 0 ./routing_node -sb -i 1
peer B_endpoint peer A_endpoint
zerostatejoin zerostatejoin

make sure issue the zerostatejoin command to A and B at roughly the same time. don't exit the app after zerostatejoin got succeeded.

Step 3 : Join vault nodes

./routing_node -s -i 2 -p boostrap_endpoint

./routing_node -s -i 3 -p boostrap_endpoint

./routing_node -s -i 4 -p boostrap_endpoint

./routing_node -s -i 5 -p boostrap_endpoint

the above will start up 4 vault nodes, bearing ID of 2nd to 5th keys. Make sure no two vaults using same ID. boostrap_endpoint can be the end_point info of one of the boostrap nodes that created in Step 2.

Step 4 : Join client nodes

./routing_node -sc -i 12 -p boostrap_endpoint

./routing_node -sc -i 13 -p boostrap_endpoint

./routing_node -sc -i 14 -p boostrap_endpoint

the above will start up 3 client nodes, bearing ID of 12th to 14th keys. only keys indexed after 1/2 of the total keys are reserved for clients.