There is a list of commands to interact with NODE:

  • NODE ADD - adds node address to node list
  • NODE DEL - deletes the node using address
  • NODE ALIAS - creates alias for the node
  • NODE CONNECT - establishes connection with the other node
  • NODE HANDSHAKE - checks possibility of establishing connection between your node and other
  • NODE CONECTIONS - lists nodes that are connected to your node
  • NODE BALANCER - lists balancer records
  • NODE DUMP - shows all information about nodes in the network or about definite node

Commands for interaction with remote node:

Node Command - NODE ADD

Adds node address to node list  

CLI Example

Command syntax:

node add  
-net <net_name>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list

Example:

Command:

cellframe-node-cli node add 
-net foobar

Response:

Node addr successfully added to node list

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"node", "params":["node;add;-net;foobar"], "id":"1"}'

Response:

{
  "type": 0,
  "result": "Node addr successfully added to node list",
  "errors": null,
  "id": 1
}
Link to original

 

Node Command - NODE DEL

Deletes the node using address (only one who added node can delete it)  

CLI Example

Command syntax:

node del 
-net <net_name> 
-addr <node_address>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-addr - address of the node

Example:

Command:

cellframe-node-cli node del 
-net foobar 
-addr C96C::1FC9::981C::8248

Response:

node deleted

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"node", "params":["node;del;-net;foobar;-addr;C96C::1FC9::981C::8248"], "id":"1"}'

Response:

{
  "type": 0,
  "result": "node deleted",
  "errors": null,
  "id": 1
}
Link to original

 

 

Node Command - NODE ALIAS

Creates alias for the node  

CLI Example

Command syntax:

node alias 
-addr <node_address> 
-alias <node_alias>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-addr - address of the node
-alias - alternative node name

Example:

Command:

cellframe-node-cli node alias 
-addr C003::2611::8D50::7A07
-alias personalnode 
-net mileena

Response:

alias mapped successfully

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"node", "params":["node;alias;-addr;C003::2611::8D50::7A07;-alias;personalnode2;-net;mileena"], "id":"1"}'

Response:

{
  "type": 0,
  "result": "alias mapped successfully",
  "errors": null,
  "id": 1
}
Link to original

 

Node Command - NODE CONNECT

Establishes connection with the other node  

CLI Example

Command syntax:

node connect 
-net <net_name> 
{-addr <node_address> | -alias <node_alias> | auto}

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-addr\-alias\auto - address of the node\ alias of the node\ connects to random node

Example:

Command:

cellframe-node-cli node connect 
-net mileena 
-addr CCCC::0000::0000::0000

Response:

"None"

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"node", "params":["node;connect;-addr;CCCC::0000::0000::0000;-net;mileena"], "id":"1"}'

Response:

{
  "type": 0,
  "result":"",
  "errors": null,
  "id": 1
}
Link to original

 

Node Command - NODE HANDSHAKE

Checks possibility of establishing connection between your node and other  

CLI Example

Command syntax:

node handshake 
-net <net_name> 
{-addr <node_address> | -alias <node_alias>}

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-addr\-alias - address of the node\ alias of the node

Example:

Command:

cellframe-node-cli node handshake 
-net mileena 
-addr CCCC::0000::0000::0000

Response:

"None"

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"node", "params":["node;handshake;-addr;CCCC::0000::0000::0000;-net;mileena"], "id":"1"}'

Response:

{
  "type": 0,
  "result":"",
  "errors": null,
  "id": 1
}
Link to original

Node Command - NODE CONECTIONS

Lists nodes that are connected to your node  

CLI Example

Command syntax:

node connections 
-net <net_name>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list

Example:

Command:

cellframe-node-cli node handshake 
-net mileena

Response:

Count links: 6
 
Uplinks: 3
---------------------------
| ↑\↓ |    #    |    IP        |    Port    |
|  ↑  |    1    |    206.189.54.151            |    8199    |
|  ↑  |    2    |    192.241.186.245          |    8199    |
|  ↑  |    3    |    159.223.85.13              |    8199    |
 
Downlinks: 3
---------------------------
| ↑\↓ |    #    |    IP        |    Port    |
|  ↓  |    1    |    206.189.54.151            |    1824    |
|  ↓  |    2    |    192.241.186.245          |    1824    |
|  ↓  |    3    |    159.223.85.13              |    1824    |

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"node", "params":["node;connections;-net;mileena"], "id":"1"}'

Response:

{
  "type": 0,
  "result": "Count links: 6\n\nUplinks: 3\n---------------------------\n| ↑\\↓ |\t#\t|\t\tIP\t\t|\tPort\t|\n|  ↑  |\t1\t|\t206.189.54.151\t\t|\t8199\t|\n|  ↑  |\t2\t|\t192.241.186.245\t\t|\t8199\t|\n|  ↑  |\t3\t|\t159.223.85.13\t\t|\t8199\t|\n\n\nDownlinks: 3\n---------------------------\n| ↑\\↓ |\t#\t|\t\tIP\t\t|\tPort\t|\n|  ↓  |\t1\t|\t206.189.54.151\t\t|\t1824\t|\n|  ↓  |\t2\t|\t192.241.186.245\t\t|\t1824\t|\n|  ↓  |\t3\t|\t159.223.85.13\t\t|\t1824\t|\n\n",
  "errors": null,
  "id": 1
}
Link to original

 

