How Dropbox Lan Sync Discovery Protocol Works

Author

Reads 840

Close-up Photo of Document Files
Credit: pexels.com, Close-up Photo of Document Files

Dropbox's LAN Sync Discovery Protocol is a game-changer for file sharing and collaboration. It allows users to access and sync files across devices on the same local network, without relying on the internet.

By leveraging the local network, LAN Sync reduces latency and improves performance. This is especially useful for teams working on large files or high-priority projects.

The protocol uses a combination of multicast DNS and SSDP to discover available devices on the network. Multicast DNS is used for device discovery, while SSDP handles the actual syncing process.

Dropbox LAN Sync

Dropbox LAN Sync uses port 17500 on both TCP and UDP to perform two different functions.

The application sends first UDP packets to the local networks broadcast address on UDP 17500, which should be listened to and responded to by other Dropbox clients on the LAN.

This probe traffic is typically spotted within firewall logs due to its broadcast nature.

Dropbox clients use TCP and port 17500 to transfer raw data, either to the Dropbox servers on the internet or to other local clients discovered using the probe.

This file transfer protocol may use excessive bandwidth.

Testing and Troubleshooting

Credit: youtube.com, How does Dropbox LAN Sync work? (2 Solutions!!)

Testing and Troubleshooting is a crucial step in ensuring the smooth operation of Dropbox LANSync Discovery Protocol.

The protocol relies on the ability of devices to discover each other's presence and capabilities, which can be disrupted by network congestion or firewall rules.

Dropbox LANSync Discovery Protocol uses a distributed hash table (DHT) to store and retrieve network addresses, making it more resilient to node failures.

However, this DHT can be prone to inconsistencies if not properly managed, leading to issues with discovery and synchronization.

To troubleshoot issues with the protocol, you can start by checking the network logs for errors related to DHT operations.

The protocol's self-healing mechanism can also be triggered manually by restarting the Dropbox service on affected devices.

Discovery Process

The Dropbox LAN sync discovery protocol is a fascinating process that allows your computer to find and connect with other machines on the same local network. This process is called discovery, and it's essential for syncing files across multiple devices.

Credit: youtube.com, How to Sync Files with Dropbox on LAN

Each machine sends a UDP broadcast packet every 30 seconds, which contains identifying information such as the protocol version, namespaces supported, and a random identifier. This packet is sent to a specific port, 17500, which is reserved by IANA for LAN Sync.

The packet includes a dictionary payload that helps identify the sender to the receiver. This process seems to be consistent across different operating systems, except for a notable exception.

On Windows 7 laptops, there appears to be an initial ramp-up time before the intervals become consistent. In this case, the intervals started at 22 seconds and eventually settled at 30 seconds after 5 minutes.

Discovery

The discovery process is a crucial part of the Dropbox LAN Sync framework. It's how your computer finds other machines on the local network to sync with.

Each machine periodically sends and listens for UDP broadcast packets over port 17500, which is reserved by IANA for LAN Sync. These packets contain the version of the protocol used by that computer, the namespaces supported, the TCP port that they are running the server on, and a random identifier.

Detailed view of a black data storage unit highlighting modern technology and data management.
Credit: pexels.com, Detailed view of a black data storage unit highlighting modern technology and data management.

The dropnbox process running on your computer sends a UDP broadcast packet in the local network every 30 seconds. The source and destination port of the packet are set to 17500. This UDP packet has some payload attached to it for identifying itself to the receiver.

The intervals between these packets can vary, as seen on a Win7 laptop with an initial rampup time of 22 seconds before settling into 30 seconds after 5 minutes.

Here's a breakdown of the information contained in the UDP packets:

  • The version of the protocol used by that computer
  • The namespaces supported
  • The TCP port that they are running the server on
  • A random identifier

Server/Client

The server in our protocol is quite simple, it just needs to know which blocks are present and where to find them.

The client, on the other hand, is responsible for maintaining a list of peers for each namespace, which comes from the discovery engine.

To download a block, the client sends a HEAD request to a random sample of peers and requests the block from the first one that responds saying it has the block.

A Black and White Diagram
Credit: pexels.com, A Black and White Diagram

One optimization we use to avoid the latency of an SSL handshake is to use connection pools, allowing us to reuse already-started connections.

Designing these pools was a good exercise in concurrency, as they need to be able to give out connections or have them released back into the pool or be shut down when the connection died, all while being accessed from multiple threads.

We have a fairly aggressive timeout on how long we are willing to wait before falling back to the block server, and we limit the number of connections we are willing to make to any single peer and how many peers we are willing to ask for a block.

Frequently Asked Questions

How do I turn off LAN sync in Dropbox?

To turn off LAN sync in Dropbox, go to the Lan Sync section and uncheck the Enable LAN Sync option. Then, click Apply and OK to save the changes.

Thomas Goodwin

Lead Writer

Thomas Goodwin is a seasoned writer with a passion for exploring the intersection of technology and business. With a keen eye for detail and a knack for simplifying complex concepts, he has established himself as a trusted voice in the tech industry. Thomas's writing portfolio spans a range of topics, including Azure Virtual Desktop and Cloud Computing Costs.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.