Hyper V Internal switches

After creating a virtual switch called NAT Network and the gateway set at 192.168.5.1, I ran the command to create the NAT but gives the following error:

“New-NetNat : You were not connected because a duplicate name exists on the network. If joining a domain, go to System in Control Panel to change the computer name and try again. If joining a workgroup, choose another workgroup name…”

For reference, I followed the “Intro+to+IT” in pages 25 and 26.

Need help setting this switch!

Hi @mapowing

Can you paste a screenshot of your network adapters from PowerShell on your Windows 10? and one from Hyper-V?

As the error suggests there might be an issue with the name. You can try a different name for a quick resolution to see if the error goes away.

Ricardo

Thanks for the screenshot @mapowing

Here in the error either the name or the subnet is in use. Try executing Get-NetNat. This will show the NatNetworks created.

Thank you @ricardo.p
I have created a previous NAT with the same IP and subnet but forgot it’s name!
Thanks for the get-netnat cmdlet!

1 Like

Thank you @ricardo.p for the get-netnat cmdlet!

I found that I had created a NAT using Virtualbox before I began using Hyper-V with my vms.

However, I do not understand why I am using 10.0.2.0 in Virtualbox when creating a NAT while on the Hyper-V Virtual Switch is 192.168.5.0 according to the Intro-to-IT in pages 40,41 for Hyper-V and pages 34,35 for Virtualbox?

Hi @mapowing

There’s no special reason for choosing one sub-network versus de other. The examples in the Intro-to-IT pdf are just examples. Choose a subnet that works for you and is easy to remember. You will find out that in each of the modules, different subnets are used. The pdf also explains different virtualization technologies, pick the one that works for you. Just watch out not to use the same subnet as your home LAN to avoid confusion.

Ricardo