Tuesday, September 19, 2023

Enable direct P2P ethernet connection between 2 computers (Windows)

I recently had to add a secondary ethernet connection between two PCs, in order to quickly transfer lots of data between them. I ended up using two USB 2.5Gbps network adapters; those computers were already on a Gigabit LAN.

 In order to prioritize the transfer over the 2.5Gbps connection, I had to make a manual entry in each computer's routing table. Let's assume the static IP address of each machine are 192.168.200.1 and 192.168.200.2.

Step 1: You need to run ROUTE PRINT and find the network interface (IF) number of the device. e.g. 49 for our example below

Step 2: Then in an elevated Command prompt, execute the following:

route -p add <destination network> MASK <net mask> <gateway> METRIC <interface metric> IF <interface number>

e.g. On 192.168.200.1 computer: route -p add 192.168.200.0 MASK 255.255.255.0 192.168.200.2 METRIC 1 IF 49

e.g. On 192.168.200.2 computer: route -p add 192.168.200.0 MASK 255.255.255.0 192.168.200.1 METRIC 1 IF 49

Now whenever you initiate network traffic between the two, it will use the direct connection (192.168.200.0 network) you setup, instead of their usual LAN (say 192.168.x.0).

No comments:

Post a Comment