Load balancing internet connections for a multi-homed Windows machine
If you have more than one internet connection, and wish to use them simultaneously, this article aims to help you do just that.
For most home networks, there is only one internet connection shared by all computers and/or devices, over WiFi or Ethernet connections. Sometimes, a PC or Laptop would have two (or more) network adapters, one for Wireless, and another for Ethernet. Windows is designed to handle these situations by automatically calculating a (metric) to each NIC (Network Interface Card) to control priority based on different factors including link speed. The default (metric) value for the builtin loopback device/interface is set to 1.
In some situations, where you might have access to more than one network connections at a given time, and want to use them to connect to the internet, to increase speed (over multiple TCP/IP connections) or redundancy/load balance, in those cases you need to specifically tell Windows what to do. By default, Windows will pick one network and stick to it, completely ignoring any other one.
In order for this to work, you will need to be connected to (at least) two different networks, using different network adapters (Ethernet or Wireless). Also you will need to use static IP addresses for each network.
To change Windows default behavior, first, we need to add two entries to Windows registry.
To do that, go to the run box and type in “regedit” without the quotation marks then hit the Ctrl + Shift + Enter keys all at once, to open the Registry Editor as an Administrator.
Then go to [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters]
Right click on the blank space on your right hand side and add the following new DWORD keys:
“RandomAdapter” and give it the value 1 to enable it.
“SingleResponse” and give it the value 1 to enable it.
They basically tell the network stack to randomly choose a network adapter to send and receive data through according to a randomizing algorithm so Windows does not send a request through a network and expect a response from another.
After that, you need to change the metric on your network adapters from automatic, and set them to the same value (preferably above 1, which is reserved to the loopback interface), otherwise, windows will prefer the one with the lowest total metric value.
• Open the Network and Dial-up Connections folder.
• Right click the local area connection you want to modify, and then click Properties.
• Click Internet Protocol, and then click Properties.
• Click Advanced.
• In the Adapter Metric box, type the appropriate value.
• To change the default gateway metric, click the gateway address in the Default Gateways box, and then click Edit.
• Type the appropriate metric value, and then click OK.
• Click OK.
You can try and give them numbers that add up to the same amount, like for one interface, give it a metric values of 25 and 1 and for the other give it the metric values of 24 and 2 respectively. Both will have the equal total metric value of 26.
Reboot your computer, for the changes to take effect.