I have an unusual network setup but it has been working great in the past. I have 2 networks, one has internet connectivity, the other does not. both use ASUS routers. The one network simply has no WAN connection.
I’ve been using Syncthing for years with great success. Machines connect and sync if they are on the same network, whichever of the two it may be.
some time several weeks or months ago (can’t be sure when) my machines suddenly stopped communicating. all computers would show disconnected status. I do not know what changed that may have caused this, an update maybe?
I usually enable only local discovery, disable global and relaying and that worked great before.
Now I find that if I enable global and relaying the computers will connect if on the internet connected network only. Connection shows relay. But the speed makes Syncthing useless. 10s or 100s of kB usually. I have several TB of data being synced.
I have tried resetting and disabling the software firewall. Checked the router settings but don’t really know what to look for. UPnp is enabled under the WAN section. when I run UPnp Router Control on both machines, I even see the apparent connections.
syncthing-46734, TCP, port 22000, ext port 46734 and one machine’s local IP address
syncthing-18306, TCP, port 22000, ext port 18306, and the other machine’s local IP is listed.
the network history graph shows activity even.
the list of remote devices on all machines says disconnected for all of them.
I don’t know how to go about diagnosing the problem and fixing it…if anyone can help I would really appreciate it!
there are 8 devices in the network, Linux and Android
Local discovery is broken in newer versions of Android. You will need to either enable global discovery or hard-code the IP addresses (or hostnames if the IP is dynamic) in order for the devices to connect smoothly.
Now, if the devices still can’t connect despite global discovery being enabled or they are able to connect only through a relay, then I’d say it’s probably the firewall. For testing, you may try to hardcode the IP address of one device (e.g. tcp://192.168.0.2 instead of the default dynamic) and then see whether it connects or not.
if local discovery is broken on android, the presence of an android node in the list wouldn’t cause various linux boxes from being able to talk would it?
I will try to hard code the IP and see what happens, I guess I’d also need to turn off DHCP on the machines I’m testing with to make sure their IP doesn’t get reassigned?
I tried disabling the software firewalls on a couple of the computers, it didn’t help in this case. the router also has a firewall, I disabled that one as well considering that particular router is not internet connected.
ok…by changing to an IP, it connected immediately showing the connection type as TCP WAN (on these test machines, they are on the network with internet connectivity, but I disabled global discovery and relaying) and data transfer speeds are 10-100x what I was seeing before. although still slower than I’d expect out of this network (wireless in this case) but this is great progress. Is this the solution to the connection problem? or does it indicate what the problem is that would allow me to keep things on dynamic do I don’t have to mess around with assigning static IPs to expect things to keep working?
thanks again for that tip! this is a big improvement already.
Just to confirm, these two devices are located on two different networks, right? I’m asking because if they’re in the same one, then you should be seeing “TCP LAN” and not “TCP WAN”. If the networks are different, then “TCP WAN” is alright.
The fact that you can connect the two using hard-coded addresses means that at least the firewall does allow direct connections between the two. If this doesn’t happen without hard-coding the addresses, then something else must be blocking the direct connection.
Can you post a full screenshot of the Web GUI from one of the affected devices (with global and local discovery, relaying, etc. all enabled)? The interesting part is the following.
In this case, at the moment anyway, they are all on the same network. What would cause it to show up as WAN instead of LAN in this case? Here is the screenshot you requested, with global and relaying turned back on temporarily.
The current code simply checks for known private IP address ranges and considers those as LAN. If you have other addresses assigned, that will be inaccurate. That issue will be fixed in the next release.
So that worked great for the last day, sync speeds are actually reasonable again.
How can I diagnose what is causing the normal discovery among Linux machines to not work? I prefer to sync with my offline network as its a wired network and much faster, but when the computers are on that network they will all have different IP addresses, so this solution really isn’t sustainable. too much maintenance.
it looks like I can put in multiple IPs though just comma separate them? That will help some, until DHCP changes them.
Last time I checked, ASUS routers support fixed DHCP leases. So if static IP addresses aren’t an option, map each device’s MAC address to a unique IP address in the DHCP pool so that each device receives the same assignment every time its DHCP lease is renewed, then your list of comma-separated addresses in Syncthing is effectively static.
Syncthing’s introducer feature might also be helpful for your particular setup to further reduce the maintenance.