VMware Cloud Community
doepain
Contributor
Contributor
Jump to solution

How to effectively VLAN ESXi guests.

Hello

I have a Host that has 8 network interface cards, and two are plugged in VLAN 7 on our switch, and two are plugged in VLAN 8 on our switch, and then the remaining four are in the default VLAN. How can I utilize this in my VM environment where it works correctly? I setup two additional switches named the accordingly to the VLAN that its network interface cards belonged to, but I am not sure if this is working.

What is the the correct way to achieve this goal? I need to be able to assign the guest to a VLAN on the fly if I have to.

Senior Hosting Engineer ModusLink Open Channel Solutions, Inc.
Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
Dave_Mishchenko
Immortal
Immortal
Jump to solution

You might want to change one of the vswitches to just have one NIC for now and plug in a PC to verify that the port is setup VLAN wise OK. The VMs won't have any knowledge of the IP setup of the host and won't use the host's gateway. The vSwitch is pretty much a dumb switch and traffic can't get between vSwitches without first going out via your physical network.

View solution in original post

Reply
0 Kudos
6 Replies
Chamon
Commander
Commander
Jump to solution

To use VLAN tagging you will need to create portgroups on your vSwitches and set the VLAN ID on these port groups to whatever the VLAN is. Then add your VMs to those portgroups. Take a look at this

www.vmware.com/pdf/esx3_vlan_wp.pdf

Dave_Mishchenko
Immortal
Immortal
Jump to solution

The VLAN doc posted would be a good start to look at. Can you explain a bit more about how you'll be handling your networking, the purpose of the VLANs, if you're using NFS / iSCSI / vmotion, etc.

Reply
0 Kudos
doepain
Contributor
Contributor
Jump to solution

I have attached a screenshot of how the vSwitches are configured corrently. We have multiple VLANs on our site to segment the traffice for hosted web server/sites, application, and Corporate. We are not using iSCSI, VMotion, or NFS. We would like to be able to setup a server on the host, and assign it to vSwitch1 which has VLAN ID 7, and the two physical NIX associated with it are plugged into interfaces on our physical switch that are in VLAN 7. Therefore If I move a guest server to this vSwitch it will be moved to the correct actual VLAN.

(Ignore the hostnames in my screenshots. I noticed that some hosts are in more than one VLAN.)

Senior Hosting Engineer

ModusLink Open Channel Solutions, Inc.

Senior Hosting Engineer ModusLink Open Channel Solutions, Inc.
Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal
Jump to solution

How you have it setup is fine. If you had to support more VLANs you could enable trunk ports and then create multiple VM port groups each with the correct VLAN id. But if you just need to support the default and these 2 VLAN ids then it'll be fine.

doepain
Contributor
Contributor
Jump to solution

Hi

I have attached another screenshot of my "ESXi Network Configuration outlining my vSwitch layout. Each vSwitch depicts an actual VLAN on our network.

I labeled the "port group" based on the actual physical VLAN that the interface the VMNIC is plugged into, and I have assigned the appropriate VLAN ID when I created the vSwitches.

The issue is that when a virtual machine is assigned a "vmnic" that belongs to either vSwitch1, vSwitch2, and vSwitch3 they are unable to access resources beyond the localhost. The virtual machines have the corect IP, netmask, and gateway assigned to them based on the VLAN the server that the server belongs to.

It seems like the vmnics are trying to use the default gateway assigned to the VMkernel.

Clearly I am not doing something right I must be missing a crucial step somewhere.

Senior Hosting Engineer ModusLink Open Channel Solutions, Inc.
Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal
Jump to solution

You might want to change one of the vswitches to just have one NIC for now and plug in a PC to verify that the port is setup VLAN wise OK. The VMs won't have any knowledge of the IP setup of the host and won't use the host's gateway. The vSwitch is pretty much a dumb switch and traffic can't get between vSwitches without first going out via your physical network.

Reply
0 Kudos