VMware ESXi and vSphere Cluster Management

Configure NAT Networking for a Virtual Machine in VMware Player

Learn how to switch an existing VMware Player virtual machine to NAT mode, understand VMnet8 networking, verify connectivity, and troubleshoot common problems.

NAT stands for Network Address Translation. In VMware Player, NAT networking lets a guest virtual machine reach the internet and other external resources through the host system's network connection. The guest uses a private VMware address rather than appearing as a separate computer on the physical network.

This guide explains how to change an existing virtual machine to NAT mode, what the VMware NAT components do, how NAT differs from bridged and host-only networking, and how to verify the result.

How NAT networking works

The host system is the physical computer running VMware Player. The guest virtual machine is the operating system running inside VMware Player. When the guest uses NAT, VMware places it on a separate private virtual network on the host.

  • The guest's virtual network adapter connects to the VMware NAT network.
  • VMware normally assigns the guest a private IP address through a virtual DHCP server.
  • The host's virtual network adapter provides communication between the host and guests on that virtual network.
  • The VMware NAT service or device forwards outbound guest traffic to the host's external network connection.
  • The NAT service translates the guest's private source address and maps returning traffic back to the correct guest.

External systems generally see outbound traffic as coming from the host's network identity, such as the host's address on a wired or wireless network. The guest does not normally receive its own independently visible address on the physical LAN.

VMnet8 and the NAT components

VMnet8 is the VMware virtual network commonly designated for NAT. Selecting NAT for a guest normally attaches its network adapter to this VMware-managed network. The exact virtual networks, service names, and available settings can vary by VMware installation and host platform.

ComponentRoleWhere it operates
Guest network adapterConnects the guest operating system to a VMware virtual network.Inside the virtual machine
VMnet8 NAT networkProvides the private network used by NAT-connected guests.On the host through VMware's virtual networking
VMware virtual DHCP serverUsually supplies the guest with an IP address, subnet information, gateway, and DNS settings.On the host
Host virtual adapterAllows the host to communicate with guests on the NAT network.On the host
VMware NAT serviceTranslates and forwards guest traffic between the private network and the external network, including return traffic.On the host
External networkProvides internet or other outside network resources through the host's active connection.Physical or upstream network

When to use NAT mode

NAT is usually a good choice when a guest needs outbound connectivity but does not need to be directly reachable from other computers on the physical LAN.

  • Give a development VM access to updates, package repositories, websites, or APIs.
  • Avoid consuming another address from a network with limited DHCP capacity.
  • Work with a physical network that restricts unknown devices or has restrictive DHCP policies.
  • Provide a degree of isolation from the external LAN while retaining outbound access.

For example, a development VM can use a private VMnet8 address and download software through the host without being added as an independent device to an office network.

Change an existing VMware Player VM to NAT

These steps change the network mode of an existing virtual machine. The wording can differ slightly between VMware Player versions and host platforms.

  1. Open VMware Player and select the intended virtual machine in the library.
  2. Open Player > Manage > Virtual Machine Settings.
  3. On the Hardware tab, select Network Adapter.
  4. Under Network connection, select NAT: Used to share the host's IP address.
  5. Confirm that the adapter is enabled and marked as connected, if those options are shown.
  6. Select OK to save the virtual machine settings.
  7. Start or resume the guest. If it was already running, restart its network connection or restart the guest when necessary.

The guest should now connect to the VMware NAT network, normally VMnet8, and request its configuration from VMware's virtual DHCP service.

Expected connectivity behavior

  • The guest and host can normally communicate through the host's virtual adapter on the NAT network, subject to guest firewall rules and enabled services.
  • The guest can initiate connections to external resources through the host.
  • The guest normally uses a private IP address that is separate from the host's externally used address.
  • Unsolicited inbound connections from the external network do not normally reach the guest.
  • Inbound access can be added selectively with port forwarding, a NAT rule that sends a selected host port to a specific guest and guest port.

For example, the host may be able to connect to a web server running in the guest by using the guest's private NAT address, while another computer on the physical LAN usually cannot connect to that server unless port forwarding or another network mode is configured.

Compare VMware network modes

