Call for Participation: NAT Hole Punching Measurement Campaign

TL;DR

We will be running a NAT Hole Punching month during December to measure the success rate of libp2p’s new feature. Please sign up using this form to express interest in participating in the campaign. You can then download the binary and participate in the experiment already today by visiting the latest releases and picking the right one for your computer.

Disclaimer: none of the collected data will be linked to email addresses, or other information that can identify any of the participants personally. This is a purely experimental study with no marketing purposes.

Overview

If you care about P2P, libp2p and IPFS, then you care about the most important unsolved piece of protocol design in P2P Networks: NAT Hole Punching, or in other words, how do you get to connect to the network from your home device without having to rely on centralized infrastructure.

The libp2p team has put great effort into the design and implementation of a Decentralized NAT Hole Punching technique, which is now live in the IPFS Network as of go-ipfs v0.11. You can read this summarising blogpost, if you want to learn more details. The next target is to measure the success rate of the hole punching technique, and apply optimizations as needed. Progressively, this feature will power all the other networks that use libp2p.

For this we need the help of the libp2p community, i.e., you! We will be running a Hole Punching Month during December and we’d love to have you participate.

If successful, NAT Hole Punching can be a game-changer for decentralised applications and networks!

The ASK

The requirements are minimal:

  • Please fill in this form to express interest in the experiment.
  • You will then have to install a small program on your machine (from this page), which will be running tests to check the connectivity of your home machine. No technical skills required, no need to run an IPFS or libp2p node, so please tell your friends too!
  • The tool is using minimal resources from your computer, so you won’t notice that another program is running. The program consumes ~2% of CPU, ~100MBs of memory and bandwidth equal to visiting one lightweight webpage every couple of minutes.
  • The tool collects the following information from your node: IP address, NAT port mappings, ping latencies to other nodes participating in the experiment and outcome of the experiment (success, fail). This information cannot be linked in any way to your email address or other data that can identify you personally (unless you request an API-Key, see next point). The purpose of the study is purely experimental.
  • If you want to further help debug the Hole Punching technique during December or afterwards, you can request an API key while installing the binary. We will use this to contact you in the email address you enter in the form, if needed. In this case, you can also receive a report of the experiment results for your own node! Going with this option will be greatly appreciated, but not required.
  • We will later share the dataset that we will collect for others to experiment with, or use for their own purposes.
  • You do not need to restart the program every time you restart your computer (please choose the right option when installing) and you don’t need to connect from one network only for the results to be valid - it’s totally fine if you move to other networks (e.g., home, office, cafe). It would most helpful if you run the program from a computer that is primarily connected to your home network, because that’s what the hole punching technique is targeting.

We will share all the details during the last week of November, but for now please sign up using the form. You can download, start running the binary and participate in the experiment already today, if you wish, by visiting the releases page [link] and picking the right one for your computer.

Technical Details & Pointers

If you’re interested to learn all of the details of libp2p’s NAT Hole Punching technique here are some pointers:

6 Likes

I have multiple computers at home, one of which is on all the time, the others I turn on and off frequently. Would it be better to install this hole-punchy thing on that always-on computer?

@johnny preference would be for the one that is always on. (Or both :innocent:)

A couple of observations and a question:

The v0.9.0 downloads for punchr_cli_linux_a{md,rm}64 still report punchrclient version 0.8.0 when run with --version.

My router setup ends up giving me a couple of ULAs on my phone, as well as a couple of public IPv6 addresses (and a NATted IPv4 address). When I run punchr like that, bootstrapping fails. But if I delete the first ULA (taking them in the order they appear in the output of ip a), punchr works. That ULA appears before the public IPv6 addresses; the other one appears after them. This is on Mobian on a PinePhone. (On my laptop (running Debian 11), I got a public IPv6 address before the first ULA, and punchr worked on the first attempt.)

I got my API key by email today; should I use it on just one of my devices, or is it fine to use it on both my phone and my laptop? Simultaneously?

Hi @TMakarios

The v0.9.0 downloads for punchr_cli_linux_a{md,rm}64 still report punchrclient version 0.8.0 when run with --version .

It’s super confusing but the v0.9.0 refers to the GUI (which, I assume, most people use). The repo contains four components that are in theory all versioned differently and I haven’t figured out a good way to do versioning. I definitely need to make this less confusing :thinking:

When I run punchr like that, bootstrapping fails

What’s the error message there? Is the client not able to connect to the bootstrap nodes or is something else happening?

I got my API key by email today; should I use it on just one of my devices, or is it fine to use it on both my phone and my laptop? Simultaneously?

It’s not really a problem to use one but if I could choose, rather use two different API-Keys :smiley: I’ll send over another one via PM :+1:


I’ll be at the libp2p community call later today. If you’re around we could have a brief chat about your problem and if it affects others as well.

The output when bootstrapping fails ends with:

WARN[0065] waiting for public addr host 12D3KooWKfY4PNuU: timeout wait for public addrs
WARN[0065] waiting for public addr host 12D3KooWBBvgMJYk: timeout wait for public addrs
ERRO[0065] error: bootstrap punchr hosts: could not bootstrap enough hosts (only 0)

I’m in New Zealand, so I like to be asleep at 17:00 UTC. Also, I don’t trust Zoom. We need peer-to-peer video conference software!

I get similar errors to TMakarios!

INFO[0001] Connected to bootstrap peer!                  hostID=12D3KooWCyfCc4dW remoteID=QmcZf59bWwK5XFi7
INFO[0001] Connecting to bootstrap peer...               hostID=12D3KooWCyfCc4dW remoteID=QmaCpDMGvV2BGHeY
INFO[0001] Connected to bootstrap peer!                  hostID=12D3KooWCyfCc4dW remoteID=QmaCpDMGvV2BGHeY
INFO[0001] Waiting for public address...                 hostID=12D3KooWCyfCc4dW

WARN[0061] waiting for public addr host 12D3KooWFSntu7jD: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWL7eJLmA8: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWRb7M4tyj: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWLGLV33t1: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWCkbmzUKM: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWMwQh4apu: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWGUA3WPiV: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWB6voz7mR: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWJv56x7f6: timeout wait for public addrs 
WARN[0061] waiting for public addr host 12D3KooWCyfCc4dW: timeout wait for public addrs 
ERRO[0061] error: bootstrap punchr hosts: could not bootstrap enough hosts (only 0) 

Do you have one or more IPv6 ULA addresses involved @dannyob? Can you get it to work by removing those addresses from your system?