Skip to content
Search

Network address translation

lastmod 2026-08-23created 2017-01-1323 edits

Network address translation (NAT) is a term used in computer networking for a technique that sends and receives network traffic through a router while rewriting the TCP/UDP port numbers and the source and destination IP addresses of IP packets. Because the packets change, the IP and TCP/UDP checksums must also be recalculated and rewritten. NAT is usually used so that multiple hosts on a private network can access the Internet using a single public IP address. Many network administrators regard NAT as a convenient technique and use it widely. Since NAT can increase the complexity of communication between hosts, it naturally can affect network performance.

NAT implementation classifications

Full-cone NAT

Full_Cone_NAT.png

All requests from internal hosts are mapped to the same external IP and port.
Moreover, any external host can send packets to the internal host by sending packets to the mapped public IP.

(Address)-restricted-cone NAT

Restricted_Cone_NAT.png

The port mapped on the NAT varies with the destination address.
For hole punching, packets from the destination can be received once a hole is opened matching only the destination IP.

Port-restricted cone NAT

Port_Restricted_Cone_NAT.png

The port mapped on the NAT varies with the destination address.
For hole punching, packets from the destination can be received only if a hole is opened matching both the destination IP and port.

Symmetric cone NAT

Symmetric_NAT.png

The port mapped on the NAT varies with the destination address and port.
In a 1:1 P2P connection, at least one side must not be behind a Symmetric Cone NAT, or must be a peer that owns a public IP.
If both sides are behind Symmetric Cone NATs, a relay server such as TURN is needed.

A case for TURN

When a STUN server is no longer enough, a TURN server must be used to relay media. Not every symmetric NAT needs a TURN server.

-

Full Cone

Restricted Cone

Port Restricted Cone

Symmetric

Full Cone

STUN

STUN

STUN

STUN

Restricted Cone

STUN

STUN

STUN

STUN

Port Restricted Cone

STUN

STUN

STUN

TURN

Symmetric

STUN

STUN

TURN

TURN

Korean: 홀펀칭 (Hole punching)

See Hole punching for details.

NAT Traversal

See the corresponding page.

Mapping Behavior

Filtering Behavior

Oridengi's stories about LAN communication

  1. Master the three tables and LAN communication is done!! - Goduck2-LAN-1.pdf
  2. ARP is the flower of Ethernet communication - Goduck2-LAN-2.pdf
  3. Ethernet switches are Plug & Play? - Goduck2-LAN-3.pdf
  4. How is the Routing Table related to the Router? - Goduck2-LAN-4.pdf
  5. What if there were no Proxy ARP? - Goduck2-LAN-5.pdf
  6. Gratuitous ARP is so useful, so why is it named "free" ARP? - Goduck2-LAN-6.pdf
  7. Subnet, subnet, Subnet Mask - Goduck2-LAN-7.pdf
  8. VLAN - I want to know about it. - Goduck2-LAN-8.pdf
  9. No tag (VLAN Tag) means it's a native (Native)? - Goduck2-LAN-9.pdf

See also

Favorite site

Tutorials

Tutorials

References


  1. NAT_easy_to_understand.pdf ↩

author Zer0 sitemap