Skip to main content
QUICK REVIEW

[Paper Review] Peer-to-Peer Communication Across Network Address Translators

Bryan Ford, P. Srisuresh|ArXiv.org|Mar 18, 2006
Peer-to-Peer Network TechnologiesComputer Science20 references332 citations
TL;DR

This paper presents and analyzes hole punching as a robust, application-level technique for enabling peer-to-peer communication across NATs, demonstrating its effectiveness for both UDP and TCP protocols. It reports that 82% of tested NATs support UDP hole punching and 64% support TCP hole punching, highlighting its practical viability despite non-standardized NAT behavior.

ABSTRACT

Network Address Translation (NAT) causes well-known difficulties for peer-to-peer (P2P) communication, since the peers involved may not be reachable at any globally valid IP address. Several NAT traversal techniques are known, but their documentation is slim, and data about their robustness or relative merits is slimmer. This paper documents and analyzes one of the simplest but most robust and practical NAT traversal techniques, commonly known as "hole punching." Hole punching is moderately well-understood for UDP communication, but we show how it can be reliably used to set up peer-to-peer TCP streams as well. After gathering data on the reliability of this technique on a wide variety of deployed NATs, we find that about 82% of the NATs tested support hole punching for UDP, and about 64% support hole punching for TCP streams. As NAT vendors become increasingly conscious of the needs of important P2P applications such as Voice over IP and online gaming protocols, support for hole punching is likely to increase in the future.

Motivation & Objective

  • To document and analyze hole punching as a practical method for enabling peer-to-peer communication across NATs.
  • To demonstrate that hole punching works reliably for both UDP and TCP protocols in the presence of well-behaved NATs.
  • To evaluate the real-world compatibility of hole punching across a wide range of deployed NAT devices from different vendors.
  • To identify key NAT behaviors that enable or hinder hole punching, especially in multi-level NAT scenarios.
  • To advocate for a simple, robust hole punching technique that avoids complex, fragile workarounds that may break in the long term.

Proposed method

  • The authors implement and deploy a tool called NAT Check to collect real-world data on NAT behavior from a self-selecting user community.
  • They analyze hole punching for UDP by having peers simultaneously initiate outbound connections to each other’s public endpoints, creating bidirectional sessions through NATs.
  • For TCP, they extend the hole punching technique using SO_REUSEADDR/SO_REUSEPORT socket options to allow simultaneous connection attempts from the same local port.
  • They identify and test hairpin translation behavior, where NATs must forward packets back to the same internal host, as a critical requirement for multi-level NATs.
  • They evaluate NAT behavior by observing whether simultaneous connection attempts from two peers behind different NATs succeed in establishing a peer-to-peer session.
  • They compare results with independent studies using STUN and STUNT to corroborate findings, especially on UDP compatibility.

Experimental results

Research questions

  • RQ1To what extent do existing NATs support UDP hole punching in real-world deployments?
  • RQ2Can the same hole punching technique be reliably applied to TCP connections, and what socket-level mechanisms enable this?
  • RQ3What specific NAT behaviors, such as hairpin translation, are required for hole punching to succeed across multiple NAT layers?
  • RQ4How does the reliability of hole punching vary across different NAT vendors and models?
  • RQ5What are the trade-offs between simple, robust hole punching and more complex techniques that work around broken NAT behaviors?

Key findings

  • Approximately 82% of the tested NATs support hole punching for UDP communication.
  • About 64% of the tested NATs support hole punching for TCP streams, indicating that TCP hole punching is feasible but less universally supported than UDP.
  • The success of hole punching depends critically on NATs supporting hairpin translation, a feature not yet widely implemented but necessary for multi-level NAT topologies.
  • The technique works reliably with well-behaved NATs and does not require special privileges or network topology knowledge, making it practical for general P2P applications.
  • Independent validation using STUN and STUNT protocols confirms the NAT Check results, lending credibility to the findings despite the self-selecting nature of the data.
  • Despite the lack of standardization in NAT behavior, hole punching remains a viable, transparent, and application-level solution for P2P communication across NATs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.