IPFS þing Talk ·

libp2p NAT Hole Punching Success Rate

Dennis Trautwein

About this talk

A talk from IPFS þing 2022 on measuring the success rate of libp2p's hole punching protocol, DCUtR (Direct Connection Upgrade through Relays), which became broadly viable after Kubo 0.11 turned every node into a limited relay. Trautwein explains how NATs and firewalls block direct peer connections and walks through the DCUtR handshake, where peers exchange Connect and Sync messages over a relay and use round-trip-time measurements to coordinate simultaneous dial-outs. He then describes the punchr measurement setup: a honeypot that walks the DHT to attract NATed peers, a server exposing a gRPC API, and Go and Rust clients that perform hole punches and report outcomes. Initial results from a single home-network client show a ~72% success rate across ~13,300 attempts to ~2,500 unique peers, with 97% of successful punches landing on the first attempt and a median duration of around 0.9 seconds. He closes with next steps around comparing TCP vs. QUIC behavior, deploying more vantage points, and a call for participants to run clients from their own networks.