Highlighted
Contributor
Contributor

Setup VLANs in ESXi

Hello all,

I am a network engineer who now has responsibility for vSphere products. I am beginning to dive into vSwitches and have a few questions that I hope someone could help me with.

My lab ESXi server is connected to my core switch. I would like two vlans to flow to the vSwitch, vlans 30 and 40. The core switch is configured as tagged for vlans 30 and 40. Forst off is this correct or should I be setting these as untagged to flow. Second what changes do I have to make on the vSwitch side, so that I can create vms and put them on the right vlan? Right now the vSwitch is showing vlan 0, which I assume is a default?

Thanks,
Steve

0 Kudos
3 Replies
Highlighted
Hot Shot
Hot Shot

Hi steve! you can tag VLANs without problems. In VMware you have two types of virtual switches. Standard Switch and Distributed Switch (Requires enterprise license). Distributed switch lets you manage all hosts networking from the same console, so I would highly recommend it you have the licenses and you are using clusters.

Since you are using Standard Switch, let me help you with that. You would need to go to the virtual switch interface and create a Standard Portgroup. It will ask you the name and VLAN ID and some other things, so you can create two Standard Portgroups, one with VLAN ID 30 and the other one with 40.

Take in consideration that if you need the VMs to keep connected after a host migration, the portgroup name must be exactly the same in every standard switch.

Here is how you do it: VMware Knowledge Base

Hope this solves your problem.

Regards!

0 Kudos
Highlighted
Virtuoso
Virtuoso

0 Kudos
Highlighted
Commander
Commander

You should mention what is the VLAN ID 30 & 40 on your network plan with more details .. Let me explain clearly:

Let's consider there is a VLAN tag for all servers (physical and virtual): You can configure LAN just on the physical switch, put the connected ports of the network uplinks (VMNIC) of the ESXi host on the corresponding VLAN and because in this structure there is no need to separate VLAN IDs between the virtual machines, so you can let the port groups to be without VLAN ID, and tagging never happens on virtual networking side!

But in another design, maybe you need to put VMs on different networks like LAN and DMZ with different VLAN IDs in the whole of your network. In this structure, the servers may need communication between physical and virtual area, and now VLAN tagging in the virtual switches is necessary. So you need to configure associated VLAN IDs for each of the related port groups, exactly like the VLAN IDs that are configured before on your physical switches.

Please mark my comment as the Correct Answer if this solution resolved your problem
0 Kudos