How find ip in ipfs

It turns out that using a DHT (whether the IPFS Public DHT, some local one, one using an alternative networking stack like Yggdrasil, etc.) is just one of the ways a node might find content.

Another way that go-ipfs nodes find content is by just asking the nodes they’re already connected to if they happen to have it. This mechanism itself leads to a few outcomes:

  1. If you’ve been downloading some data from node A and then they have content they haven’t put in the DHT yet since their provide queue is backed up (or even if they have turned off their advertising/providing system entirely) you’ll still be able to find and fetch the data from them
  2. You might “accidentally” find a node that has the content you’re looking for just by your DHT client trying to keep its routing tables fresh. Similar, things could happen if you were using PubSub. If your node or the one with the content have high connection limits the chances of finding someone who happens to have your content by accident increase.
  3. People can (and some do) build alternative systems outside of go-ipfs for finding content and you’ll fetch it all the same. For example if I learn that Node A has some data from some forum, shared database, pubsub channel, etc. I can just do ipfs swarm connect <node A address> and ipfs pin add <data CID> and my node will download the data anyway.
1 Like