Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devices with static WAN IP address needn't ping to a Super Node #77

Closed
photosssa opened this issue Jan 3, 2023 Discussed in #76 · 1 comment
Closed

Devices with static WAN IP address needn't ping to a Super Node #77

photosssa opened this issue Jan 3, 2023 Discussed in #76 · 1 comment
Assignees
Labels
BDT bucky data transfer protocol CYFS Stack This is CYFS Stack

Comments

@photosssa
Copy link
Collaborator

Discussed in #76

Originally posted by photosssa January 3, 2023

If a device connected to ethernet with NAT, to establish a P2P connection to this device from any device, Super Node(SN) is needed;

  • Device got its WAN IP address with NAT from ping/pong with a SN;
  • Device keep its WAN IP address alive with ping/pong with a SN continuously;
  • Device got a handshake transited from SN for NAT may drop packet from IP addresses without a former deliver record;

If a device has static WAN IP address, means:

  • Device administrator knows its WAN IP address;
  • Device WAN IP address keeps unchanged(static);
  • Packets from any location sent to this WAN IP address reaches;
    SN is no more needed to establish a connection to devices with static WAN address;

How to config WAN IP address and no pinging SN in CYFS

Config endpoints for CYFS Stack

  1. Device has WAN IP address (without NAT): Config this WAN address for CYFS stack, socket bound to this WAN address;
  2. Device has a mapped static WAN IP address(with NAT):
  • Config both local address and its mapped WAN address for CYFS stack, socket bound to local address
  • Config local address and a its mapped port for CYFS stack, socket bound to local address, then ping/pong with SN once, got its mapped WAN address combining WAN IP and mapped port;

Config optional super nodes for CYFS stack

  • Config optional super nodes for CYFS stack, select one or more SN from those to ping/pong with;
  • If device needn't SN, config an empty optional super nodes; but CYFS stack need other ways to announce its endpoints(i.e. static configed known device; object Key-value storage on block chain);

Config known super nodes for CYFS stack

  1. To establish a connection from device with static WAN address to other devices, target device's pinging SN is still needed;
  2. Config known super nodes for CYFS stack to find target device's ping SN in those; it differs from optional super nodes;
@lurenpluto lurenpluto added CYFS Stack This is CYFS Stack BDT bucky data transfer protocol labels Jan 7, 2023
@lurenpluto lurenpluto moved this to 🧪To Test in CYFS-Stack & Services Mar 28, 2023
@lurenpluto
Copy link
Member

Support for NO-SN mode has been added, see the issue below
cyfs-stack support NO-SN online#56

@lurenpluto lurenpluto moved this from 🧪To Test to ✅Done in CYFS-Stack & Services Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BDT bucky data transfer protocol CYFS Stack This is CYFS Stack
Projects
Status: Done
Development

No branches or pull requests

3 participants