How to connect two different nodes in private ethereum network?

0 votes
I have created two nodes with 5 accounts in each node. Now, I want to send ethers from an account in one node to an account in the other node. For this, I need to have a connection between these two nodes. How to connect these nodes?
Jan 9 in Blockchain by digger
• 27,630 points
132 views

1 answer to this question.

0 votes

To connect two nodes, you can use the bootnode feature. Once you have made the nodes ready, you have to start a bootstrap node. The bootstrap node is used so that other nodes in the network can find your node. To create the bootnode, run the following command:

bootnode --genkey=boot.key
bootnode --nodekey=boot.key

After this, an enode URL  will be displayed on the screen. This URL is used by other nodes to connect to this node.

To connect to this node, run the following command with the right values of your network:

geth --datadir path/to/custom/data/folder --networkid <network id> --bootnodes <bootnode-enode-url-from-above>

answered Jan 9 by Omkar
• 67,290 points

Related Questions In Blockchain

0 votes
1 answer

How to change default account in private ethereum network?

First list the accounts: > eth.accounts NOTE: Even ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 67,290 points
55 views
0 votes
1 answer

How to check peer connectivity in ethereum private network?

You can use the net module to check the ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 67,290 points
20 views
0 votes
1 answer

How to get IP address of peer connected in private ethereum network?

To get these details, you can use ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 67,290 points
34 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
126 views
0 votes
1 answer
0 votes
0 answers

Error: Unexpected token o in JSON at position 1

I have been working with Interacting a ...READ MORE

Mar 6 in Blockchain by saeedi
• 120 points

edited Mar 6 by Omkar 316 views
0 votes
1 answer

How to get account with ethers by default in ethereum private network?

Have you created an account before allocating ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 67,290 points
34 views
0 votes
1 answer

How to import an account in private ethereum network?

 When you create a new account, the ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 67,290 points
21 views