NAT Traversal

The Internet technology has brought rapid changes in data communication. Data communication covers the range of File Sharing , Voice Call, Instant Messaging etc. For data transmission over internet between  the sender host to receiver host , NAT Traversal plays an important rule to discover the packet routing path from sender to receiver host.
When sender or receiver host behind NAT device or in a private network , it is essential to communicate through the internet with a Public IP Address . Network Address Translator does the work . It assigns a private IP address and Port to a Public IP address and Port and a mapping is maintained to make the process usable . So , NAT Traversal is a solution pathway though which it can be ensured that a path is found form the communication path . From a host to another host , there may be no NAT ,if they are in same network , One one host is behind the NAT and the another is not or both are behind one or more NAT.
The most useful protocols for NAT Traversal are
1. UDP(User Datagram Protocol)
2. TCP(Transmission Control Protocol)
3. SIP(Session Initiation Protocol)
3. STUN(Session Traversal Utilities for NAT)
4. TURN(Traversal Using Relays around NAT)
5. ICE(Interactive Connectivity Establishment)
6. P2P(Peer to Peer)
The best communication way in network is P2P(Point to Point ) communication.
But the condition for P2P both host must be in same network. In real word scenario. todays most of the case P2P can’t be considered, be dependent of NAT Traversal.
Beyond the P2P , the communication is dependent to a relay server for session initiation . The relay server keeps update of the hosts which are subscribed to the server . It depends on application about the responsibility for relay server .
We consider a scenario, we want to make a Instant Massager like WhatsApp or Viber.
So first be ensured that the relay server keeps track of every user so that when u request to initiate a chat , it can response me with the desired IP Address and Port of the another intended user. When I just obtained the IP Address and Port of the intended user ,I have to make a session between two host . The same principle is for the intended user. He also expects my IP Address and Port . The best way to communicate with the other user is defined by ICE (Internet Connectivity Establishment) Protocol.

NAT Usefulness and STUN Server: NAT is primary requirement if the relay sever on Public Network and Host in private Network. When a SIP packet is forward to the Relay Server , public address is necessary as the requesting host’s IP Address . The client application requests the STUN Server and the STUN Server response a message to the host , this message contains a NAT Output IP Address and Port Number . With using this message , the Client Application replace the packets section of Source IP Address and Port. All the further communication is processed with the Public Address and Port.

TURN Server:
NATS are four type .

    Full Cone
    Restricted Cone
    Port Restricted Cone
    Symmetric NAT

The symmetric NAT arise a problem because it changes the port address for a host for which already a port is assigned for sends a packet , for the reason the other hand being confused about the message sender . The authorisation is abounded here and packet is dropped . An effective solution for this problem using TRUN Server .TURN manages the confusion about port changing , it works like a sender for Receiver and as a Receiver for Sender . TURN has specific packet specification which is highly maintained when using TURN .

So , NAT behaviour checking is essential , if the NAT is not symmetric , there is no necessary of using TURN.
ICE
For Media Packet Transmission low latency, packet loss, operational cost are important issues . There may be several path for NAT Traversal . So which path will be most selectable, is necessary to find out . ICE finds out the best candidate path for data communication . When a session established , for media packet transmission , both sender and receiver host try to find out the best candidate path by using some priority based mathematical calculation. When sender or receiver finds its best path it informs the other for approval or start communication.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s