Adding a new VLAN from vCenter
search cancel

Adding a new VLAN from vCenter

book

Article ID: 425331

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

- How to add new VLAN in vCenter per host basis or across host cluster

Environment

VMware vSphere ESXi

VMware vCenter

Resolution

To add a VLAN in vCenter, create a new Port Group on a Virtual Switch (Standard or Distributed) and assign it a specific VLAN ID (e.g., 10, 20) for the VMs, ensuring the physical switch ports are correctly configured as trunks to pass that VLAN traffic. This involves navigating to the Networking section, adding a Port Group, specifying the name and VLAN ID, and then connecting the VMs to this new port group. 

The process differs slightly depending on whether a Standard Switch (configured per host) is used or a Distributed Switch (configured once for the whole data center). 
 
Option 1: Standard Switch (Per Host)
Use this method if you want to add a VLAN to an individual ESXi host. 
  1. Log in to the vSphere Client.
  2. Select the specific ESXi host in the left navigation pane.
  3. Navigate to the Configure tab > Networking > Virtual switches.
  4. Click Add Networking.
  5. Select Virtual Machine Port Group for a Standard Switch and click Next.
  6. Select an existing standard switch (e.g., vSwitch0) and click Next.
  7. Enter a Network Label (e.g., "VLAN 10") and the VLAN ID (between 1 and 4094).
  8. Click Finish. You can now assign this new port group to your virtual machines. 
 
Option 2: Distributed Switch (vDS)
Use this method to add a VLAN across multiple hosts at once. 
  1. In the vSphere Client, go to the Networking view (the globe icon).
  2. Right-click your Distributed Switch and select Distributed Port Group > New Distributed Port Group.
  3. Enter a name for the new port group and click Next.
  4. Under VLAN, set the VLAN type to VLAN and enter the VLAN ID (1–4094).
  5. Complete the wizard. The VLAN will automatically be available to all hosts associated with that distributed switch. 
Essential VLAN ID Reference
  • 0 (None): The virtual switch does not tag traffic; the physical switch handles tagging (External Switch Tagging/EST).
  • 1–4094: The virtual switch tags traffic before sending it to the physical switch (Virtual Switch Tagging/VST).
  • 4095 (All): Used for VLAN Trunking; the virtual machine itself handles the tagging (Virtual Guest Tagging/VGT). 
Note: Ensure your physical switch ports are configured as Trunk Ports to allow the tagged VLAN traffic to pass through the ESXi host's physical network adapters. 

Additional Information

Reference KB: Configure VLAN Tagging on a Distributed Port Group or Distributed Port