Switch ports for servers and hypervisors: trunks, LACP, PortFast and MTU
In short: A server with one role can use an access port, but a hypervisor carries many VLANs and needs a trunk with only the required VLANs allowed. Uplinks can be independent trunks or an LACP port channel across a switch stack or vPC pair, as long as both sides match. Use PortFast on trunks for fast start-up, keep BPDU Guard, and match MTU end to end for storage and vMotion traffic.
Access or trunk?
A single-purpose physical server in one VLAN uses a normal access port with PortFast. A hypervisor host runs many virtual machines in different VLANs, plus its own management, live migration and storage traffic, so its uplinks are trunks.
interface TenGigabitEthernet1/0/10
description ESX01 vmnic0
switchport mode trunk
switchport trunk native vlan 999
switchport trunk allowed vlan 10,20,30,100,110
switchport nonegotiate
spanning-tree portfast trunk
spanning-tree bpduguard enable
mtu 9198
- Allowed VLANs: only the ones the host needs. Allowing all VLANs exposes every network to every VM and floods unnecessary broadcasts to the host.
- nonegotiate: hypervisors do not speak DTP, so turn it off.
- PortFast trunk: the port goes straight to forwarding after a reboot instead of waiting 30 seconds, which can otherwise make VMs or storage time out. Hypervisor virtual switches do not create spanning tree loops, so this is safe.
- BPDU Guard: if someone ever bridges two NICs inside a VM and BPDUs appear, the port shuts down instead of looping.
Two uplinks: independent or LACP?
Most hosts have two or more uplinks to two switches for redundancy.
- Independent trunks: each port is a normal trunk. The hypervisor's virtual switch balances by virtual port (each VM uses one uplink) and fails over if a link goes down. On VMware this is "Route based on originating virtual port", the default. Simple and works with any pair of switches.
- LACP port channel: both ports form one bundle with
channel-group 10 mode active. The two switch ports must be on the same switch, a stack, VSS/StackWise Virtual or a Nexus vPC pair. On VMware, LACP needs a Distributed Switch and "Route based on IP hash" or an LACP LAG. Linux and Proxmox use bonding mode 802.3ad.
The worst case is a mismatch: an EtherChannel on the switch but independent teaming on the host, or the reverse. You get MAC flapping, duplicate packets or blackholed traffic. Agree on one method with the server team and document it.
MTU for storage and migration
iSCSI, NFS, vSAN and vMotion often use jumbo frames (MTU 9000 on the host). Every hop must support at least that size: switch ports, trunks between switches, and routed interfaces if the traffic crosses VLANs. Test with a do-not-fragment ping from the host: vmkping -d -s 8972 10.30.0.12 on ESXi or ping -M do -s 8972 on Linux.
Real-world example: the VMs that vanished at night
Every night during backup, some virtual machines became unreachable for a few minutes. The switch had the host's two ports in a static EtherChannel (mode on), while the VMware standard switch used the default load balancing. The switch saw the same MAC addresses moving between the "two links" of one bundle at high traffic, and the host received frames on the wrong uplink. Removing the channel and using independent trunks, matching the host, fixed it.
Practice
Why should a hypervisor trunk only allow the VLANs it needs?
Is spanning-tree portfast trunk safe on a hypervisor uplink?
What happens if the switch uses an EtherChannel but the host uses independent NIC teaming?
Key takeaways
- Hypervisors need trunks with only the required VLANs allowed.
- Use PortFast trunk and BPDU Guard on server and hypervisor ports.
- Choose independent uplinks or LACP, and make the switch and host match.
- Jumbo frames must be supported on every hop; test with do-not-fragment pings.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.