This Networking 101 guide starts with a common VM network troubleshooting problem: your guest can reach the internet, but it cannot reach the other VM. Use the symptom table to choose your first check, then record the network name, IP prefix, selected route, and application result before changing settings.
On this page

Start with a symptom
| Symptom | First thing to verify | Where to go |
|---|---|---|
| Internet works, but the second VM is unreachable | Check both adapters are attached to the intended named segment. | Compare VirtualBox modes |
| The addresses look close, but the guests disagree about the path | Compare each guest’s actual IPv4 prefix. | Compare prefixes |
| The connection fails only with a VPN enabled | Compare the route and destination for the same IP before and after connecting. | Review VPN routes |
| A service responds by IP but fails by hostname | Check resolution on the client, then confirm the application expects that name. | Check DNS and hostnames |
| The route is as expected, but the application still fails | Check the intended service and its listening address on the destination VM. Record the exact error. | Work through the connectivity checks |
Write down what worked and where you tested it. A browser on the host and a browser inside a VM can reach different networks and use different resolvers. Compare observations made from the same machine before you attribute the difference to a setting.
1. Check the adapter and named virtual network
Open the hypervisor settings for both guests and record which adapter is enabled, its mode, and the network name. Some guests have a second interface for updates. A working outbound connection on one interface tells you about that path. The other guest may be attached to a different segment entirely.
| Required path | Mode to check | Boundary to verify |
|---|---|---|
| Selected guests only | Internal Network | Both guests use the same named virtual segment. Verify other adapters or forwarding separately. |
| Host and selected guests | Host-Only | The host participates in the private network. On recent macOS hosts, Oracle calls the option Host-Only Network. |
| One guest needs outbound updates | NAT | In VirtualBox, ordinary NAT does not create a shared network between guests. Internet access also depends on the host and its policy. |
| Guests share a virtual network and need outbound access | NAT Network | Check both guests are attached to the same NAT Network. Outbound access is part of the design. |
| A regular VM must participate on the physical LAN | Bridged | The guest can be reachable from the LAN, subject to the adapter, network and filtering. Keep deliberately vulnerable lab guests on their isolated segment. |
Network mode names in the table follow Oracle VirtualBox documentation. VMware, Proxmox, and libvirt use their own interfaces and defaults. Match the intended guest-to-guest, guest-to-host, or guest-to-LAN path in the documentation for your platform. See the VirtualBox two-guest network example if both guests currently use ordinary NAT.
When the settings look identical: Compare the adapter slot, connected indicator, and virtual network name side by side. Two adapters can both show Host-Only while belonging to different Host-Only networks. If a VM has a second NAT adapter, note which guest interface owns the address you are testing. Keep the working management path available while you inspect the lab adapter. Avoid changing the default gateway to fix a peer on an otherwise disconnected virtual network.
2. Compare IPv4 addresses and prefixes
Record both address-and-prefix pairs. Apply each guest’s own prefix to decide if it expects to reach the peer directly or through a router. Matching the first three octets works as shorthand only for a /24. A mismatched mask can make one guest treat the peer as local while the other sends its response toward a router.
| Guest A | Guest B | What their prefixes imply |
|---|---|---|
| 192.0.2.10/24 | 192.0.2.20/24 | Both compute 192.0.2.0/24. Each address is on-link according to the other guest’s prefix. Check shared segment membership separately. |
| 192.0.2.10/25 | 192.0.2.130/25 | A computes 192.0.2.0/25. B computes 192.0.2.128/25. Each guest classifies the other address as off-link. |
| 192.0.2.10/25 | 192.0.2.130/24 | A classifies B as off-link. B classifies A as on-link. Correct the documented prefixes before drawing any conclusion from a one-way failure. |
The three address pairs were checked with the IPv4 arithmetic in Python 3.9.6. This verifies the subnet calculation. Virtual segment membership, guest routing policy, and actual packet delivery are separate checks.
IPv4 prefix calculator
Goal: Check the arithmetic for an IPv4 prefix. An address count cannot show which devices exist or whether they can reach one another.
For routing context, see RFC 4632. For point-to-point /31 use, see RFC 3021.
For conventional subnets from /1 through /30, the tool subtracts the network and broadcast addresses. A /31 can use two endpoints on a supported point-to-point link. A /32 represents a single address. The entire IPv4 destination space is represented by /0, commonly seen as the default route.
Addresses that need a second look: If a guest has a link-local IPv4 address when you expected an address from the lab range, check the intended network and address assignment before interpreting an application timeout. If two guests have the same IPv4 address, resolve the address conflict first. Relative size matters too. A prefix change may make a guest classify a formerly remote peer as directly connected, even when the physical and virtual paths have stayed the same.
3. Verify the selected route
Use the same destination IP throughout the comparison. In a Linux guest you administer, a route lookup such as ip route get 192.0.2.20 shows the local routing choice for that example address. Read the outgoing interface and whether a next hop is listed. The lookup alone does not test the peer, the firewall, or the application.
For a lab restricted to a single virtual segment, the expected route is usually directly connected and a default gateway is unnecessary for that peer. When the intended path crosses a router, verify the return route as well. For directly connected neighbors, the local neighbor table may provide evidence of address resolution. On a routed path, the next hop can appear there in place of the remote guest.
How to read a route comparison: Write down the destination, chosen interface, next hop if present, and the network you expected. If one guest selects a NAT adapter and the other expects a reply over the isolated adapter, inspect each guest’s view separately. A routing snapshot can explain how a system intends to send a request. Pair it with the actual application result and, where relevant, the guest’s return path before claiming the request arrived.
4. Compare the path with and without a VPN
Start by recording the selected route and client resolver before connecting the VPN. Repeat the same checks after connecting. An overlapping subnet can divert traffic into the tunnel, and VPN policy can restrict local access even when the intended route appears unchanged. Record which machine runs the VPN client before you compare settings.
Multiple NAT layers mainly complicate connections that cross those layers. An isolated VM-to-VM path does not inherently depend on an ISP router. If a managed VPN blocks local traffic, keep the provider’s policy intact and use the approved lab configuration or a separate offline practice environment.
Do the same check from the same guest: A VPN can change the route, the DNS resolver, or both. If the route is unchanged but the hostname now resolves differently, investigate DNS first. If the exact IP request fails only while the VPN runs, compare the selected routes and review the provider’s local network policy. Keep the same virtual adapter and the same destination while gathering the before-and-after observations, so the comparison can answer one question at a time.
5. Check DNS and the requested hostname
Start on the machine where the request fails. Compare the intended hostname’s resolved address with the guest’s actual address. For names that should stay inside the lab, check the resolver or local name mapping on that machine. A mapping on the host may have no effect on the browser running in a different guest.
If the name resolves correctly, the web application may still distinguish requests by hostname, or the certificate may expect a specific name. Preserve the exact error message so you can distinguish a lookup problem from an application response. For a relevant worked example, see the Level 3 hostname troubleshooting guide.
Separate resolution from application identity: A hostname can resolve to the correct guest and still yield a different page than a request sent to the bare IP address. A shared web server may select content using the requested hostname. If HTTPS reports a certificate name mismatch, check the name you opened and the local service’s documented hostname. Keep certificate checks enabled. Record whether you saw a successful connection, an actual application response, or a certificate error before changing a DNS entry.
An IP response and a hostname response answer slightly different questions. In your notes, include the exact URL or application action, the client VM, and whether the response came from the expected page. Treat a missing ping reply as one observation. An application that responds over the intended path can still be reachable when the guest or an intermediate firewall drops ICMP echo traffic.
6. Verify the service from both ends
On a guest you administer, confirm the intended service is running and listening on the expected address and port. A service listening only on loopback will not accept connections addressed to the guest’s network interface. From the client, repeat the same known application request and record whether you saw a refusal, timeout, name-resolution error, or application response.
An application response confirms that the request reached a service at that moment. A refusal or timeout has several possible explanations. Keep the guest firewall in place and use its own status or logs to check the relevant policy. If your next task is to review saved observations after fixing connectivity, read how to interpret and compare Nmap results.
Read the whole error: A name lookup failure points you toward the resolver or the requested name. A connection refusal indicates that the client saw an explicit rejection, which could come from the host or a filtering device. A timeout establishes that the operation did not complete in the observed period; the missing reply has several possible causes. An HTTP response, including an error status, establishes that an HTTP endpoint answered that request. Match the response to the expected application before assuming it came from the intended guest.
Worked example: change one adapter setting
In this illustrative setup, both guests use documentation addresses within the same /24. The adapter network label is the only variable you change. Testing with two ordinary VMs and a known test service makes it easier to verify the path before you attach a training appliance.
| Record | Before the proposed change | After the proposed change |
|---|---|---|
| Adapter and network name | Guest A: Internal Network lab-a. Guest B: Internal Network lab-b. | Both guests: Internal Network lab-a. |
| IP and prefix | A: 192.0.2.10/24. B: 192.0.2.20/24. | Keep both addresses and prefixes the same. |
| Expected observation | Each guest treats its peer as on-link, but the two adapters are on different virtual segments. | The peers share the same intended segment. Actual application success still depends on guest state, listener, and filtering. |
| Record your result | Write down the outcome when contacting the known test service by IP. | Repeat the same request and compare the result before changing DNS, the firewall, or other settings. |
If both requests fail, keep the record and review the destination service and filtering next. If the second succeeds, the result is consistent with the segment mismatch being the cause under these conditions. Keep the single change and the test viewpoint in your notes so that another reader can reproduce the comparison.
Record the negative control: If the guests are meant to share a private lab segment, test only the specific, expected service on the intended peer, then document that the layout still matches your required boundary. Inspect all VM adapters and host forwarding settings, because a second attachment can make the diagram incomplete. If the guest still needs outbound updates, document that function separately from local guest-to-guest connectivity. Preserve the configuration or snapshot needed to reverse your test.
Save a record you can compare next time
A useful record includes the hypervisor and version, adapter names and modes, both addresses and prefixes, intended route, and one application result. Make one reversible change at a time. Write down the expected outcome before you test, then record the observation separately. These are the Networking 101 details that make a second review useful.

