BitTorrent Protocol (a.k.a. Peer Protocol) examples

Here I present some examples of BitTorrent protocol interactions.

Wireshark can be used to analyze BitTorrent protocol interactions in TCP/IP.

Remember that BitTorrent’s peer protocol operates over TCP or uTP. At the time of writing, Wireshark could identify correctly a uTP connection, but unfortunately would not decode its contents as a BitTorrent protocol session. It decodes it fine for TCP/IP connections.

Message flow/sequence

screen-shot-10-21-16-at-04-34-pm

Handshake example

The Handshake message flows in both directions, this means that each peer sends an handshake message to the other.

screen-shot-10-25-16-at-03-54-pm

“Extended” message examples

In these messages we can see which extensions are supported by a peer / downloader.

uTorrent

d
1:m
d1
1:upload_only
i3e
11:lt_donthave
i7e
12:ut_holepunch
i4e
11:ut_metadata
i2e
6:ut_pex
i1e
10:ut_comment
i6e
e
13:metadata_size
i401e
1:p
i20111e
4:reqq
i255e
1:v
15:Torrent 3.4.8
2:yp
i6881e
6:yourip4:
e

qbittorent

d
1:m
d1
1:lt_donthave
i5e
11:upload_only
i2e1
1:ut_metadata
i15e
6:ut_pex
i1e
e
13:metadata_sizei401e
4:reqq
i250e
1:v
18:qBittorrent v2.9.8
6:yourip
4:
e

 

Port, Interested, Unchoke example

Screen Shot 10-12-17 at 11.34 AM

Request+Piece example

A request for a piece of a file:

Screen Shot 10-12-17 at 11.36 AM

The reply with the piece’s data contents:

Screen Shot 10-12-17 at 11.37 AM

Not Interested example

Screen Shot 10-12-17 at 11.37 AM 001

 

Downloader Peers screenshots

Usually, when a peer is connected to another one, the remote peer appears in the “Peers” tab for a torrent.

Example

screen-shot-10-19-16-at-12-18-pm

Downloader Ports configuration

uTorrent

screen-shot-10-19-16-at-12-25-pmscreen-shot-10-19-16-at-12-23-pm

 

screen-shot-10-20-16-at-07-26-pm

References

 

 

 

Advertisements

One comment

  1. vindalho · October 12

    Bravíssimo 🙂

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s