Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 8743

problem with NAT

$
0
0

hi I need to create NAT network on Windows Server 2019 Hyper-V.

I following powershell  steps from here:

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/setup-nat-network

1. New-VMSwitch -SwitchName "SwitchName" -SwitchType Internal

2. PS C:\> Get-NetAdapter

New-NetIPAddress -IPAddress192.168.0.1 -PrefixLength24 -InterfaceIndex24

* I insert correct InterfaceIndex from Get-NetAdapter

3. on this command I get the error and don't know what to do.  Please help.

I understand that I have to assign static IP in VM without Default Gateway (?). But what the error means? What duplicate name it refers to?

New-NetNat -Name MyNATnetwork -InternalIPInterfaceAddressPrefix192.168.0.0/24

My output:

PS C:\Users\Administrator> New-NetNat -Name MyNATnetwork -InternalIPInterfaceAddressPrefix 192.168.0.0/24
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.
At line:1 char:1
+ New-NetNat -Name MyNATnetwork -InternalIPInterfaceAddressPrefix 192.1 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_NetNat:root/StandardCimv2/MSFT_NetNat) [New-NetNat], CimException
    + FullyQualifiedErrorId : Windows System Error 52,New-NetNat


--- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis


Viewing all articles
Browse latest Browse all 8743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>