Hyper-V Network NAT Configuration
How to Create a NAT Switch on Hyper-V Published on: July 12, 2022 by Robert Allen In this guide, you will learn how to create a Hyper-V switch that uses NAT for network access. NAT will provide virtual machines access to network resources (internet access) using the host computers network adapter. For this guide, I’ll use the below network settings. When the configuration is complete the VMs on the 192.168.100.0/24 network will use the Hyper-V Host IP 192.168.1.4 for accessing the internet. Step 1: Create an Internal Virtual Switch Open PowerShell and run the below command. Change “SWITCHNAME” to whatever you want to name your switch, I’ve called mine “nat-switch”. New-VMSwitch -Name SWITCHNAME -SwitchType Internal Step 2: Get the Interface Index Number (ifIndex) Next, you need to find the index number of the virtual switch created in step 1. Run the below command. Get-NetAdapter My index number is 28, you will probably have a different number...