<p>Wireshark understands the Bitcoin P2P protocol and it's one of the most popular packet capture tools.</p>

CC BY-SA 4.0
2021-01-24T22:14:07.767Z
It doesn't really support the modern p2p network at all, so isn't that useful over just `debug=net` honestly.
Claris
CC BY-SA 4.0
2021-01-24T14:59:03.007Z
2022-02-18T22:11:17.497Z
2022-02-18T22:11:17.497Z
MCCCS
<p>I am interested in how my full node interacts with its peers, what messages it exchanges (e.g. gossip about other nodes on the network, transactions, blocks) and why my full node disconnects with certain peers (is it my full node making the decision to disconnect or the peer?).</p>
<p>I know there is an open <a href="https://github.com/bitcoin/bitcoin/pull/19509" rel="nofollow noreferrer">PR</a> from Troy Giorshev (also covered in this Bitcoin Core PR <a href="https://bitcoincore.reviews/19509" rel="nofollow noreferrer">review club</a>) to make some of this possible to do within Bitcoin Core. What insights will I be able to garner from using this tool? For example will I be able to work out why a peer disconnected (e.g. because it went offline, because my full node was asking for too much information/too demanding, because I sent it transaction(s) it wasn't interested in?) What is possible currently with this PR and what is possible for future improvements of this tool?</p>
<p>(Also will playing around with this tool let me answer this <a href="https://bitcoin.stackexchange.com/questions/101632/why-does-my-full-node-need-to-load-ip-addresses-from-dns-seeds-on-restart">question</a> on falling back unnecessarily on DNS seeds?)</p>

CC BY-SA 4.0
2021-02-01T15:55:26.933Z
I'm surprised that you introduced the new tag "Wireshark" here. Wireshark is just a tool that you are using to track the network messages, but as far as I can tell, Wireshark is neither subject of the question nor has anything to do with Bitcoin specifically itself. The actual topic of your question seems to be "network-messaging-analysis" or similar. Open to suggestions, because that sounds like a mouthful.—Maybe we should think about what distinguishes the tags [tag:network], [tag:p2p], [tag:peers], etc.
Murch
CC BY-SA 4.0
2021-02-01T19:47:30.717Z
Just spotted there were a few Q&As on using Wireshark with Core and thought it would be useful to group them together with a label. An alternative to using Troy's tool is Wireshark as far as I understand so not entirely irrelevant to the question. I'm interested in what you can do with Wireshark, what you can do with Troy's tool and what you might be able to do in future. Maybe p2p-tools as the label rather than wireshark?
Michael Folkson
CC BY-SA 4.0
2021-02-01T20:02:19.667Z
I've merged [wireshark] into [network].
Murch
<bitcoin-core-development><p2p><network>
How can I obtain a better understanding of the P2P messages between my full node and its peers?
Michael Folkson
# How can I obtain a better understanding of the P2P messages between my full node and its peers?

(Asked by: username_0 on 2021-01-24)

I am interested in how my full node interacts with its peers, what messages it exchanges (e.g. gossip about other nodes on the network, transactions, blocks) and why my full node disconnects with certain peers (is it my full node making the decision to disconnect or the peer?).

I know there is an open [PR](https://github.com/bitcoin/bitcoin/pull/19509) from Troy Giorshev (also covered in this Bitcoin Core PR [review club](https://bitcoincore.reviews/19509)) to make some of this possible to do within Bitcoin Core. What insights will I be able to garner from using this tool? For example will I be able to work out why a peer disconnected (e.g. because it went offline, because my full node was asking for too much information/too demanding, because I sent it transaction(s) it wasn't interested in?) What is possible currently with this PR and what is possible for future improvements of this tool?

(Also will playing around with this tool let me answer this [question](https://bitcoin.stackexchange.com/questions/101632/why-does-my-full-node-need-to-load-ip-addresses-from-dns-seeds-on-restart) on falling back unnecessarily on DNS seeds?)

**Tags:** bitcoin-core-development, p2p, network

> **Comments:**
> **username_1**: I'm surprised that you introduced the new tag "Wireshark" here. Wireshark is just a tool that you are using to track the network messages, but as far as I can tell, Wireshark is neither subject of the question nor has anything to do with Bitcoin specifically itself. The actual topic of your question seems to be "network-messaging-analysis" or similar. Open to suggestions, because that sounds like a mouthful.—Maybe we should think about what distinguishes the tags [tag:network], [tag:p2p], [tag:peers], etc.  
> **username_0**: Just spotted there were a few Q&As on using Wireshark with Core and thought it would be useful to group them together with a label. An alternative to using Troy's tool is Wireshark as far as I understand so not entirely irrelevant to the question. I'm interested in what you can do with Wireshark, what you can do with Troy's tool and what you might be able to do in future. Maybe p2p-tools as the label rather than wireshark?  
> **username_1**: I've merged [wireshark] into [network].  

---

## 1 answers

### Answer by username_2 on 2021-01-24. Score: 2

Wireshark understands the Bitcoin P2P protocol and it's one of the most popular packet capture tools.

> **Comments:**
> **username_3**: It doesn't really support the modern p2p network at all, so isn't that useful over just `debug=net` honestly.  

---

