I create a private network.
two bootstrap nodes S1, S2 have the public IP addresses, set RelayServer enabled
two nodes A1, A2 in the local network behind NAT, set RelayClient enabled
two nodes B1, B2 in another local network behind NAT, set RelayClient enabled
All these nodes set up the same swarm.key
S1, S2, A1, and A2 discover each other automatical and work well
S1, S2, B1, and B2 are the same as above.
A1, A2 swarm connect to B1, B2 success via p2p-circuit address
B1, B2 can swarm connect to A1, A2 success via p2p-circuit address too
BUT, A1, A2, and B1, B2 can not get the file with each other.
Why the different local networks can swarm connect to each other via p2p-circuit, but can not exchange data?
> ipfs id
{
"ID": "12D3KooWFKQ8jcYyyDo245tFUnSZmMi2yZWmMaHdcUWWGqEYXqSZ",
"PublicKey": "CAESIFG6gBYsawojrm4i5wqxSy3zNP+7uJvLqUK14jTprPfK",
"Addresses": [
"/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWFKQ8jcYyyDo245tFUnSZmMi2yZWmMaHdcUWWGqEYXqSZ",
"/ip4/192.168.3.93/tcp/4001/p2p/12D3KooWFKQ8jcYyyDo245tFUnSZmMi2yZWmMaHdcUWWGqEYXqSZ",
"/ip6/::1/tcp/4001/p2p/12D3KooWFKQ8jcYyyDo245tFUnSZmMi2yZWmMaHdcUWWGqEYXqSZ"
],
"AgentVersion": "kubo/0.17.0/",
"ProtocolVersion": "ipfs/0.1.0",
"Protocols": [
"/floodsub/1.0.0",
"/ipfs/bitswap",
"/ipfs/bitswap/1.0.0",
"/ipfs/bitswap/1.1.0",
"/ipfs/bitswap/1.2.0",
"/ipfs/id/1.0.0",
"/ipfs/id/push/1.0.0",
"/ipfs/lan/kad/1.0.0",
"/ipfs/ping/1.0.0",
"/libp2p/autonat/1.0.0",
"/libp2p/circuit/relay/0.1.0",
"/libp2p/circuit/relay/0.2.0/stop",
"/libp2p/fetch/0.0.1",
"/meshsub/1.0.0",
"/meshsub/1.1.0",
"/p2p/id/delta/1.0.0",
"/x/"
]
}
ipfs id 12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz
{
"ID": "12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz",
"PublicKey": "CAESIKZQt3PWA26ZtLvDLoQWd0s3fq3l/E7lHRmVRaq38PKZ",
"Addresses": [
"/ip4/<publicIP_1>/tcp/4001/p2p/12D3KooWBBbdgzJBLUUFhMpA9JucE932wJNt2d6QZrGgSmPvTtPZ/p2p-circuit/p2p/12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz",
"/ip4/<publicIP_1>/udp/4001/quic/p2p/12D3KooWBBbdgzJBLUUFhMpA9JucE932wJNt2d6QZrGgSmPvTtPZ/p2p-circuit/p2p/12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz",
"/ip4/<publicIP_2>/tcp/4001/p2p/12D3KooWCjiGPnmxpsZnH1Zv2DzHJ5ReigdJhCsbnvB2ZXdjQrvz/p2p-circuit/p2p/12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz",
"/ip4/<publicIP_2>/udp/4001/quic/p2p/12D3KooWCjiGPnmxpsZnH1Zv2DzHJ5ReigdJhCsbnvB2ZXdjQrvz/p2p-circuit/p2p/12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz",
"/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz",
"/ip4/192.168.3.152/tcp/4001/p2p/12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz",
"/ip6/::1/tcp/4001/p2p/12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz"
],
"AgentVersion": "kubo/0.16.0/",
"ProtocolVersion": "ipfs/0.1.0",
"Protocols": [
"/floodsub/1.0.0",
"/ipfs/bitswap",
"/ipfs/bitswap/1.0.0",
"/ipfs/bitswap/1.1.0",
"/ipfs/bitswap/1.2.0",
"/ipfs/id/1.0.0",
"/ipfs/id/push/1.0.0",
"/ipfs/lan/kad/1.0.0",
"/ipfs/ping/1.0.0",
"/libp2p/autonat/1.0.0",
"/libp2p/circuit/relay/0.1.0",
"/libp2p/circuit/relay/0.2.0/stop",
"/meshsub/1.0.0",
"/meshsub/1.1.0",
"/p2p/id/delta/1.0.0",
"/x/"
]
}
ipfs swarm peers
/ip4/<publicIP_1>/tcp/4001/p2p/12D3KooWBBbdgzJBLUUFhMpA9JucE932wJNt2d6QZrGgSmPvTtPZ
/ip4/<publicIP_2>/tcp/4001/p2p/12D3KooWCjiGPnmxpsZnH1Zv2DzHJ5ReigdJhCsbnvB2ZXdjQrvz
/ip4/<publicIP_2>/tcp/4001/p2p/12D3KooWCjiGPnmxpsZnH1Zv2DzHJ5ReigdJhCsbnvB2ZXdjQrvz/p2p-circuit/p2p/12D3KooWM1bETTRGNe1QgUQDDcnnKMmeHMUPHLFi8fsutiVaktFz