0

While learning about p2p networks I found out that P2P networks need signaling servers but can modern DHT replace the need for signaling servers? (Holepunching mainly)

1 Answers1

0

A vanilla DHT that only acts as hash table can't serve that purpose but a customized implementation where the nodes support some protocol-specific extensions it is possible. E.g. in the bittorent DHT clients can instruct DHT nodes to put whatever their externally visible port is into the hash table rather than simply publishing their internal port number. This only really works for full-cone NAT.

For restricted cone or symmetric nat more complicated signalling and guessing approaches like STUN would have to be added to all DHT nodes and peers behind NATs could then initiate traversal at a particular node by publishing it as their rendezvous.

the8472
  • 40,999
  • 5
  • 70
  • 122
  • Thanks for the answer provided. Specifically do you think this bittorrent dht ( github.com/anacrolix/dht ) do holepunching ? – vanessa boehr Oct 08 '21 at 14:55
  • It looks like it supports the implied port mechanic. The rest happens passively since routine DHT traffic keeps the mapping open in full cone NATs. That's assuming you're talking about UDP hole punching. – the8472 Oct 08 '21 at 17:23
  • Thank you for the reply. I am sorry I was not precise, I was talking about TCP holepunching for a TCP peer to peer network. Do you think this DHT can do TCP holepunching for a TCP peer to peer network ? – vanessa boehr Oct 09 '21 at 07:07
  • Well, it's a question of definition. It's not really the DHT that would be doing it (since those usually run over UDP), it would be a distributed system which uses a DHT as a building block, e.g. to find rendezvous nodes, and a hole punching system as another part of each node. So you should have asked if a distributed TCP hole punching system can be built. Anyway, a bittorrent DHT implementation won't do that for you. – the8472 Oct 09 '21 at 08:45