libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.56k stars 273 forks source link

AutoNAT: Network ReachabilityPublic distinguishes between IPv6 and IPv4 #614

Closed wlynxg closed 2 months ago

wlynxg commented 4 months ago

Currently, AutoNAT considers the node to be in the public state as long as one address can be dialed successfully, but it does not differentiate between address types.

For example, when the IPv6 address of node A is Public but the IPv4 address is private, node A will think that its network is ReachabilityPublic. The ReachabilityPublic state will prevent node A from connecting to Relay. However, when another node is in an IPv4-only network environment, it will be unable to connect to node A because there is no Relay connection.

Is it possible to consider subdividing the node Network Reachability into ReachabilityIPv4Public, ReachabilityIPv6Public and ReachabilityPublic (including IPv4 and IPv6)? I think more detailed address visibility differentiation will allow developers to formulate strategies in more detail.

MarcoPolo commented 3 months ago

Will be fixed in Autonat V2 #538

dhuseby commented 2 months ago

@wlynxg it looks like this is addressed in the autonat spec, if you have any more questions, feel free to re-open this issue