Data center · Lesson 3 of 4
VLANs in Virtualization: VST, EST and VGT in VMware
VMs have no cable. Their VLANs are defined by the hypervisor virtual switch, and the physical switch must deliver them over a trunk.
In a nutshell
In VMware each port group has a VLAN. The most common mode is VST: the physical switch sends a trunk to the host and the virtual switch adds and removes tags per port group.
In this lesson
The model
The ESXi host has a virtual switch (vSS or vDS). VMs connect to port groups, and each port group has a VLAN. The host physical NICs (uplinks or vmnics) connect to the physical switch.
The three tagging modes
| Mode | Port group VLAN | Who tags | Physical switch port |
|---|---|---|---|
| VST (Virtual Switch Tagging) | 1–4094 | The virtual switch | Trunk |
| EST (External Switch Tagging) | 0 (none) | The physical switch | Access |
| VGT (Virtual Guest Tagging) | 4095 on vSS / trunk range on vDS | The VM operating system | Trunk |
Key idea
On a standard vSwitch, VLAN 4095 is not a real VLAN: it means "pass every tag to the VM" (VGT mode). It is used for VMs acting as routers, virtual firewalls or analyzers.
The trunk towards the host (VST mode)
SW1(config)# interface range gi1/0/10 - 11 ← ESXi host vmnic0 and vmnic1
SW1(config-if-range)# switchport mode trunk
SW1(config-if-range)# switchport trunk allowed vlan 10,20,30,99
SW1(config-if-range)# switchport nonegotiate
SW1(config-if-range)# spanning-tree portfast edge trunk ← the host does not create STP loops
- Every VLAN used in the port groups must be allowed on the trunk of every host uplink. If it is missing on one, the VM loses its network when its traffic leaves through that uplink or when it moves with vMotion.
- A vSwitch does not take part in STP; that is why
portfast edge trunkis used and, on a vDS, CDP/LLDP can be enabled to see which physical port matches each vmnic.
Very common real mistake
A VM works on one host and loses connectivity after vMotion. Its VLAN was not allowed on the trunks of the destination host.
What you must remember
- Each VMware port group has a VLAN.
- VST: the vSwitch tags; the physical switch sends a trunk.
- EST: VLAN 0 and access port. VGT: VLAN 4095 and the VM tags.
- Allow the same VLANs on every uplink of every host.
Check what you learned
4 exam-style questions. Some have one answer and others ask you to choose several. Answer them all to complete the lesson.