2.1.b Virtual machine
Aligned to Cisco's 350-401 ENCOR v1.2 exam topics.
On this page
A virtual machine is a software-defined computer. It runs a guest operating system and receives virtual hardware from the hypervisor: CPU, memory, disk, and network interfaces.
For network engineers, the most important part is the virtual NIC. A VM can have one or more vNICs. Each vNIC connects to a virtual switch, port group, or virtual network.
If the vNIC is connected to the wrong place, the VM can have a perfect IP configuration and still fail.
VM basics
A VM usually has:
- vCPU
- vRAM
- virtual disk
- virtual NICs
- guest OS
- optional snapshots/checkpoints
- optional virtual serial or console access
The guest OS thinks it has real hardware. The hypervisor maps that virtual hardware to the physical host resources.
The network path
Guest OS IP stack -> vNIC -> virtual switch / port group -> host uplink -> physical switch -> default gatewayWhen you troubleshoot, start inside the guest and move outward.
- Does the guest OS have an IP address?
- Is the vNIC up?
- Is the vNIC connected to the right virtual network?
- Is the virtual network mapped to the right VLAN?
- Does the host uplink carry that VLAN?
- Does the gateway answer ARP?
Snapshots are not backups
Snapshots are useful for labs because they let you roll back quickly. They are not a substitute for backups in production. A snapshot preserves VM state at a point in time. It can also grow and affect performance if left too long, depending on platform.
For ENCOR, the practical lesson is simple: a VM can be reverted, cloned, moved, powered off, disconnected, or attached to a different network without touching the physical switch configuration.
Lab: two virtual routers and one LAN
Goal
Build a tiny virtual lab and verify that VM networking behaves like physical networking.
Topology
R1 Gi0/0 · 10.10.10.1/24
virtual switch LAN-A
R2 Gi0/0 · 10.10.10.2/24R1
conf t
hostname R1
interface GigabitEthernet0/0
description LAN-A to R2
ip address 10.10.10.1 255.255.255.0
no shutdown
end configR2
conf t
hostname R2
interface GigabitEthernet0/0
description LAN-A to R1
ip address 10.10.10.2 255.255.255.0
no shutdown
end configVerify
R1# show ip interface brief
R1# show arp
R1# ping 10.10.10.2
R2# show ip interface brief
R2# show arp
R2# ping 10.10.10.1Break it on purpose
Move R2's vNIC to a different virtual switch.
Expected result:
- R1 cannot ARP for 10.10.10.2.
- R2 may still show its interface up/up.
- The failure is outside the router config, in the VM-to-virtual-switch attachment.
Move it back and the pings should return.
Common VM networking modes
In Type 2 labs, you will often see these modes:
| Mode | Meaning | Good for |
|---|---|---|
| Bridged | VM appears on the same LAN as the host | Reaching the physical network directly |
| NAT | VM reaches out through host translation | Internet access from a lab VM |
| Host-only | VM talks only to host and other host-only VMs | Isolated labs |
| Internal/private | VM talks only to VMs on the same internal network | Router/switch practice |
The names vary by platform, but the idea is the same.
Troubleshooting checklist
Inside the VM:
show ip interface brief
show interfaces status
ping default-gateway
show arpOn a Linux VM:
ip addr
ip route
ping -c 3 gateway
arp -nOn the physical switch:
show mac address-table for VM MAC or host uplink
show interfaces trunk
show vlan briefIn the hypervisor:
- VM powered on
- vNIC connected
- Correct virtual network / port group
- Correct VLAN tag
- Correct adapter type
Exam traps
- A VM is not just an IP address. It has a vNIC connected to a specific virtual network.
- A VM interface can look up inside the guest while it is connected to the wrong virtual switch.
- Bridged, NAT, and host-only modes change what the VM can reach.
- A snapshot rollback can undo network changes inside the guest.
- The VM MAC address should eventually appear somewhere: virtual switch table, host uplink, or physical switch MAC table.
Quick check
- What virtual component connects a VM to the network?
- Why can two VMs on different virtual switches fail to ping even with correct IP addresses?
- Which lab mode usually lets a VM appear directly on the same LAN as the host?
- What physical switch command can confirm whether VM frames are reaching the uplink?
- Why is a snapshot useful in a CCNP lab?