NAT IP从NIC转发到Windows Server 2016问题上的VM hyper v

时间:2018-10-18 20:09:11

标签: windows hyper-v nat windows-server-2016

当我尝试在Windows Server 2016上进行从NIC到VM hyper v的NAT IP转发时[我有NAT虚拟适配器,实例私有IP为192.168.0.1],而NAT网关为192.168.0.254

Add-NetNatExternalAddress:找不到元素。 在第1行:char:1 + Add-NetNatExternalAddress -NatName“ NatVMgateway” -IPAddress“ 10.5.87.56。... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~     + CategoryInfo:ObjectNotFound:(MSFT_NetNatExternalAddress:root / StandardCi ... ExternalAddress)[Add-NetN    atExternalAddress],CimException     + FullyQualifiedErrorId:Windows系统错误1168,Add-NetNatExternalAddress

我的问题是

1)无法在Windows Server 2016上使用带有bellow powershell命令的Add-NetNatExternalAddress将IP添加到外部IP列表中

Add-NetNatExternalAddress -NatName“ NatVMgateway” -IPAddress“ 10.5.87.56”

当我尝试映射

Add-NetNatStaticMapping -ExternalIPAddress“ 10.5.87.56” -ExternalPort 3389-协议TCP -InternalIPAddress“ 192.168.0.1” -InternalPort 3389 -NatName NatVMgateway

询问未找到任何外部IP

请帮助

0 个答案:

没有答案