<p>No, that is not possible. The P2P protocol offers no such feature, by design.</p>
<p>The topology of the network graph is considered secret, because someone who knows how nodes are connected could leverage it to do other attacks (e.g. partitioning attacks or eclipse attacks).</p>
<p>Despite that, the protection against revealing this information is however only best effort, as it is very hard to completely exclude the possibility for peers to infer something. For example, a paper from 2018 called <a href="https://arxiv.org/pdf/1812.00942.pdf" rel="nofollow noreferrer">TxProbe: Discovering Bitcoin’s Network Topology
Using Orphan Transactions</a> showed how to infer connections between attacker-connected nodes using conflicting transactions. Several techniques using (IP) address gossip messages on the network have also been described. These attacks do get fixed or partially mitigated when discovered, but many more probably exist.</p>
<p>Still, it does mean you'll effectively need to find an exploit to get this information. It's not exposed deliberately as a feature.</p>

CC BY-SA 4.0
2022-10-31T12:58:02.873Z
2022-10-31T17:37:12.770Z
2022-10-31T17:37:12.770Z
Pieter Wuille
<p>I can use <code>bitcoin-cli getpeerinfo</code> to get the peer nodes' information. Is there some way to further get the peer nodes' peer nodes, i.e. the 2-order neighbor node?</p>

<bitcoin-cli><peers><peer-discovery>
Is there any way to get my peer nodes‘ peer nodes？
noob
# Is there any way to get my peer nodes‘ peer nodes？

(Asked by: username_0 on 2022-10-31)

I can use `bitcoin-cli getpeerinfo` to get the peer nodes' information. Is there some way to further get the peer nodes' peer nodes, i.e. the 2-order neighbor node?

**Tags:** bitcoin-cli, peers, peer-discovery


---

## 1 answers

### Answer by username_1 on 2022-10-31. Score: 2

No, that is not possible. The P2P protocol offers no such feature, by design.

The topology of the network graph is considered secret, because someone who knows how nodes are connected could leverage it to do other attacks (e.g. partitioning attacks or eclipse attacks).

Despite that, the protection against revealing this information is however only best effort, as it is very hard to completely exclude the possibility for peers to infer something. For example, a paper from 2018 called [TxProbe: Discovering Bitcoin’s Network Topology
Using Orphan Transactions](https://arxiv.org/pdf/1812.00942.pdf) showed how to infer connections between attacker-connected nodes using conflicting transactions. Several techniques using (IP) address gossip messages on the network have also been described. These attacks do get fixed or partially mitigated when discovered, but many more probably exist.

Still, it does mean you'll effectively need to find an exploit to get this information. It's not exposed deliberately as a feature.


---

