Technology used in Routers to enable multiple Hosts on a Private Network to share a single public IP Address.

The NAT-enabled router sits at the link between the private network and the public internet.

When a Packet is send from the private network it replaces the private source IP address with the router’s public IP address and the source port number with an arbitrary one and keeps track of this in a NAT translation table.

When a response comes back it looks up the original private IP address and port number and forwards the response to the correct Hosts in the private network.

Thus, the private network looks like a single host with a single IP Address.

Advantages

  • Address convservaton as it replaces the need for using more of the public IP Address space with already allocated private IP addresses.
  • Cost savings as organisations does not need to pay for more public IP Addresses.
  • Security since it hides the internal network topology.
  • Flexibility as one can use any private addressing scheme regardless of public IP allocation.

Disadvantages

  • Breaks end-to-end connectivity which is an original principle of the internet and how many applications are designed.
  • Breaks Network Layer Encapsulation since NAT devices are meant to belong to The Network Layer and not alter Port numbers.
  • Performance overhead since NAT-enabled devices needs to maintain a translation table and modify packet headers.

TCP connections with both hosts behind NATs

NAT-enabled routers drop SYN packets arriving from the WAN-side, so it is not possible to establish TCP connections when both hosts are behind NATs.