-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Kubo Causes Network Issues on Shared Public IP Connections #10616
Comments
You can gate the approximate number of connections via ResourceMgr settings, I think. How do you notice the connection limits? Do they affect TCP and UDP? I may suffer from it too but I haven't tried a number of things and I think I see issues with ipv6 so I'm not sure if it's the same thing. In theory limiting listeners to UDP transports might help in not triggering TCP connection limits? |
Webpages fail to load on the first try. Web content doesn’t load properly. Sometimes, when I run Kubo, the internet connection stops working within a few seconds. On connections where I have a public IP, it works properly. When I called my ISP's tech support, they told me there are connection limits in place.
I tried running Kubo with the configuration modified to listen only for UDP:
I don’t have IPv6. All my tests were conducted on IPv4-only networks.
As I mentioned above, it doesn’t work. Maybe the ISP doesn’t distinguish between protocols and just counts the total number of connections. |
It could be that connections were not triggered by your Kubo, but random peers interacting with your DHT server? Your config runs with implicit If your node is publicly diallable (thanks to uPnP, static port forwarding, or DMZ), Kubo will automatically act as DHT server, and you will have a lot of peers connecting to you. If you set You could either wait or change both ports (from |
This is not possible because my kubo is behind symmetric NAT and DHT is not reachable from the internet. DHT is always in client mode. I have also tried Routing.Type to Autoclient in the configuration for a long time without any change. The only way to use Kubo with an internet connection that has a shared IP is by enforcing a connection limit in libp2p. However, this cannot be achieved through Kubo's configuration, and an average user won't be able to solve this issue on their own. |
I'm having the same experience here. I have a dedicated IP though and can easily cap the bandwidth usage - but everything starts to slow down & drag if I don't. I use pretty basic configs except for the Accelerated DHT client; "Routing": {
"AcceleratedDHTClient": true,
"Methods": null,
"Routers": null
}, I have a gbit fibre connection - and its nowhere near saturated in bandwidth. Its using about 100mbit/s at tops - but still everything is grinding to a halt so its probably the connection number too. High latency, packet loss, other random issues. |
Checklist
Installation method
dist.ipfs.tech or ipfs-update
Version
Config
Description
When Kubo is used on an internet connection with a shared public IP address, it can cause random issues for the entire network.
Nowadays, most internet connections use shared public IPs because IPv4 addresses have run out. On such networks, Kubo opens numerous connections and frequently changes them. This behavior can trigger connection limits on the ISP’s (Internet Service Provider) gateway, leading to packet drops. This issue is very common, I have tested it with multiple ISPs and on various types of connections (wired, fiber optic, mobile 3G, LTE, 5G).
Since ISPs often have multiple customers sharing a single public IP, and each IP can only use 65,535 ports, they implement connection limits per customer. For example, my ISP has a limit of 1,000 connections per customer, which is insufficient for an entire home network. I observed that Kubo sometimes uses hundreds of connections simultaneously, which quickly exceeds this limit.
I have also tried adjusting the configuration for Swarm.ConnMgr.LowWater and Swarm.ConnMgr.HighWater, but this did not resolve the issue.
One of the most valuable features of IPFS is the ability to punch through NAT and relay nodes without public IPs. However, this connection behavior severely impacts the usability of IPFS in such environments.
The text was updated successfully, but these errors were encountered: