← Back to team overview

p2psp team mailing list archive

Re: NAT Traversal Set of rules implementation

 

2015-06-06 18:13 GMT+02:00 Max Mertens <max.mail@xxxxxxxxxx>:

>  Hi everyone,
>

Hello Max,


> now I tested UDP hole punching with different combinations of NAT types
> (using iptables commands from [0] and chownat [1]), and got the following
> results:
>
>   FCN Full-cone NAT  RCN restricted-cone NAT  PRCN port restricted-cone
> NAT  SYM symmetric NAT
>   Client \ server *FCN* *RCN* *PRCN* *SYM*  *FCN* yes yes no no  *RCN* yes
> yes no no  *PRCN* yes yes no no  *SYM* (no) (no) no no
>
> The "(no)" shows that the server receives the client's attempt to connect
> and tries to respond, but no connection can be established. These cases
> maybe can work with another hole punching approach though.
> The results should not be considered 100% valid, as I found (essentially)
> different iptables configurations for each NAT type.
>

A remark. We can suppose that the splitter (I think, your server) will run
in a public host, with all the port open.


>
> The next step I would like to do is to implement the NAT Traversal Set of
> rules in Python via UDP hole punching (with the splitter as a "STUN
> server"), using UDP for data transmission.
> Then the only case where a connection does not work should with peers both
> behind symmetric NATs. In this case, another (or the same) Set of rules can
> use new port prediction methods ([2], [3]) to obtain the public endpoint
> and use the NTS to establish a connection.
> Some open questions:
>
>    - Is there already some kind of case differentiation implemented,
>    where the peers determine the type of NAT they are behind (using the
>    splitter), and automatically choose the Set of rules they need?
>
>
No, but we can think that all peers will implement the overhead of the NAT
Traversal Set of rules (I hope, with a negligible protocol overhead ... I
mind, with a small number of small messages).


>
>    - When using UDP to transmit data, where should lost
>    packages/datagrams be recovered? When using software like udptunnel, the
>    P2PSP classes could expect a reliable stream; but as stated in the Lost
>    chunks Recovery Set (LRS) of rules, P2PSP uses UDP for communication, so if
>    LRS is used, no extra package recovery is necessary?
>
>
No, LRS resends only video chunks that were lost from the splitter to the
peer. LRS will not provide any kind of recovery for other UDP messages.


>
>    - Is there a PDF version of the P2PSP whitepaper (protocol
>    descriptions)? The HTML documentation is good, but the formatting and some
>    unicode characters make it hard to read.
>
> Thanks,
> Max
>
> [0] https://wiki.asterisk.org/wiki/display/TOP/NAT+Traversal+Testing
> [1] http://samy.pl/chownat/
> [2] https://www.goto.info.waseda.ac.jp/~wei/file/wei-apan-v10.pdf
> [3] http://journals.sfu.ca/apan/index.php/apan/article/download/75/pdf_31
>



-- 
Vicente González Ruiz
Depto de Informática
Escuela Técnica Superior de Ingeniería
Universidad de Almería

Carretera Sacramento S/N
04120, La Cañada de San Urbano
Almería, España

e-mail: vruiz@xxxxxx
http://www.ual.es/~vruiz
tel: +34 950 015711
fax: +34 950 015486

Follow ups

References