Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What percentage of users are behind symmetric NATs, such that "p2p" traffic needs to be relayed?

Tags:

nat

We're implementing a SIP-based solution and have configured the setup to work with RTPProxy. Right now, we're routing everything through RTPProxy as we were having some issues with media transport relying on ICE. If we're not mistaken, a central relay server is necessary for relaying streaming data between two clients if they're behind symmetric NATs. In practice, is this a large percentage of all consumer users? How much bandwidth woudl we save if we implemented proper routing to skip the relay server when not necessary. Are there better solutions we're missing?

like image 554
Newy Avatar asked Jan 26 '11 21:01

Newy


People also ask

What does a symmetric NAT mean?

A symmetric NAT is one where all requests from the same internal IP address and port, to a specific destination IP address and port, are mapped to the same external IP address and port. If the same host sends a packet with the same source address and port, but to a different destination, a different mapping is used.

What is symmetric and asymmetric NAT?

Summary. Asymmetric Network: An asymmetric network has multiple routes for incoming and outgoing network traffic. As such traffic takes a different route when entering or exiting the network. Symmetric Network: A symmetric network has a single route for incoming and outgoing network traffic.

Do I have Symmetric NAT?

The NAT is symmetric if the connection is unique for any unique combination of protocol, local IP address, local port number, destination IP address and destination port number.

Does stun work with symmetric NAT?

STUN does not work with symmetric NAT (also known as bi-directional NAT) which is often found in the networks of large companies. Since the IP address of the STUN server is different from that of the endpoint, in the symmetric NAT case, the NAT mapping will be different for the STUN server than for an endpoint.


1 Answers

In falling order of usefulness:

  • There is a direct connection between the two endpoints in both directions. You just connect and you are essentially done.
  • There is a direct connection between the two endpoints in one direction. In that case you just connect via the right direction by trying both.
  • Both parties are behind NATs of some kind.
    • Luckily, UPnP works in one end, you can then upgrade the connection to the above scheme
    • UPnP doesn't work, but STUN does. Use it to punch a hole in the NAT. There are a couple of different protocols but the general trick is to negotiate via a middle man that coordinates the NAT-piercing.
    • You fall back to let another node on the network act as a relaying proxy.

If you implement the full list above, then you have to give up very few connections and don't have to spend much time on bandwidth utilization at proxies. The BitTorrent protocol, of which I am somewhat familiar, usually stops at UPnP, but provides a built-in test to test for connectivity through the NAT.

One really wonders why IPv6 did not get implemented earlier - this is a waste of programmers time.

like image 169
I GIVE CRAP ANSWERS Avatar answered Sep 20 '22 12:09

I GIVE CRAP ANSWERS



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!