Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is STUN stun.l.google.com:19302 used for

I'm looking at the webrtc.html and peerconnection_server demo, and it is working fine between two Chrome browsers. My question is, what exactly is the first param of webkitPeerConnection ?

pc = new webkitPeerConnection("STUN stun.l.google.com:19302", onSignalingMessage); 

Is it a third party STUN server given by Google for demo purpose ? If, in my JavaScript code, I replace "stun.l.google.com:19302" by "toto", I'm still able to make video calls. But as I'm on the same subnet, this can be explainable...

like image 484
Vicky Avatar asked Nov 19 '13 09:11

Vicky


People also ask

What is STUN used for?

STUN provides the mechanism to communicate with users behind a network address translation (NAT) firewall, which keeps their IP addresses private within the local network (LAN). The initiating party sends a request to the STUN server, which maintains the IP addresses of the phone or computer (for video).

What is STUN WebRTC?

STUN stands for Session Traversal Utilities for NAT. It is a standard method of NAT traversal used in WebRTC. It is defined in IETF RFC 5389. It is one of two NAT traversal servers that are used in WebRTC (the other one is TURN).

How does STUN ice TURN work?

STUN tells a client its public IP so that client can in turn communicate its IP to the other participating client. Assuming both clients can route to the other's discovered IP address and port directly, communication is established with direct UDP sockets.

What is STUN VoIP?

Session Traversal of User Datagram Protocol through Network address translator(STUN) is a protocol used by VoIP utilities for communication between the machines hidden behind a NAT gateways. STUN is a client server protocol.


1 Answers

  • STUN servers are used by both clients to determine their IP address as visible by the global Internet.If both the peers are behind the same NAT , STUN settings are not needed since they are anyways reachable form each other . STUN effectively comes into play when the peers are on different networks.

  • As we know that webRTC is peer to peer and the ice candidates are mandatory in webrtc. ICE functionality can be in any of the two ways , STUN and TURN .

  • There are many stun servers provided by google and other sites which one could use . You can also setup your own STUn server according to rfc5766.

Hope that gives a zest of what and how of stun .

like image 169
Altanai Avatar answered Oct 06 '22 04:10

Altanai