Friday, September 14, 2018

ICE-STUN-TURN


ICE (Interactive Connectivity Establishment) is a technique used in computer networking to find ways for two computers to talk to each other as directly as possible in peer-to-peer networking. It is a framework that allows peers to overcome the complexities of real-world networking, and communicate its public IP address so that it can be reached by other peers. It’s ICE’s job to find the best path to connect peers. It may be able to do that with a direct connection between the clients, but it also works for clients where a direct connection is not possible (i.e. behind NATs).

STUN (Session Traversal Utilities for NAT) server allows clients to discover their public IP address and the type of NAT they are behind. This information is used to establish the media connection. The STUN protocol is defined in RFC 3489. In most cases, a STUN server is only used during the connection setup and once that session has been established, media will flow directly between clients.

TURN (Traversal Using Relay NAT) is an extension to STUN that allows media traversal over a NAT that does not do the “consistent hole punch” required by STUN traffic. TURN servers are often used in the case of a symmetric NAT.

Unlike STUN, a TURN server remains in the media path after the connection has been established. That is why the term “relay” is used to define TURN. A TURN server literally relays the media between the peers.

Although TURN almost always provides connectivity to a client, it is resource intensive for the provider of the TURN server. It is therefore desirable to use TURN as a last resort only, preferring other mechanisms (such as STUN or direct connectivity) when possible. To accomplish that, the ICE methodology can be used to discover the optimal means of connectivity.

No comments:

Post a Comment