Thursday, August 23, 2018

Simple way to setup a real-time file synchronization between two or more Windows PCs in a local network

In this post I'll go directly to the steps needed to achieve some acceptable real-time file synchronization between two or more computers in a local network:

1. First find a good cat.5 or cat.6 cable(s), especially those that are shielded (including the connector), 1Gbit switch (or use a router with 1Gbit switch). 1Gbit because of the speed you will need if files are a lot and bigger (for example over 1GB). In the case you have only two PCs with free NIC ports, you can directly plug the both ends of the cable in the ports. Standard says that 1Gbit NICs can work with straight cable, but some can't detect it (ie 10/100Mbit NICs) so you will need a crosswired cable

2. If both PCs are directly connected with a cable, you must set their IP addresses/mask/gateways as following:
PC1 IP address: 192.168.XXX.2
PC1 Subnet Mask: 255.255.255.0
PC1 Gateway: 192.168.1.3

PC2 IP address: 192.168.XXX.3
PC2 Subnet Mask: 255.255.255.0
PC2 Gateway: 192.168.XXX.2

Make sure those addresses to be different from those used for the Internet connection!

3. If you are using a router or the machines are already in a local network, just make their addresses STATIC and DIFFERENT than those already assigned to their NICs. Wi-Fi local networks or a hybrid ones (wired and wireless computers in one local network) computers also won't have a problem to be used for real-time file sync but this type of connecton has drawbacks like lower throughput (low download/upload speeds) and sometimes the routers must be configured to not isolate Wi-Fi network from the wired

4. Share your drives (or folders) and to have full permissions (not asking for username or password and have full control for 'Everyone').

5. Set the sharing options (go to Control Panel\All Control Panel Items\Network and Sharing Center\Advanced sharing settings):

6. Install this tool - DSynchronize and configure it like this (you can put a lot more shared PC drives/directories in left and right panes, just remember to put them in a different job ... everything depends on your own needs):

7. And if everything is ok you will have a brand new near* real-time file synchronization between two or more

* I said near because there is some seconds noticeable pause, you can count exactly how much if you wait for 'ding' sound of the program

8. To be sure you have a good network capable of high speeds, it is a good idea to measure throughput between nodes/computers of your local network with tools like iperf3. There are enough tutorials about that, on one of the computers you must start iperf in server mode, and on the others you start it as a client