I am trying to set 2 peer in 1 computer(win 10).

As I saw some question like what I am asking, I init 2 client with same genesis.json, and open 2 cmd for console.

the 1st cmd runs:

geth --networkid 1000 --nodiscover --port 30303 --datadir C:\bc\geth\client\00 --rpc --rpcapi net,eth,web3,personal --rpcaddr --ipcdisable console

the 2nd cmd runs:

geth --networkid 1001 --nodiscover --port 30304 --datadir C:\bc\geth\client\01 --rpc --rpcapi net,eth,web3,personal --rpcaddr --rpcport 8546 --ipcdisable console

then I try to add peer in 2nd console:


It show "true", but when I check the peers with admin.peers, get "[]", net.peerCount return 0.


In 1st command you have added network id as 1000 and in 2nd cmd you have added network id as 1001. To add peers you need to give same network id to both. So keep it 1000 or 1001 in both commands

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.