<p>Run 2 nodes with different ports on regtest</p>
<pre><code>bitcoind -regtest=1 -port=18333 -datadir=/home/satoshi/node1

bitcoind -regtest=1 -port=18444 -datadir=/home/satoshi/node2
</code></pre>
<p>Add node1 as outbound connection in node2</p>
<pre><code>addnode &quot;127.0.0.1:18333&quot; &quot;add&quot;
</code></pre>
<p>Run Wireshark and select adapter for loopback traffic capture. You will see some packets with 'bitcoin' protocol.</p>
<p>Example: This is INV message sent by node2 to node1 when I generated a block using <code>generatetoaddress 10 bcrt1qugkqq2a3lhf58e4pclcf52dgd4e02hpve3vhzs</code></p>
<p><a href="https://i.sstatic.net/i9DVI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/i9DVI.png" alt="wireshark" /></a></p>
<p>For reference, Wireshark has included the ability to <a href="https://www.wireshark.org/docs/dfref/b/bitcoin.html" rel="nofollow noreferrer">decode Bitcoin protocol packets since version 1.10</a>.</p>

CC BY-SA 4.0
2023-10-20T12:47:06.450Z
2023-10-22T13:13:54.613Z
2023-10-22T13:13:54.613Z
Egg
<p>I've seen that Wireshark can detect protocol packets like Bitcoin and Lightning Network, which are identified in the protocol column.
However, my Wireshark is not classifying those packets, it just says tcp/ip or http/json.
Does anyone know how to solve that? I want to identify the packets.</p>

<network><p2p><tools><packets>
How to use Wireshark to identify Bitcoin/Lightning P2P packets
Mani T
# How to use Wireshark to identify Bitcoin/Lightning P2P packets

(Asked by: username_0 on 2023-10-20)

I've seen that Wireshark can detect protocol packets like Bitcoin and Lightning Network, which are identified in the protocol column.
However, my Wireshark is not classifying those packets, it just says tcp/ip or http/json.
Does anyone know how to solve that? I want to identify the packets.

**Tags:** network, p2p, tools, packets


---

## 1 answers

### Answer by username_1 on 2023-10-20. Score: 6

Run 2 nodes with different ports on regtest
bitcoind -regtest=1 -port=18333 -datadir=/home/satoshi/node1

bitcoind -regtest=1 -port=18444 -datadir=/home/satoshi/node2

Add node1 as outbound connection in node2
addnode "127.0.0.1:18333" "add"

Run Wireshark and select adapter for loopback traffic capture. You will see some packets with 'bitcoin' protocol.
Example: This is INV message sent by node2 to node1 when I generated a block using generatetoaddress 10 bcrt1qugkqq2a3lhf58e4pclcf52dgd4e02hpve3vhzs

For reference, Wireshark has included the ability to decode Bitcoin protocol packets since version 1.10.


---