ModeGuest access to external networkGuest visibility on physical LANTypical IP assignmentBest use case
NATNormally available through the host.Not directly visible as an independent LAN device.Private address from VMware virtual DHCP.Outbound internet access with reduced external visibility.
BridgedNormally available directly through the physical network.Guest joins the physical network more directly and normally has its own LAN address.Usually assigned by the physical network's DHCP server, or configured manually.The VM must be reachable by other physical LAN systems or operate as a LAN participant.
Host-onlyNot normally available.Isolated from the physical LAN and external networks.Private address from the host-only VMware network, often through virtual DHCP.Host-to-guest and guest-to-guest labs requiring complete external isolation.

Choosing between NAT, bridged, and host-only

  • Choose NAT when the guest mainly needs outbound internet access and does not need direct LAN reachability.
  • Choose bridged networking when other computers on the physical LAN must initiate connections to the guest or the guest must receive its own LAN address.
  • Choose host-only networking when the guest should communicate only with the host and other guests on an isolated virtual network.

Verify the guest's NAT configuration

After the guest starts, check its IP address, subnet, default gateway, and DNS configuration. A private address alone does not prove that routing and name resolution are working.

Windows guest

ipconfig /all
ping <NAT-gateway-or-external-host>

ipconfig /all displays the adapter address, gateway, and DNS servers. The ping test can use the displayed NAT gateway or an external host.

Linux guest

ip addr
ip route
ping -c 4 <external-host>
nslookup <hostname>
resolvectl query <hostname>

Use the commands that are available in the guest. ip addr shows addresses, ip route shows the default route, and the DNS commands test hostname resolution.

Test in stages

  1. Check that the VMware network adapter is enabled and connected.
  2. Check that the guest received a private IP address and subnet configuration.
  3. Test the host-side NAT network or configured gateway.
  4. Test an external IP address. This tests routing without depending on DNS.
  5. Test an external hostname. This tests DNS as well as routing.

Troubleshoot common NAT problems

The guest has no network connection

  • Return to the VM settings and confirm that Network Adapter is enabled and connected.
  • Restart the guest or renew its DHCP lease.
  • Verify that the VMware NAT and virtual DHCP services are available on the host.
  • Confirm that the host itself can access the external network.

The guest has an IP address but cannot reach the internet

  • Check that the guest has a default gateway.
  • Test an external IP address. If that fails, investigate routing rather than DNS.
  • Check whether the host firewall, VPN, security software, or network policy is interfering with VMware virtual networking.
  • Verify that the host's active wired or wireless connection permits outbound traffic.

The guest can reach an IP address but not a hostname

  • Inspect the DNS server addresses received by the guest.
  • Use nslookup or resolvectl query to test name resolution.
  • Renew the DHCP lease or restart guest networking if the DNS settings are missing or stale.

Another LAN computer cannot reach a service in the guest

This is normal for NAT. NAT does not normally expose the guest directly to the external LAN.

  • Use bridged networking when the guest needs direct LAN reachability.
  • Alternatively, configure a suitable port-forwarding rule from the host to the guest.
  • Allow the connection through the host firewall and the guest operating system's firewall as appropriate.

The guest was expected to have a separate LAN address

NAT intentionally uses a private guest address and the host's external network identity. Use bridged networking when the VM must receive or use an independently reachable address on the physical network.

Practical configuration examples

Development VM with internet access

Set the adapter to NAT, start the guest, and verify that it receives a private address, default gateway, and DNS settings. The VM should then be able to download updates and access external resources through the host.

Host-to-guest testing

Find the guest's NAT address and connect to it from the host. The connection is subject to the guest firewall and the service's listening address. A service listening only on the guest's loopback address may not accept connections from the host.

Lab server requiring LAN clients

Decide whether computers on the physical LAN must initiate connections to the server. If they do, bridged mode is generally simpler. If only outbound access is needed, keep NAT and use port forwarding only for selected inbound services.

Key points

  • NAT means Network Address Translation and commonly uses VMware's VMnet8 network.
  • The guest normally receives a private address from VMware's virtual DHCP server.
  • The VMware NAT service forwards outbound traffic through the host and translates return traffic.
  • NAT is suited to outbound access without direct physical-LAN visibility.
  • Use bridged mode for an independent LAN presence and host-only mode for external isolation.
  • Verify the guest IP address, gateway, DNS settings, adapter state, host connectivity, and VMware networking services when diagnosing problems.

For the related configuration procedure, see Configure NAT Networking.