This repository has been archived by the owner on Jan 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
How to use routing_node
maqi edited this page Jun 18, 2013
·
5 revisions
Detailed Instructions of how to use routing_node
routing_node has a two-level interaction interface. The first level is options to setup nodes, the second level is interaction commands to verify routing algorithm. It also requires a key_file presented (created by routing_key_helper locally or fetched remotely) to allow specifying node ID.
Short | Full | command / arg | Description |
---|---|---|---|
-h | [ --help ] | command | Print options. |
-s | [ --start ] | command | Start a node (default as vault) |
-c | [ --client ] | command | Start as client (default is vault) |
-b | [ --bootstrap ] | command | Start as bootstrap (default is non-bootstrap) |
-p | [ --peer ] | arg | Endpoint of bootstrap peer |
-i | [ --identity_index ] | arg (=-1) | Entry from keys file to use as ID (starts from 0) |
--pmids_path | N/a | arg (=/tmp/pmids_list.dat) | Path to pmid(key) file |
Scenario | Full Command | Note |
---|---|---|
start a bootstrap node using ID 0 | ./routing_node -sb -i 0 | requires two bootstrap nodes, normally use key 0 and 1 |
start a vault node using ID 3 | ./routing_node -s -i 3 -p 192.168.0.145:2056 | peer shall be the endpoint info of one of the bootstrap node, and the two bootstrap nodes must have been joined each other |
start a client node using ID 8 | ./routing_node -sc -i 8 -p 192.168.0.145:2056 | given a key file holding 16 keys, the first 8 keys are reserved for bootstrap and vault nodes, the next 8 keys are for clients. |
Interaction Command | Description |
---|---|
help | Print this interaction commands help menu. |
peer | Set BootStrap peer endpoint. |
zerostatejoin | ZeroStateJoin. |
join | Normal Join. |
prt | Print Local Routing Table. |
rrt <dest_index> | Request Routing Table from peer node with the specified identity-index. |
senddirect <dest_index> <num_msg> | Send a msg to a node with specified identity-index. -1 for infinite (Default 1) |
sendgroup <dest_index> | Send a msg to group (default is Random GroupId, dest_index for using existing identity as a group_id) |
sendmultiple <num_msg> | Send num of msg to randomly picked-up destination. -1 for infinite (Default 10) |
sendgroupmultiple <num_msg> | Send num of group msg to randomly picked-up destination. -1 for infinite |
datasize <data_size> | Set the data_size for the message(in Bytes). |
datarate <data_rate> | Set the data_rate for the message(in Bytes/sec). |
attype | Print the NatType of this node. |
exit | Exit application. |
Scenario | Command | Notes |
---|---|---|
Setup a bootstrap node | peer peer_bootstrap_endpoint ; zerostatejoin | before issue zerostatejoin command, endpoint info of peer bootstrap node must be given; two bootstrap nodes must be given zerostatejoin instruction roughly at the same time to allowing discovering each other, otherwise the process will fail |
Setup a vault/client node | peer bootstrap_endpoint ; join | if bootstrap endpoint info has been given via the first level options, join instruction will be given automatically so no need to manually issue it |
Check local routing table | prt | ensure the node has joined the network before issuing this command |
Check any peer node's routing table | rrt node_index | ensure the node (using node_indexth key) is a vault node |
Send multiple msgs with specified size and rate | datasize 1000; datarate 1000000; sendmultiple 100 | send out 100 msgs, with msg size is 1000 Bytes and datarate is 1000000 Bytes/sec, each msg to a random node |
Send a group msg | datasize 1300; sendgroup 10 | send out a msg having 1300 Bytes of content to the group bearing ID of 10th key from the key file |
MaidSafe Routing Library
MaidSafe Project
- MaidSafe
- MaidSafe-API
- MaidSafe-Common
- MaidSafe-Passport
- MaidSafe-RUDP
- MaidSafe-Routing
- MaidSafe-Encrypt
- MaidSafe-Drive
- MaidSafe-Network-Filesystem
- MaidSafe-Vault
- MaidSafe-Vault-Manager
MaidSafe Papers