Deploying dnetvlan node for Linux and MacOS

1.Download dnetvlan code and compile

Recommended environment: Ubuntu 16.04, 18.04, 20.04:

autoreconf -sfi
# "--enable-testnet" : Declare running in a test environment
./configure --enable-testnet
make
make install

Stable version download

  • Linux client download instructions

    Linux Quick install command:

    curl -fsSL http://d.network/assets/download/dnetvlan/linux/install.sh | bash

    Linux system supported version:

    NameVersion
    Ubuntu1604、1804、2004、2110
    Debian9、10
    CentOS7、8
    Fedora27、28、32、33
    Rocky8
    Rhel8
  • MacOS client download instructions

    Support MacOS 10.13 - 11.x version

    md5: 668d2c7cb8f46af80838de8c02852567

    link: dnetvlan-mac.zip

    Installation steps:

    1. unzip dnetvlan-mac.zip
    2. Execute the installation script
      sudo ./install.sh

2.dnetvlan node component

namedescript
dnetddnetvlan node daemon
dnetclidnetvlan node cli

3.Initialize dnetvlan node

# Initialize
#   "client"         : Declare role as client
#   "localhost:port" : Local ip and port (default port: 1213)
sudo dnetcli init client [localhost:port]

4.Request "dnet admin" to add dnetvlan node to the dnet

Execute the "status" command to get the client node address:

# Returns the running status of the client node.
dnetcli status

# Return result description:
#   "role"      : client
#   "status"    : Client running status (running/stop)
#   "reachable" : Client virtual network status (online/offline)
#   "ip"        : virtual ip address
#   "name"      : Client node name
#   "address"   : Client node address (unique identifier)
#   "datadir"   : Client configuration file directory
#   "vlan"      : The virtual group where the client is located 
#                 (including connected and unconnected groups)

Provide address to the dnet admin, who will manually add it to the specified dnet as a member node.

After the dnetvlan node is added to the dnet, it may take a while to synchronize the data, depending on how fast the blockchain produces blocks.

5.Start the dnetvlan node

Execute the start command to start the client:

# Start the dnetvlan as a daemon
#   "loglevel" : Run log level (default 0)
sudo dnetcli start [loglevel]

Run "status" to view the current running status:

(For the return result, please refer to the previous "status" command return value description)

dnetcli status

When the dnetcli executes the status command, if the returned "status" attribute is "running", it means that the dnetvlan is already running. At this time, if the "reachable" attribute is "offline", it means that the dnetvlan is offline. You don't need to worry because the current dnetvlan node is not connected to the dnet.

Next, it needs to wait for the dnetvlan node to be confirmed in the added dnet. The speed of this confirmation process depends on the speed of the blockchain to generate blocks.

6.Verify the dnet where the dnetvlan is located

In the first two steps, we have started the dnetvlan and provided the dnetvlan address to the dnet admin, then wait for the dnet admin to add the dnetvlan node to the specified dnet, and then the blockchain synchronizes this part data.

The average block generation time of the blockchain is 2-3 minutes. This does not guarantee that each block generation time is within the average time. You may wait longer, but the synchronization will be successful in the end.

In a short time, if you want to check the status of the client node's application to join the dnet, you can execute the getvlanlist command to find it.

# Get the dnet where the dnetvlan is located
# Contains dnet information and member status in dnet
dnetcli getvlanlist 

# Return result description:
#  "Name"         : DNet id 
#  "Alias"        : DNet alias 
#  "Status"       : The status of the dnetvlan in the dnet 
#                   (1:connected \ 0:not connected)
#  "OnlineCount"  : The number of online dnetvlan in the dnet
#  "OnlineNodes"  : Online dnetvlan in the dnet
#                   (display dnetvlan virtual IP)
#  "OfflineCount" : Offline dnetvlan in the virtual group 
#                   (display dnetvlan virtual IP)

If after a long period of time, the getvlanlist command still cannot obtain the dnet that the client applies to join, you can execute the syncvlan command to force the synchronization from the blockchain once, and you can also ask dnet admin confirm that the dnetvlan address has been added.

# Force sync data
dnetcli syncvlan

After manually executing the synchronization command, you need to continue to execute the getvlanlist command to confirm the synchronization result of the application of the dnetvlan address to be added to dnet.

7.The dnetvlan connect or disconnect from dnet

When the dnetvlan node is successfully added to dnet (confirmed by the miner), execute the getvlanlist command to obtain the dnet list information where dnetvlan is located. In the returned result, the "Name" attribute in the dnet list is the unique identifier of each dnet, which is called dnet_id here for the convenience of subsequent operations.dnetvlan node need to manually select the specified dnet_id to establish a connection with the dnet.

The first time a dnetvlan node connects to a new dnet is not automatic, and requires manual execution of the command connect or disconnect dnet id.

When the dnetvlan finishes executing the connect or disconnect command, the dnetvlan node internally remembers this operation. The next time the dnetvlan starts, the connect or disconnect command will be automatically executed to restore the state.

# The client establishes a connection with the specified dnet
dnetcli connect [dnet_id]

# Client disconnects from specified dnet
# dnetcli disconnect [dnet_id]

Tip: When the dnetvlan connects or disconnects from the dnet, the network response may time out, please try again manually.

Next, you can execute the status command or the getvlanlist command to verify the running status of the dnetvlan in the dnet:

  • Execute the status command to verify the dnetvlan node "connected dnet" and "unconnected dnet" information.

    "vlan":{
    # List of connected dnets  
    "connected":[]# List of disconnected dnets
    "disconnected":[]
    }
  • Execute the getvlanlist command. The "Status" property of each dnet is the status of the dnetvlan within the dnet. When "Status" is equal to 1, it is connected, otherwise it is disconnected.

Edit this page on GitHub