STUN stands for Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs). STUN operates together with several other systems that achieve NAT traversal including: TURN, ICE UpnP and Session Border controllers. The efforts these systems seek to allow relate to withdrawing the limitations a client needs to experience in order to investigate its environment, although by doing so the environment complexity is significantly increased.
The primary purpose of the STUN network protocol is to identify the public address operated through a NAT or multiple NATs, together with the category of NAT in use and the internet side port associated by the NAT with a particular local port. With this information STUN is able to organise the UDP communications between two hosts located behind NAT routers.
STUN was designed to act as a client-server protocol and can be found included in a Voice Over Internet Protocol (VoIP) phone or software package. A STUN client will send a request to a STUN server which will respond by providing the STUN client with the identity of a public IP address used by the NAT router together with the port opened by the NAT to allow incoming traffic into the network and the category of NAT in use. Identifying the category of NAT is necessary because of different handling protocols followed by the various NATs currently operating. With generic Internet applications vulnerable to disruption when end-to-end significance of an IP packet is interrupted it is significant that NAT can create problems both at the protocol level and with application data.
STUN is able to operate with three of the four main NAT types but is unable to operate with Symmetric NAT, which are commonly located on networks found in large companies. The problem with between Symmetric NAT and STUN relates to mapping with the NAT server and STUN not able to mirror identical endpoints.
However Symmetric Nat apart STUN is capable of healthy communications with Full Cone, Restricted Cone and Port restricted Cone types. With Full Cone either side is able to set up communications. With both Restricted Cone and Restricted Port Cone it is necessary that both sides begin simultaneous transmission.
The usefulness of STUN extends to include handling UDP packets that require the transfer of signalling traffic containing sound/video/text signalling across the Internet that is located behind a NAT not able to operate a traditional connection. STUN provides the appropriate mechanisms to ensure a connection can be initiated and maintained.
Problems that occur with STUN reflect a lack of standardization in both behaviour and management systems contained within the different types of NAT devices in current usage. STUN should be viewed as a short-term solution to a long-term problem that will inevitably need to be addressed by the introduction of standardized NAT devices that provide global interoperability. With the pressure from users mounting the need for equipment able to comfortably interact with sound/video/text signalling across the Internet relevant manufacturers would be unwise to ignore the scale this very significant compatibility requirement possesses.