<div dir="ltr"><div>Thanks Youness. That is exactly my understanding as well.<br><br></div><div>From what I perceive, symmetric NATs are definitely on the decline in the home. But symmetric NATs are still prevalent in the work place. Although I've never confirmed it, 3G mobile devices are essentially on symmetric NATs.<br>
<br></div><div>jrs<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 2, 2013 at 1:12 PM, Youness Alaoui <span dir="ltr"><<a href="mailto:youness.alaoui@collabora.co.uk" target="_blank">youness.alaoui@collabora.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi John,<br>
<br>
Yes, in that use case, it will have to go through TURN. The reason is that B<br>
cannot send to A since there is no port mapping for it, and when A sends to B,<br>
while it creates a mapping, B is unable to receive it because it is received<br>
from a different remote port than the one B sent to and so the port restricted<br>
NAT will reject the packet.<br>
<br>
If the user B was using a full cone NAT, then what would happen is that A would<br>
be able to send to B, and B would then detect a "peer-reflexive candidate" and<br>
add it to its local list of remote candidates and start new connectivity checks<br>
with the new peer-reflexive candidate containing the port mapping that the user<br>
A just created on his symetric NAT by sending his connectivity check request.<br>
Then when B replies to A, the agent on the A side will see that the other side<br>
found a new port mapping and will add his own local peer-reflexive candidate to<br>
its list and will start connectivity checks with those.<br>
<br>
If the user B was behind an address-restricted NAT, the same would happen but<br>
the first packet from A to B would be rejected (depends on who sends first),<br>
then when B sends to A, the router creates the port mapping to allow A packets<br>
coming in. Then when B retransmits his connectivity check packets, the router<br>
will then allow it to go through, and the whole peer-reflexive candidate system<br>
kicks in again and new connchecks start and it all works.<br>
<br>
I like to use the diagrams shown here to help me visualize it :<br>
<a href="http://en.wikipedia.org/wiki/Network_address_translation#Methods_of_port_translation" target="_blank">http://en.wikipedia.org/wiki/Network_address_translation#Methods_of_port_translation</a><br>
<br>
There is no table/data available on which types of NAT pairings would go direct<br>
vs. TURN (that I know of), but it's simply that every types of NAT would work<br>
with a direct connection unless it's symetric with symetric NAT or symetric with<br>
port-restricted NAT, everything else should just work all the time.<br>
<br>
As for the distribution of NAT types, I have no idea, but my understanding<br>
(maybe it was just a rumor I heard a long time ago, someone said with no real<br>
data to back it and it stayed in my mind) is that 5% of home routers are<br>
symetric, and that ICE should work generally in about 90% of the cases.<br>
Maybe you can find some better documentation about that on the net. If you do,<br>
please let me know.<br>
<br>
Thanks,<br>
Youness.<br>
<div><div class="h5"><br>
On 04/01/2013 02:33 PM, John Selbie wrote:<br>
> Assume two hosts using SIP, TURN, and ICE to rendezvous and setup UDP based P2P<br>
> sessions with each other. Assume connectivity to the SIP and TURN service is<br>
> 100% reliable for these hosts.<br>
><br>
> User A is a a host is behind a "symmetric" NAT - most likely a 3G mobile client<br>
> - or any other NAT that doesn't have a consistent port mapping scheme.<br>
><br>
> User B - The other host is behind a port-restricted NAT.<br>
><br>
> Now A and B want to do a P2P session over UDP with each other.<br>
><br>
> My understanding is that the ICE negotiation will most likely fall back to using<br>
> the TURN relay port in this scenario. Is that correct? Or does the connectivity<br>
> check phase of ICE have some way of connecting the hosts directly?<br>
><br>
> I'm also certain that if User B were to be behind a Cone Nat, then ICE has a<br>
> much higher chance of succeeding with a direct connection.<br>
><br>
> Is my understanding correct so far?<br>
><br>
> Is there a table or data available showing what NAT-pairings are expected to "go<br>
> direct" vs fallback to TURN relay in an ICE session?<br>
><br>
> Also, does anyone have data or an "off the cuff" idea of how prevalent the<br>
> different NAT types are (cone, port-restricted, symmetric) in the consumer/home<br>
> case. I would guess most off-the-shelf routers these days are port-restricted.<br>
> But that is only a guess based on the fact that mine is.<br>
><br>
> jrs<br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> nice mailing list<br>
> <a href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
><br>
<br>
<br>
<br>_______________________________________________<br>
nice mailing list<br>
<a href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
<br></blockquote></div><br></div>