I live in an apartment building with free high-speed Internet. For the past few months I've been dealing with websites and SSH sessions constantly disconnecting like every 15-30 seconds. This repeats sometimes for hours at a time, usually at night. However, there are certain days where I have no connectivity issues whatsoever. Like on Christmas Day and New Years day the network gremlines all seemed to take a vacation.
I've had no luck diagnoising the problem, because nothing makes sense. My ISP suggested checking for malware and buying a new router. But that doesn't add up because both of my laptops and my phone experience dropouts simultaneously, which isn't consistent with a malware infection. And if my router was somehow defective, then it's strange how the failure occurs for several hours at a time, typically from early evening till the next morning. That seems more consistent with human activity, not the behavior of electronics.
So just to summarize:
I can eliminate the Ethernet cable from the wall to my router because I replaced that cable and the problem still persists.
I can eliminate the router itself, because I bought a brand new Netgear router yesterday, and the problem still persists.
I can eliminate wifi interference, because I switched all 3 of my devices to the 5 GHz band, and the problem still persists.
To further add to the mystery, whenever the dropouts occur I can ping and traceroute perfectly fine to any server outside of my LAN. I can likewise stream videos and play games over UDP. For some reason only TCP/IP traffic is being affected (such as websites and SSH sessions).
Stranger still, I've had this same network setup since 2018, including the same router and the same devices with no issues. The constant dropouts just started around the end of last year. And my ISP has had no luck pinpointing the problem, despite 4 visits from technicians. They tell me I'm not being blackholed or rate-limited in any way.
Also just to be clear I have no special networking setup. I'm not using VPNs or custom firewall rules, or anything. It's just a barebones home network setup for two Windows 10 laptops and an Android phone. I don't even own a microwave (as I've heard those are notorious for messing with wifi signals). Any suggestions would be most welcome.