How to connect and use two different networks simultaneously on Windows
Tags: tech, connection, ipv4, metric
Published: 2021-06-22 05:42:41

---
title: How to connect and use two different networks simultaneously on Windows
published: true
date: 2020-11-17 06:00:56 UTC
tags: Tech,connection,ipv4,metric
canonical_url: https://vuyisile.com/how-to-connect-and-use-two-different-networks-simultaneously-on-windows/
---

At the time of writing this, I am getting ready to give a live talk at a Python meetup. The talk will feature a live demo of my [PyPi in a Box project](https://vuyisile.com/pypi-in-a-box-using-a-raspberry-pi-as-a-portable-pypi-server/). To do the demo, I’ll need to be connected to the Internet in order to stream my talk and also be able to SSH into the PyPi server which is not accessible via the internet and is on it’s own network.

The PyPi server is a raspberry pi that creates a stand alone wifi network. When I connect to it, my computer is assigned an IP address. I also tether my phone using a USB cable to my computer to access the phone’s 4G network. The phone also assigns my computer an IP address. Connecting to these two networks makes it difficult to use them simultaneously because Windows will always prefer one over the other. In this post I’ll show you what I did to enable me to use both connections at the same time.

In Windows, each network interface receives a priority value automatically based on its network metric. This works well in most cases, for example if you connect to an Ethernet network and a WiFi network at the same time, Windows will almost always prefer the Ethernet network as it is likely to perform better than the WiFi connection.

In my case, the automatic metric isn’t something I wanted so I set the priority of the adapters manually in the Control Panel. Here’s how to do it:

1. Open **Settings**
2. Click on **Network & Internet**
3. Click on **Status**
4. Click “ **Change Adapter options** “
5. Right click the network adapter you want to change priority for and select its **Properties** :  

![](https://i2.wp.com/vuyisile.com/wp-content/uploads/2020/11/adapter.png?resize=632.4%2C494&ssl=1)

6. Select **Internet Protocol Version 4 (TCP/IPv4)**

![ipv4 settings](https://i1.wp.com/vuyisile.com/wp-content/uploads/2020/11/ipv4_settings.jpg?resize=365%2C472)

7. Click on the **Properties** button.

![](https://i1.wp.com/vuyisile.com/wp-content/uploads/2020/11/ipv4_properties.jpg?resize=405%2C459)

8. Click **Advanced**. In this section, uncheck the box that says **Automatic metric** and enter a number in the Interface metric box.

![](https://i0.wp.com/vuyisile.com/wp-content/uploads/2020/11/advanced_metrics.jpg?resize=405%2C496)

The number you enter here is the priority of the network interface, the lower the number, the higher the priority. A high number means low priority.

9. Click OK to save this dialog and the one that comes after it. Repeat the steps above for any other network adapters you need to configure. In my case, I gave the WiFi adapter a higher priority than the adapter used for Internet. This means that Windows will attempt to use that connection first to reach hosts and if it fails, it switches over to the second connection.

### Conclusion

This method of configuring your network adapters is the easiest I found and it doesn’t involve using the command prompt or setting up routes for each adapter. It is pretty easy to undo as well as all you have to do to undo is to check the Automatic metric box in Advanced TCP/IP settings again.