Virtual Switching
Cheat sheet · https://pcornel.dk/topic.php?topic=694
Answer
Virtual switching (vSwitch, Linux bridge, Open vSwitch) forwards frames between VMs on a host and maps port groups or VLAN tags to the host's physical uplinks.
Remember
- A virtual switch connects VMs to each other and to the physical network inside the host.
- It supports VLAN tagging on port groups.
- Physical NICs act as its uplinks.
First checks
- Hypervisor console (vCenter, Hyper-V Manager, Proxmox) — VM state, vNIC, port group / virtual switch and VLAN.
Get-VMNetworkAdapter -VMName <vm> | fl/Get-VMNetworkAdapterVlan(Hyper-V) — vNIC, switch and VLAN.qm config <vmid>/bridge vlan show(Proxmox/Linux) — VM NIC and bridge VLANs.show interfaces trunkon the physical switch — host uplink carries the VM VLANs.show mac address-table address <vm-mac>— the VM MAC learned on the host uplink.
Verify in this order
port group with VLAN ID → virtual switch → teamed physical uplinks → switch trunk with matching VLANs and teaming/EtherChannel setting → frames forwarded
Where it usually breaks
underlay IP/transport → control/session registration → route/endpoint distribution → policy/segment → encapsulation/tunnel state → decapsulation/egress → return path
Virtual Switching · operational reference
| Path | Possible forwarding |
|---|---|
| VM↔VM same vSwitch | Local virtual switching |
| VM↔external | vSwitch → uplink |
| Tagged network | Virtual/physical VLAN policy |
| Routed/NAT | Separate host/network boundary |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=694