Skip to content
Study CCNP

2.1.b Virtual machine

4 min read ENCOR 350-401 v1.2

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 gateway

When you troubleshoot, start inside the guest and move outward.

  1. Does the guest OS have an IP address?
  2. Is the vNIC up?
  3. Is the vNIC connected to the right virtual network?
  4. Is the virtual network mapped to the right VLAN?
  5. Does the host uplink carry that VLAN?
  6. 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/24

R1

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 config

R2

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 config

Verify

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.1

Break 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:

ModeMeaningGood for
BridgedVM appears on the same LAN as the hostReaching the physical network directly
NATVM reaches out through host translationInternet access from a lab VM
Host-onlyVM talks only to host and other host-only VMsIsolated labs
Internal/privateVM talks only to VMs on the same internal networkRouter/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 arp

On a Linux VM:

ip addr
ip route
ping -c 3 gateway
arp -n

On the physical switch:

show mac address-table for VM MAC or host uplink
show interfaces trunk
show vlan brief

In the hypervisor:

  1. VM powered on
  2. vNIC connected
  3. Correct virtual network / port group
  4. Correct VLAN tag
  5. 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

  1. What virtual component connects a VM to the network?
  2. Why can two VMs on different virtual switches fail to ping even with correct IP addresses?
  3. Which lab mode usually lets a VM appear directly on the same LAN as the host?
  4. What physical switch command can confirm whether VM frames are reaching the uplink?
  5. Why is a snapshot useful in a CCNP lab?