A hypervisor gives each VM its own vCPU, vRAM and vDisk.
How do these VMs communicate with each other and reach the physical network?The Networking Gap
Your VMs sit on top of the hypervisor, isolated from each other.
They have no physical cable, no port, no direct access to the switch in your data center.
Figure 1 – The missing piece
There is a gap between the VMs and the physical world.
Something needs to sit between them and forward frames like a real switch would.The vSwitch Solution
That piece is the vSwitch (virtual switch).
A vSwitch is a software-based Layer 2 switch that runs inside your virtualized server.
It behaves exactly like a physical Ethernet switch, except it lives entirely in software.
Figure 2 – vSwitch connects your VMs to the physical network
The vSwitch does two jobs at once.
It connects VMs to each other inside the server, and it bridges them to the physical network.Answer the question below
What forwards frames between VMs inside the same server?
Two components connect to the vSwitch.
On one side, the VM plugs in through a vNIC. On the other side, the vSwitch reaches the physical network through a pNIC.The Virtual NIC (vNIC)
A vNIC is the network adapter of your VM.
It is software-emulated, and it plugs directly into a port on the vSwitch, exactly like a cable plugging into a physical switch..png)
Figure 3 – The vNIC plugs the VM into the vSwitch
From the VM's point of view, the vNIC looks and behaves like a real network card.
The VM has no idea that the switch on the other side is also virtual.The Physical NIC (pNIC)
A pNIC is the real hardware card on the server.
It connects the vSwitch to the physical switch in your data center through an Ethernet cable..png)
Figure 4 – The pNIC connects the server to the wire
The Full Frame Flow
Now that you know every piece, you can follow a frame from end to end.
Your VM sends a frame through its vNIC, the vSwitch forwards it, and the pNIC puts it on the wire.
Figure 5 – The full frame flow from VM to physical switch
A vSwitch can also exist without a pNIC.
In that case, it only carries traffic between VMs inside the same server. This is useful for isolated communication, like between a VM and a virtual firewall, without exposing that traffic to the physical network.Answer the question below
What component connects the vSwitch to the physical network?
Answer the question below
vSwitch0 has a pNIC to SW1, vSwitch1 has none. VM1 and VM2 are on vSwitch1, VM3 to VM5 on vSwitch0, VM6 on both. How many VMs can reach SW1?
A single vSwitch works well when you have one server.
But in a data center, you typically have dozens or hundreds of servers grouped into a cluster.The Scalability Problem
With standard vSwitches, you must configure each vSwitch individually on every host.
Change a VLAN policy or a security rule, and you need to repeat that change on every server in the cluster.
Figure 6 – Standard vSwitches require separate configurations
This approach is tedious and error-prone.
One missed server means inconsistent policies across your cluster.The Distributed Virtual Switch
A Distributed Virtual Switch (DVS) solves this problem.
It acts as a central management layer that pushes the same configuration to the vSwitch on every host in the cluster.
Figure 7 – A Distributed Virtual Switch pushes one config to all hosts
Each server still has its own local vSwitch that forwards traffic.
But from your perspective, you configure a single logical switch, and the DVS synchronizes that configuration across all hosts.This gives you centralized management across all your virtualized servers.
And when a VM moves from one server to another during a live migration, its networking policies follow automatically.Popular vSwitches
The main vSwitch implementations you should know are:
Open vSwitch (OVS) — open-source, common in Linux/KVM
VMware vSphere Standard Switch (VSS) — standard vSwitch in VMware
VMware vSphere Distributed Switch (VDS) — distributed version in VMware
Microsoft Hyper-V Virtual Switch — integrated into Hyper-V
Libvirt Virtual Network Switch — used in KVM/QEMU environments
Answer the question below
Which type of virtual switch provides centralized configuration across a cluster?