If Windows has multiple interfaces connected to several networks that use DHCP, it installs default gateways for all those interfaces.
By default, Windows sets the metric of the default gateways to the same, effectively leading to random selection of default gateway.
If you want to make Windows to select certain gateway always, you can change interface metrics for the interfaces’ configuration you don’t want to use:
- Go to your Network adapter properties
- Select Internet Protocol v4.
- Click the Advanced button on General tab.
- Uncheck
Automatic metric
. - Enter a number higher than 10 to the
Interface metric
field.
The default automatic metric for interfaces is 10. The lower the metric, the higher the preference to use it. So, you have to enter metric higher than 10 for the interfaces you don’t want to use.