NAT Traversal: Difference between revisions

From
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
== Overview ==
== Overview ==


NAT (Network Address Translation) is widely used to connect private networks to the internet. The main idea is to map several private IP addresses to only one public IP address. Having in mind that P2P network clients should be able to communicate with each other one basic question comes into mind: how can internet hosts communicate with a host in a private network?
NAT (Network Address Translation) is widely used to connect private networks to the internet. The main idea is to map several private IP addresses to only one public IP address. Having in mind that P2P network clients should be able to communicate with each other, one basic question comes into mind: how can internet hosts communicate with a host in a private network?
We will first have a look at NAT itself and problems it brings. Then, we show how to traverse NATs by either changing their configuration or by using other tricks.
We will first have a look at NAT itself and problems it brings. Then, we show how to traverse NATs by either changing their configuration or by using other tricks.


== Network Address Translation ==
== Network Address Translation ==


A network address is simply the IP + Port number (for UDP/TCP). A NAT router receives an incoming IP packet, saves the address in its NAT table, rewrites sender address to one of its own public addresses and sends the packet to the destination. Incoming packets accepted on this public address are forwarded to the private host sending the first request after rewriting the destination address back to the private host's address.
A network address is simply the IP ( + Port number for UDP/TCP). A NAT router receives an incoming IP packet, saves the address in its NAT table, rewrites sender address to one of its own public addresses and sends the packet to the destination. Incoming packets accepted on this public address are forwarded to the private host sending the first request after rewriting the destination address back to the private host's address.


IMG (general configuration + NAT communication)
IMG (general configuration + NAT communication)

Revision as of 15:49, 10 February 2006

Note: work in progress

Overview

NAT (Network Address Translation) is widely used to connect private networks to the internet. The main idea is to map several private IP addresses to only one public IP address. Having in mind that P2P network clients should be able to communicate with each other, one basic question comes into mind: how can internet hosts communicate with a host in a private network? We will first have a look at NAT itself and problems it brings. Then, we show how to traverse NATs by either changing their configuration or by using other tricks.

Network Address Translation

A network address is simply the IP ( + Port number for UDP/TCP). A NAT router receives an incoming IP packet, saves the address in its NAT table, rewrites sender address to one of its own public addresses and sends the packet to the destination. Incoming packets accepted on this public address are forwarded to the private host sending the first request after rewriting the destination address back to the private host's address.

IMG (general configuration + NAT communication)

Four NAT types:

  • Full Cone
  • Restricted Cone
  • Port Restricted Cone
  • Symmetric

router configuration

Port forwarding

UPnP

STUN

TURN

Hole punching

Text

NAT and Voice over IP

Refereces