Set Up NAT In Windows 10 Hyper-V

Windows 10 has a feature that allows to create NAT network in Hyper-V and put virtual machines behind the NAT. The steps to implement this are based on the Set up a NAT network article, I’ve reorganized it for simplicity.

All the steps must be performed from PowerShell console being run as Administrator.

1. Create Virtual Switch

My virtual switch will be named NAT, you will see it in Hyper-V manager. If everything is OK, you’ll see the following:

2. Find the interface index

Remember the ifIndex of a newly created virtual switch (named NAT).

3. Configure the NAT gateway

I will use subnet 172.16.0.x with mask In this command you specify the IP address of the NAT default gateway with 1 in the last position.

4. Create NAT network

In this command you specify subnet with 0 in the last position.


Now you can check virtual switch. When you open Control Panel -> Network and Internet -> Network Connections, you will see adapter “vEthernet (NAT)”. It must be set to IP address and subnet mask

Inside virtual machine you should set up TCP/IPv4 properties for network adapter manually like this:

IP Address or any other IP up to
Subnet mask
Default gateway
DNS server Place IP address of DNS server that is used on host network adapter, i.e. or