VMware ESXi Networking Basics: vSwitch, Port Groups and VLAN ID

esxi networking vlan - custom-esxinet-featured.png

ESXi networking confuses newcomers because port groups are not physical switch ports — they are labels on a virtual switch that can carry a VLAN ID to the physical uplink. Get this right and VMs land on the correct subnet; get it wrong and you chase “works on one host only” bugs.

Linux fundamentals: IP & ping,
nmcli & netplan (guest side),
firewalld concepts.

Physical vs Virtual

Physical NICs (vmnic) uplink to a vSwitch; VMs connect to port groups on that switch.

vSS
uplink

Standard Switch on One Host

Without vCenter, you use a vSphere Standard Switch (vSS) per host — fine for labs and single-node edge.

vmnic0
uplink

Create or Edit a Port Group

Example: VM-Production-VLAN100 with VLAN ID 100 — VMs on this group tag frames for that VLAN.

port group
VLAN ID

Management vmkernel

vmk0 stays on a management port group — do not mix untagged VM traffic with management without a design.

vmk0
management

Test with a Small VM

Deploy a Linux VM, set static IP in guest, ping gateway and another host on the same VLAN.

test VM
ping

ESXi Firewall

Management services listen on vmk0; restrict who can reach TCP 443 on the management network.

bashESXi SSH
esxcli network firewall get
esxcli network firewall ruleset list | head
firewall
443

Document Your Diagram

Before production changes, sketch uplinks, VLANs, and which port group each VM class uses.

TipDistributed switches (vDS) need vCenter — for multi-host VLAN consistency, plan vCenter or identical vSS names/IDs.
diagram
change control

Quick Reference

  • Port group = VM-facing network label + optional VLAN ID
  • Uplinks = physical vmnic to the switch
  • Keep management on isolated VLAN/firewall rules

Related tutorials

Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.