Routing between nets

Hi!

There are three nodes A, B, and C
Node A has only an ipv4 address.
Node B has only ipv6
Node C has an address on both networks.
Nodes A and B cannot communicate directly. No way. This is in no way changeable.

Is it possible to share files between A and B? (actually, A, B and C are several nodes, but all nodes A - do not have any ability to communicate directly with nodes B, only through nodes C)

WBR,
Fyodor.

Hello @ufm,

What are they? Are the clustered nodes? Private cluster or public one? Or private/public naked nodes?
If they are public cluster, don’t worry about communication between nodes. DHT will take care of that in background. Just note CID from A node and access that CID at B node. The files from A associated with that CID will be at available at node B.

If they are in private cluster (private nodes; cluster or naked nodes), You have to use some third party DNS proxy which serves at both ipv4 and ipv6 network.

Hope, this helps.

Node A and B cannot communicate directly. Absolutely. I specifically noted this.

I believe that the newest libp2p allows NAT “hole punching” which would act like STUN server to reach IPv4 node and then there is ‘Circuit Relay’ and ‘follower peers’ . I believe that “C” is your bridge since it is present on both networks. C is or was at one time a peer or can be made so. If they were bootstrapped together then they are peers and would be IPFS cluster. C can alternate roles (server/client) and provides routing through. So if you are using CRDT consensus and new libp2p etc… shouldn’t require agents be deployed.

How they are connected? What is connection scheme?

libp2p specs outlines how this works it creates a bridge /gateway /proxy / portal / (whatever)
That routes through your “C” to disparate peers A and B. That is by design and announced as new feature set or power.

This demonstrates how Circuit Relay v2 connects A to B through R (C)
Sometimes the picture is worth <1000 words

facepalm.
People, what’s wrong with you?
I specifically wrote several times - nodes A and B cannot communicate with each other.
IPFS - interplanetary file system? OK.
A are the inhabitants of Venus. B - inhabitants of Mars. And they have an incompatible TCP/IP. Not at all. C - Earth, where activists appeared who made a “double stack” and who want to help Venus and Mars exchange files in IPFS. But once again - it is impossible to make a node from Mars connect with a node from Venus. Mars has ternary logic, and Venus has 9 bits in a byte. The only option is the Earth, which always saves everyone. All hope is on us.

@ufm keep it cool, you are asking a theoretical question with a fairly unrealistic scenario (sadly it’s rare to run ipv6 only servers in the first place).

The issue here is that your question really looks like you want to get around some NAT or private network.
Which is a usual question we get all the time.

It’s true that people are not giving the right answer but for one of your there is 100 people for which it’s the right one.

Anyway to answer your question, IPFS is not a network routing layer, it’s an applicative layer and has no such capabilities builtin.
It use to have some really trivial one but it would have worked really poorly in that scenario, we removed it because we couldn’t get enough peoples to make relays, so relays loads was very high and no one was running them.
This has been replaced by holepunching people are talking about it’s the same thing except relays are limited to attrocious speeds which is only usable to negociate holepunching, not exchange data. And now relays are running by default and no one complains about resource usage (actually they do, a lot, but not about relays).

This wouldn’t have been effective for your case since this old relay system was single hop and assumed a tier network.
There were reachable people which had a public IP listener (servers, people using UPNP or making port forwards), and the rest.
The rest would setup relays on reachable servers. And when you wanted to connect someone from the rest you just contacted the relay they were using.

For your problem that doesn’t work, actually it does in this magic 3 node case, but realistically with more nodes no, since you would need to know who is reachable through where (which IPFS never did).

If you want something like that, checkout BGP (borring), cjdns or yggdrasil.

@Jorropo ok, let me ask the question with the most realistic scenario possible.
There are three countries. A, B and C.
Country A is at war with country B. Including on the Internet. As a result, many networks between countries A and B are blocked (firewall at the level of networks and autonomous systems).
Okay, someone in countries A and B will use yggdrasil and connect through country C (and it really works). But in both country A and country B there are IPFS nodes that do not want or cannot install and configure Yggdrasil, but want their files to be available. What will blog.ipfs.io do if it is blocked in any country? Install Yggdrasil and ask everyone else to install it so that ipfs/bafybeibnl3ifjbp6j32yhenbnirv2pome2jejxympgl4ltmuj4mt73yfjy/ is still available?

I don’t really know what to tell you except quoting my previous message and bolding some part of it:

realistically if that gained steam, yggdrasil would just be banned too.

Tor or i2p which replicates a single tier network (where everyone just reachable) sounds like realistic solution (which are actually being proven and battle tested today).
You could also do yggdrasil over tor or i2p.

Tor -

Unfortunately, Tor is also easily blocked. Country A has successfully started doing this.
And what is quite sad is that any traffic is blocked if the state takes it seriously.

But in our case, neither tor, nor i2p, nor Yggdrasil solves the problem until everyone starts using this solution. That’s when Yggdrasil is built into ipfs - there will be happiness. Fortunately, it is also written in Go and can work without creating an interface and assigning an IP address. :slight_smile:

Personally, having IPFS work in a post contemporary Internet Protocol world is very low on my priority list.

If you want to send a pull request doing that, in theory it’s very simple, you just implement go-libp2p transport interface:

I have already written transports it’s not hard if you know go, just take a look at the TCP transport, remove the useless TCP optimisation stuff (reuse port, …) and plugin Yggdrasil instead.

I wish you good luck if you try to do so.

One thing you guys are not considering that works “out of the box” is if, say, someone in A publishes content and has it re-pinned in C, it becomes available to B. In fact, if it’s published in A and someone simply accesses it in C (which automatically caches it) and then someone accesses it in B (gets the one from C), now it’s cached in B and can quickly spread further. This is what the protocol is designed to do. So, assuming the content is interesting to more than just a few people, it will find its way everywhere in short order.

@ylempereur Undoubtedly. A small possibility is missing - B could say to C - “I’m interested in this file - please cache it”. Automagically. :slight_smile:

That’s called Filecoin… :grin:

Maybe but, It doesn’t.