Node Command - NODE BALANCER

Lists balancer records  

CLI Example

Command syntax:

node balancer 
-net <net_name>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list

Example:

Command:

cellframe-node-cli node balancer 
-net raiden

Response:

Balancer link list:
 
Got 2 records
Address                   IPv4                downlinks
BBBB::0000::0000::0000    161.35.50.90        25
BBBB::1234::0000::0003    142.93.233.99       10

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"node", "params":["node;balancer;-net;raiden"], "id":"1"}'

Response:

{
  "type": 0,
  "result": "Balancer link list:\n \nGot 2 records\nAddress                   IPv4                downlinks\nBBBB::0000::0000::0000    161.35.50.90        25\nBBBB::1234::0000::0003    142.93.233.99       10\n \n",
  "errors": null,
  "id": 1
}
Link to original

Node Command - NODE DUMP

Shows all information about nodes in the network or about definite node  

CLI Example

Command syntax:

node dump 
-net <net_name> 
[ -addr <node_address> | -alias <node_alias>] 
[-full]

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list (if not specified -  information from all the networks will be shown)
-addr\-alias - address of the node\ alias of the node (optional, if not specified, dump of used node will be shown)
-full - not implemented (optional)

Example for the whole network:

Command:

cellframe-node-cli node dump 
-net foobar

Response:

Node dump:
 
Got 5 nodes:
 
Address                   IPv4                Port    Pinner                    Timestamp
 
ABCD::0000::0000::0001    172.28.0.11         8079    ABCD::0000::0000::0000    Wed, 27 Mar 2024 11:01:37 +0000
 
ABCD::0000::0000::0000    172.28.0.10         8079    ABCD::0000::0000::0001    Wed, 27 Mar 2024 11:02:23 +0000
 
50C8::4551::10FC::3019    172.28.0.22         8079    ABCD::0000::0000::0000    Wed, 27 Mar 2024 11:57:57 +0000
 
C96C::1FC9::981C::8248    172.28.0.21         8079    ABCD::0000::0000::0000    Wed, 27 Mar 2024 12:15:26 +0000
 
ABCD::EF00::0000::0000    172.28.0.20         8079    ABCD::0000::0000::0000    Wed, 27 Mar 2024 12:49:33 +0000```

Example for the definite node:

Command:

cellframe-node-cli node dump 
-net foobar
-addr BCA3::B097::DCDC::CB2B

Response:

Record timestamp: Thu, 03 Oct 2024 10:12:35 +0300
Record version: 2  // record version
Node version: 5.3-283  // build version
Node addr: BCA3::B097::DCDC::CB2B
Net: raiden
Role: NODE_ROLE_ROOT  // node role
Events count: 758
Atoms count: 52439
Uplinks count: 2
Downlinks count: 7
-----------------------------------------------------------------
|       Uplinks node addrs      |       Downlinks node addrs    |
-----------------------------------------------------------------
|       6631::6AD1::D4E4::A588  |       FF76::A533::1896::4ECC  |
|       F4D9::E897::675A::5E8A  |       A2C2::0CD4::38BA::2E8C  |
|                               |       D6CB::5510::2544::FCBB  |
|                               |       72F9::511B::616A::A46F  |
|                               |       A983::7C3F::7FD4::4950  |
|                               |       CC88::3F68::5313::1577  |
|                               |       B6E5::1B78::847A::F026  |
-----------------------------------------------------------------

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"node", "params":["node;dump;-net;foobar"], "id":"1"}'

Response:

{
  "type": 0,
  "result": "Node dump:\nGot 5 nodes:\nAddress                   IPv4                Port    Pinner                    Timestamp\nABCD::0000::0000::0001    172.28.0.11         8079    ABCD::0000::0000::0000    Wed, 27 Mar 2024 11:01:37 +0000 \nABCD::0000::0000::0000    172.28.0.10         8079    ABCD::0000::0000::0001    Wed, 27 Mar 2024 11:02:23 +0000 \n50C8::4551::10FC::3019    172.28.0.22         8079    ABCD::0000::0000::0000    Wed, 27 Mar 2024 11:57:57 +0000 \nC96C::1FC9::981C::8248    172.28.0.21         8079    ABCD::0000::0000::0000    Wed, 27 Mar 2024 12:15:26 +0000 \nABCD::EF00::0000::0000    172.28.0.20         8079    ABCD::0000::0000::0000    Wed, 27 Mar 2024 12:49:33 +0000 \n",
  "errors": null,
  "id": 1
}
Link to original