← Back to team overview

p2psp team mailing list archive

Re: NAT Traversal Set of rules implementation

 

Hi Vicente,

On 22.06.2015 16:44, Vicente Gonzalez wrote:
> Hello Max,
>
> thanks for your report.
>
> Please, check also: http://slides.p2psp.org/BCN-2015, where we provide
> some ideas about NAT traversal algorithms in P2PSP.
>
> Regards,
> Vi.
Thanks for providing this link.
The documentation now splits up NTS into Restricted NAT Traversal and
Symmetric NAT Traversal set of rules, so I suppose I should create two
distinct classes as well, and rename the current NTS into RTS. The
second part of NAT Traversal will then be implemented as STS classes,
probably subclassing RTS and extending them by port prediction.

> On Sun, Jun 21, 2015 at 10:21 PM Max Mertens <max.mail@xxxxxxxxxx
> <mailto:max.mail@xxxxxxxxxx>> wrote:
>
>     Currently I perform the connection tests manually, by changing the
>     iptables rules (and incrementing the port numbers each time, as
>     the "established" and "related" connection flags remain for a
>     while for already used ports) and writing the results in a table.
>     Now I am writing a bash script to automatically run these tests
>     and output a result table. I would put the script in the "tools"
>     directory when ready, if that's ok?
>
The script is now functional, you can have a look at it in the repo [1].
It outputs a table with "yes" if the two peers can send packets to each
other, and "no" else. Now I have a automatic and reliable way to test
NAT Traversal between peers, and can apply it on different
implementations (though the script takes about 5 minutes to run, to
ensure that the stream can be buffered completely for each configuration).

The results differ a bit from the ones I got so far, as now in the test
I make a distinction between monitor and peer, and which type of NAT
each of them is behind. The resulting tables are included at the bottom.
I will send a pull request for the nts_doc branch when the documentation
for the Virtual Machine setup and for the test itself is ready.

Regards,
Max

[1]
https://github.com/jellysheep/p2psp/blob/nts_doc/tools/test_NAT_traversal.sh

    Monitor_LRS, Peer_FNS, Splitter_LRS (master branch, commit fafca93):

    Mon\Peer| fcn    | rcn    | prcn    | sym
    ==========================================
    fcn     | yes    | yes    | yes     | yes
    rcn     | yes    | yes    | yes     | yes
    prcn    | no     | no     | no      | no
    sym     | no     | no     | no      | no

    Monitor_NTS, Peer_NTS, Splitter_NTS (nts branch, commit 1b844e4):

    Mon\Peer| fcn    | rcn    | prcn    | sym   
    ==========================================
    fcn     | yes    | yes    | yes     | yes
    rcn     | yes    | yes    | yes     | yes
    prcn    | yes    | yes    | yes     | no
    sym     | no     | no     | no      | no


Follow ups

References