Set up a NAT network on Hyper-V host
- Open a PowerShell console as Administrator
- Create an internal switch
New-VMSwitch -SwitchName "NAT Switch" -SwitchType Internal
- Get InterfaceIndex from
Get-NetAdapter
- Allocate IP for the new switch, 100.64.86.1/24
New-NetIPAddress -IPAddress 100.64.86.1 -PrefixLength 24 -InterfaceIndex 43
- Configure the NAT network
New-NetNat -Name VMSwitchNAT -InternalIPInterfaceAddressPrefix 100.64.86.0/24
- You can now connect your Hyper-V virtual machines to this switch and allocate IPs in 100.64.86.0/24
DHCP is not configurated as it's not that easy on Windows…