Get ip address of all nodes

+1 vote
Hello!

If i create a blockchain for example, for 3 nodes where1 node is a server. I can get information from command getpeerinfo on node 1 about ip addresses of all nodes, but can see only node1(server) Ip address from node 2 and node 3. Can i somehow see information about all nodes from any node i want? For example i want to see ip address of node 1 and node 2 from node3 and back from node 2. Thank you!
asked Mar 15, 2021 by Alex

1 Answer

0 votes

Your best solution for this is to ensure the nodes can actually connect to each other in the peer-to-peer network. Usually if this is not happening, it is because of some firewall or router that is preventing this direct connection. Doing this has the added advantage of making your network more resilient and not dependent on the node in the middle to relay information. Plus of course the IP addresses will be shown in the output from getpeerinfo.

answered Mar 16, 2021 by MultiChain
I’m sorry, but im not sure if I understood you right. Node1 > create blockchain; node2 node 3 > connect to node 1; on node1 > get peer info > outputs about ip addresses of node2 node3; on node2 meanwhile I’ll see only node1 IP address, same on node3.

I just need to see all the information about all participants of blockchain from any node, is it possible?
The nodes will all automatically connect to each other (peer-to-peer) if they are able to do so by the network. There is no automatic way to see the IP addresses of all the other nodes I'm afraid.
Thanks for so fast replying! Okay, thank you! So the last question, multi chain acts as a “server-client” software, I guess there is no way of “serverless” topology?
Between the nodes it is "serverless" in the sense that all nodes are equal peers. That is the point of the blockchain.
...