Private networks - Offline network

Hi permanent community!

I have been looking into the following discussion:

My question is similar in a way but completely different in others. Let me expose the scenario I want to recreate:

I want to create a private network without internet access. Each daemon would be running without an internet connection or ISP. Each node should be able to access other nodes in the offline-private network in the same way as an internet network.

Now, in case of this being possible. I would require to do all of the swarm key procedures for the setting up a private network, remove public bootstrap node and add new ones.

  1. Bootstrap nodes are in charge of delivering/map/provide content from the offline private network?
  2. To allow each node to have offline access to others, is it required that all nodes must be bootstrap nodes?
  3. What other requirements or are needed to provide a private network able to share files without internet access?

No. All of the nodes are responsible for this. The bootstrap nodes don’t really do anything special besides be a common point of contact for nodes to connect to during startup so all of the nodes in the private network can find out about each other.

No. But the nodes selected to be bootstrap nodes should be reachable by all of the other peers.

The nodes just need to be able to talk to each other over the non-public network.

Hey is anyone alive??

Bootstrap nodes are only used… at bootstrap time.

When you run a P2P software, with no central server, you don’t know who is using the same protocol or who can talk to you. So you need a discovery protocol.
The classical and super useful approach is: let the peers you are connected to tell you about peers they know. It’s super effective, but you need a first peer. So you need a bootstrap protocol.
One would be: ping every IP on every port and see who answers. Spoiler alert: it’s not very effective…
So the classical approach is to hardcode the address of a node, that knows a few others. When you know a bunch, the bootstrap node might as well disconnect: it’s not useful anymore.
These nodes will basically be contacted by every daemon starting (unless they changed their default config before starting), so they will be under heavy load. So they usually do the minimum: point you to more peers to play with. I wouldn’t be surprised if the default bootstrap nodes of IPFS don’t do content routing.

No. They are in charge to tell nodes that connect to them about the others. Most of the other nodes can do that too. They just happen to be the one you connect to first. They may or may not provide content.

So. If you are offline, you are not connected to the main internet, and you won’t be able to discover, let alone connect, to hardcoded, default bootstrap nodes. You will have to add a bootstrap node you can contact in the config (probably in your local network?).

No. One bootstrap node is enough.
All the peer you want to connect together should bootstrap to this node (or to a node connected to a node connected to a node connected to this node).

None. LibP2P, the underlying routing library of IPFS handle that natively by exploring your local network.

You need to share a swarm key among your peers. This is basically a secret shared among the members of the private network to prove they are cool enough to be in the club. :sunglasses:

There is a library to handle that: ipfs-cluster

Of course, if none of your node can access the internet, you won’t be able to fetch what you don’t already have or add from one of you nodes…