The rasberry pi and my laptop are using same network

From my laptop admin.addPeer("enode from above rasberrypi")


When i run admin.nodeInfo.enode i get a different IP and when i check it from my http://www.whatismypublicip.com/ it returns some different IP Which IP should i use while connecting the 2 nodes while net.peerCount still remains 0 even if it returns true . Is their any configuration that needs to be taken care of ? What is the command if i want to include genesis also at the time of node creation

  • 1
    If you're operating from the same network, you need the private IP address of your raspberry pi. You can get that by using ifconfig. The admin.nodeInfo.enode shows the private IP address and the website you referred to shows the public IP address. Hence, the confusion.
    – galahad
    Aug 22, 2016 at 14:17

1 Answer 1


On both nodes, you need to run the same genesis commands:

geth --datadir /where/ever init /your/genesis.json

And the same launch command:

geth --datadir /where/ever --networkid A_NUMBER

Your admin.addPeer() command is correct. Make sure that the long hex part of the enode of your laptop and Raspberry are different. If they are the same, delete the /where/ever/nodekey file and start again.

As for the Raspberry's IP, you should get it with ifconfig instead. Confirm that your laptop can connect to Geth on the Raspberry with telnet IP_ADDRESS 30303.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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