Keep the evidence tied to the change: Write one before observation and one after observation using the same source guest, destination address, destination service, and request. Record the exact adapter change and time. When a teammate reads the record, they should be able to distinguish what you directly observed from the probable explanation. That also gives you a baseline for a future VPN update or hypervisor change. Keep personal network details and credentials out of notes you intend to publish.
Frequently asked questions
Which mode should I use for a local two-VM lab?
Use the same named Internal Network for both guests when only those guests need to communicate. Use the same Host-Only network when the host also needs access. For a hosted VPN lab, follow its provider’s network instructions and confirm the selected route from the guest.
Why does internet access work while the other VM is unreachable?
Those destinations can use different paths. An outbound connection through NAT does not show that the guests share a virtual segment. Use the other guest’s actual address and prefix when checking the local path.
Does carrier-grade NAT stop a local VM lab?
An isolated guest-to-guest path stays within the virtual network, so upstream carrier-grade NAT is outside that path. Check it only if the intended connection depends on reaching a network outside the host.
Does Bridged make a guest reachable on my LAN?
Bridged connects the guest to the physical network through the host adapter. Actual reachability depends on the adapter and filtering. Use a dedicated isolated segment for deliberately vulnerable lab guests.
What does “No route to host” tell me?
Capture the actual error and inspect the destination route. Compare it with the expected adapter and next hop. Address resolution, an unreachable gateway, or a filtering response may also matter, so confirm the path before changing settings.
Sources and review notes
Updated November 23, 2026. The VirtualBox mode comparison follows the vendor documentation. The subnet example uses reserved documentation addresses and was checked with Python 3.9.6’s IPv4 arithmetic. The before-and-after VM scenario describes an expected outcome. It has no measured connectivity result.
Oracle VirtualBox 7.2 virtual networking · RFC 4632 on IPv4 prefixes and the default route · RFC 3021 on point-to-point /31 links