helium / erlang-libp2p

An Erlang implementation of libp2p swarms
https://helium.github.io/erlang-libp2p
Apache License 2.0
120 stars 33 forks source link

transport_tcp: detect listen addr changes #44

Open madninja opened 6 years ago

madninja commented 6 years ago

DHCP based nodes will change their IP address over time.

Have the tcp transport server poll for IP address changes and update ETS as well as notify the peerbook

Balsteg commented 3 years ago

As more nodes are added that use 4G/5G internet connections, I think this continues to be an issue. I'm using a VPN to successfully port-forward around the CGNAT from a 5G carrier. The public IP address issued by the VPN changes often (daily?). The peerbook shows the old IP address for several hours. During this time, the node continues to appear online in Explorer and is able to witness beacons, but the node is unreachable to receive challenges or challenge receipts.

evanmcc commented 3 years ago

Thanks for the report. We'll try to bump up the priority on this one.

Balsteg commented 3 years ago

Thanks for the report. We'll try to bump up the priority on this one.

Someone else just posted in Discord #poc-discussion that in their country (Germany) most ISPs reissue IP addresses every 24 hours. Is there a workaround for now? It doesn't seem like power-cycling a miner updates the peerbook, unless there is a min time that it needs to remain offline?

ghost commented 3 years ago

Thanks for the report. We'll try to bump up the priority on this one.

Someone else just posted in Discord #poc-discussion that in their country (Germany) most ISPs reissue IP addresses every 24 hours. Is there a workaround for now? It doesn't seem like power-cycling a miner updates the peerbook, unless there is a min time that it needs to remain offline?

I posted it in Discord. Yes, in Germany and other EU countries some or most ISPs reissue IP addr every 24hrs. From my observation listen_addrs lag time to update to a new IP went from 1hr to 12-22hrs in the last 90 days and seems to be increasing still. Power cycling did not help. I recently removed PF and running a hotspot on relay to see if it leads to better results.

wolasss commented 3 years ago

Is there a workaround for now?

To tackle this issue, I have set up a VPS, connected a hotspot to a VPN, and reroute traffic to the hotspot so that it has static IP (VPS' IP). I'll let you know if it yields better results.