VMware ESXi and vSphere Cluster Management
Set Up Host-Only Networking in VMware Workstation Player
Configure VMware Workstation Player host-only networking to connect guests with the host while isolating them from the physical LAN and Internet.
Host-only networking creates a private virtual network contained within the physical computer running VMware Workstation Player. A guest operating system can communicate with the host and with other virtual machines on the same host-only network, but it normally cannot connect directly to the physical LAN or public Internet.
This guide covers the default VMnet1 network, custom host-only VMnets, new and existing virtual machines, verification commands, and common problems.
What host-only networking means
The host operating system is the operating system on the physical computer. The guest operating system runs inside the virtual machine. A virtual network adapter is software-defined network hardware presented to the guest. VMware also installs a corresponding host-side virtual adapter for host-only communication.
In host-only mode, the guest virtual adapter connects to a private VMware virtual switch. The host has an adapter on that same virtual network, so the guest and host can exchange traffic when their firewall policies allow it. Other guests connected to the same virtual network can generally communicate with one another as well.
Host-only networking normally has no path through the physical network adapter to the LAN or Internet. This differs from other VMware network modes:
| Network mode | Host-to-guest communication | Guest-to-guest communication | Physical LAN access | Internet access | Typical use |
|---|---|---|---|---|---|
| Host-only | Yes, through the host-only subnet when firewalls permit it | Yes, when guests use the same host-only VMnet | Normally no | Normally no | Private labs, development, training, and controlled testing |
| NAT | Usually possible through VMware's virtual network | Depends on the NAT network and configuration | Guests commonly reach external networks through host address translation | Commonly yes | Guest Internet access without placing the guest directly on the LAN |
| Bridged | Usually possible through the physical network | Usually possible on the same physical network | Yes; the guest appears on the physical network through the host connection | Often yes, according to LAN policy | Testing a guest as a device on the existing network |
When to use host-only networking
- Isolated development labs: Run services and applications without exposing them to other LAN devices.
- Software testing: Test network-dependent software against a host or another guest without giving the test system normal Internet access.
- Training environments: Build repeatable exercises with several guests on a private subnet.
- Controlled security testing: Keep intentionally vulnerable or experimental systems away from the production LAN and public networks.
The isolation reduces the chance that guest traffic reaches other LAN devices or external networks. However, it does not automatically protect the host from a compromised guest. Disable unnecessary integration features and use appropriate guest and host firewall rules.
The default VMware host-only network
The default host-only network is commonly identified as VMnet1. Its components normally have these roles:
| Component | Expected role | Typical behavior |
|---|---|---|
| Host virtual adapter | Connects the host operating system to the private VMnet | Receives an address in the host-only subnet and can communicate with guests when firewall rules permit |
| Guest virtual adapter | Connects a VM to the selected VMnet | Appears to the guest as a network interface and typically obtains an IPv4 address automatically |
| VMware virtual DHCP service | Assigns addresses and related settings to guests | Provides a DHCP lease from the configured host-only address pool |
| Default gateway | Router used to reach destinations outside the local subnet | Normally absent or not useful for Internet access on a host-only network |
| Internet connectivity | External network reachability | Normally unavailable through a host-only adapter |
The exact subnet address, subnet mask, host adapter address, and DHCP range vary by installation and host configuration. Do not assume a particular private range; inspect the host and guest settings instead.
Addressing and routing behavior
When the guest network adapter uses DHCP, VMware's virtual DHCP service typically provides a DHCP lease. A lease is an automatically assigned IP address and related network settings that remains valid for a limited period.
The guest normally receives an IPv4 address in the host-only subnet and a matching subnet mask. For example, the guest and host might both use addresses in the same private subnet, but the actual values depend on VMnet configuration.
A default gateway is the router a system uses for destinations outside its local subnet. A host-only guest generally has no usable Internet-facing default gateway. Consequently, its routing table should contain a connected route for the host-only subnet but no route that provides normal Internet access through that adapter.
Host-to-guest communication requires all of the following:
- The host and guest must be connected to the same host-only VMnet.
- Their addresses and subnet masks must place them on the same host-only subnet.
- The host-only adapter must be enabled on the host.
- The guest firewall and host firewall must allow the required protocol and port. A firewall may block ping even when another service is reachable.
Configure an existing VM for host-only networking
- Select the target virtual machine in the VMware Workstation Player library.
- Open Player > Manage > Virtual Machine Settings.
- On the Hardware tab, select Network Adapter.
- Under Network connection, select Host-only: A private network shared with the host.
- Select OK to save the change.
- Start the VM, or restart its guest network connection if it was already running.
Changing the virtual NIC connection type can cause the guest to renew its DHCP lease or identify the interface as a new network. The guest may therefore ask for a new network profile or apply different firewall rules.
Connect a VM to a custom host-only virtual network
Custom: Specific virtual network lets you select a particular VMware VMnet instead of relying on the standard network choice. Use it when the host has more than one isolated virtual network.
- Open the target VM's Virtual Machine Settings.
- Select Network Adapter on the Hardware tab.
- Select Custom: Specific virtual network.
- Choose the intended host-only VMnet from the list.
- Apply the settings and verify that the guest receives an address from the expected subnet.
Multiple host-only VMnets are useful for segmented labs. For example, one VMnet can contain a web-server exercise and another can contain a separate malware-analysis exercise. Guests on different VMnets are not automatically on the same Layer 2 segment. When strict isolation is required, select a VMnet configured for host-only use rather than a NAT or bridged VMnet.
Configure host-only networking while creating a new VM
- Proceed through the New Virtual Machine wizard until the hardware customization step.
- Select Customize Hardware.
- Select Network Adapter.
- Set Network connection to Host-only.
- Complete VM creation.
The same network adapter choices can be changed later through the VM's settings, so selecting a different mode during creation is not permanent.
Verify the configuration
Check VMware's adapter selection
Open the VM settings and confirm that the adapter shows Host-only or the intended custom host-only VMnet. Also confirm that the adapter is connected and enabled.
Inspect the guest address and routes
On Windows, open Command Prompt and run:
ipconfig /all
route print
On Linux, run:
ip addr
ip route
Look for an address and subnet mask belonging to the host-only subnet. The routing output should show a directly connected route for that subnet. It should not show a normal Internet default route through the host-only adapter.
Test host-to-guest communication
Find the host's address on the host-only adapter, then test it from the guest. Replace the placeholder with the actual address:
Windows: ping <host-only-host-adapter-IP>
Linux: ping -c 4 <host-only-host-adapter-IP>
A failed ping does not prove that the network is disconnected because ICMP may be blocked. Test a specific permitted TCP or UDP service as well, and check both firewall policies.
Test the isolation expectation
Attempting to reach an Internet destination through only a host-only adapter should fail. Use route inspection to explain the result: the guest normally lacks a usable external default gateway and external route on that interface. If Internet access succeeds, inspect every virtual adapter and the complete guest routing table.
Practical host-only lab examples
One isolated test VM
Attach one VM to the default host-only network, commonly VMnet1. The guest should receive a private address from VMware DHCP, potentially reach the host's host-only address, and have no Internet browsing through that adapter.
Two-VM private lab
Attach two guests to the same host-only VMnet. They can generally communicate on the private subnet while remaining unavailable to devices on the physical LAN. Guest firewall rules still determine which protocols are allowed.
Segmented lab
Choose Custom: Specific virtual network and attach related lab VMs to the same custom host-only VMnet. Keep unrelated exercises on a different host-only VMnet to separate their traffic.
Security-testing VM
Use a host-only adapter for a VM that must not have direct external connectivity. Separately disable unnecessary shared folders, clipboard sharing, USB passthrough, and other host-guest integration features.
Limitations and design considerations
- A host-only network is private to the host and does not provide normal LAN or Internet access.
- Guests on the same host-only VMnet can generally communicate unless guest firewalls or other controls block them.
- A VM can have more than one virtual network adapter. A lab may use one isolated interface and one separately controlled external interface.
- Do not add NAT or bridged adapters when the objective is strict network isolation. A second adapter can provide the Internet route that the host-only adapter intentionally lacks.
- Static IP addresses can be used for lab design, but they must match the selected subnet and must not conflict with DHCP leases or other guests.
Troubleshooting host-only networking
The guest has no IP address or has a self-assigned address
- Confirm that the Network Adapter is enabled, connected, and set to Host-only.
- Verify that the selected custom VMnet is the intended host-only network.
- Restart the guest network connection or renew its DHCP lease.
- Check the VMware virtual networking and DHCP service status using the tools available for the installed VMware edition and host operating system.
A self-assigned address often means that the guest DHCP client did not receive a response. It can also indicate that the selected VMnet is not configured as expected.
The VM can reach the Internet unexpectedly
- Inspect all virtual network adapters assigned to the VM.
- Remove, disconnect, or disable unintended NAT or bridged adapters.
- Confirm that the intended adapter is not configured as NAT or bridged.
- Review the guest routing table and identify which interface carries the default route.
The VM cannot communicate with the host
- Compare host and guest addresses and subnet masks.
- Confirm that both systems use the same VMnet.
- Verify that the host-only adapter is enabled on the host.
- Check host and guest firewall rules for ICMP and the required application port.
- Test a specific permitted service instead of relying only on ping.
The guest cannot communicate with another host-only VM
- Confirm that both VMs use the same Host-only or custom VMnet selection.
- Inspect each guest's address, subnet mask, and routing table.
- Check guest firewall or endpoint security software.
- Temporarily test with rules adjusted for the required protocol and port, following the lab's safety policy.
VMnet1 is missing
- Verify that VMware virtual networking components were installed correctly.
- Review available custom VMnets and identify one configured for host-only use.
- Repair or reinstall VMware networking components if the required virtual network is unavailable.
- Remember that the product edition and host configuration can affect which virtual-network management options are exposed.
Exam-relevant summary
- Host-only: private host-and-guest network; normally no LAN or Internet path.
- VMnet1: the commonly provided default VMware host-only VMnet.
- Virtual DHCP: usually leases the guest an address in the host-only subnet.
- Default gateway: normally absent or not useful for Internet access on this network.
- Custom VMnet: use it to select a particular isolated segment, especially when several host-only labs exist.
- Unexpected Internet access: check for a second NAT or bridged adapter and inspect the default route.
- Failed ping: check firewall policies before concluding that the virtual network is broken.
For a concise configuration reference, return to setting up host-only networking.