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

0 votes
I created a Private Ethereum network and then made connections between my peer and other peers and it is successful. Now I want to check the IP address of the peer connected to my peer. How to do this?
Jan 10 in Blockchain by slayer
• 29,040 points
18 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

To get these details, you can use the admin.peers method. 

> admin.peer()

This method will return all the details of the connected peers. Along with the IP address, you will also see peer ID, name and  port.

The output will look something like this:

[{
      ID: 'a4de274d3a159e10c2c9a68c326511236381b84c9ec52e72ad732eb0b2b1a2277938f78593cdbe734e6002bf23114d434a085d260514ab336d4acdc312db671b',
      Name: 'Geth/v0.9.14/linux/go1.4.2',
      Caps: 'eth/60',
      RemoteAddress: '5.9.150.40:30301',
      LocalAddress: '192.168.0.28:39219'
}, {
      ID: 'a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c',
      Name: 'Geth/v0.9.15/linux/go1.4.2',
      Caps: 'eth/60',
      RemoteAddress: '52.16.188.185:30303',
      LocalAddress: '192.168.0.28:50995'

} ]
answered Jan 10 by Omkar
• 65,840 points

So only the admin of the network will be able to run the admin.peers method right? what if if i'm not the admin?

Related Questions In Blockchain

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
• 65,840 points
12 views
0 votes
1 answer

How to get Node URL in private ethereum network?

You have already noticed that  admin.peers does ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 65,840 points
11 views
0 votes
1 answer

How to get the number of tokens in the Bitcoin network?

This information can easily be calculated by ...READ MORE

answered Aug 31, 2018 in Blockchain by Christine
• 15,790 points
21 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
63 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 112 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
• 65,840 points
20 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.