How to force or get periodic rediscover of a device on local network?


I’m looking for a way to force or trigger a peer/device re-discovery. Or to set a periodic discovery on local network.

The only option I found so far to force a rediscover is to restart Syncthing.

I have 3 devices synced, and all 3 have global discovery and nat-hole-punching disabled. I’ve set all my devices to sync only on trusted Wifi or when they can reach each other via static addresses from a VPN of mine.

My issue now is the following: (One of my devices is a PC and the other a Android Phone.) When the Phone is on the road aka left a trusted Wifi, the PC (re-)discovers the Phone via static address from VPN. Everything just works. And somehow even fast.

BUT, when the Phone rejoins a trusted wifi, and the VPN connetion is still up, then the PC never tries to rediscover the Phone on the local network, or the other way around, because both agree on that they have a working connection.

I’m now looking for something like; either: a) force (manually) a rediscover, semi cool; b) have periodic rediscover on the all configured addresses. In my case its: dynamic, static v6, static v4

Like I said before, the transition from Wifi to LTE with VPN just works fine. In this case the switch from dynamic discovery to static IP.

If I’m really the first one who rises such a question I would be more then happy to provide a feature request aka user story.

Thanks for help and hints.

Syncthing versions I use:

Syncthing does periodic re-discovery just as you’d hope, promoting relay connections to QUIC, or QUIC to TCP, however it doesn’t have a mechanism to prefer one TCP connection over another. That is, it doesn’t know about or understand your network topology. If it’s connected over TCP that’s as good as it expects it to get.

Thanks for the quick response.

Just as I hit post: I remembered I have OSPF running on the PC and VPN Server. So instead the PC has a static address configured for the phone; I just configure a address for the PC on the Phone.

What do you think about periodic rediscover even in the event of a stable connection? Like in my case, the local address should be preferred? I assume the order of configured addresses already achieve that? dynamic comes first, and then static addresses…

There’s no prioritization at all between addresses currently. There’s prioritization between protocols, but that’s something else. I could imagine prioritizing “local” addresses (as in RFC1918, ULA, link locals) over global addresses, possibly.

We already prioritize local (as per rfc) over global addresses.

When dialling, I see. But I don’t think that causes us to dial a local TCP connection if we already have a non-local TCP connection.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.