understanding Vmware ESX VLANs

understanding Vmware ESX VLANs

If I am not wrong , VMs on the same subnet that are all in the same ESX host can communicate to each other without exiting the physical interface of the ESX host.

I would like to know if VMs on the same ESX host can communicate to each other if they are in different VLANs .

Thank you
jskfanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RoninCommented:
Yes ... If a you have configured router of some sort to route the traffic between VLANs.
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I would like to know if VMs on the same ESX host can communicate to each other if they are in different VLANs .

No physical impossibility with the default configuration, of vSwitches. Standard or Distributed.

This has nothing to do with ESXi, but VLANs in general are Virtual Networks, e.g. traffic on VLAN A, cannot communicate with VLAN B.

You need to have something, a device between the VLANS, this could be a router, or Inter-VLAN routing enabled on the Physical Switch - Layer 3.
0
jskfanAuthor Commented:
"You need to have something, a device between the VLANS, this could be a router, or Inter-VLAN routing enabled on the Physical Switch - Layer 3. "

- So best practice is to put all VMs that are on the same subnet on the same ESX Host ?


- I am looking at ESX host / Configuration / Networing. The Switch has so many  VM Port Groups and each with its own VLAN ID.  I am not sure what's all that represents .
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
There is really no best practice here, it depends WHY your NETWORK design has decided to use VLANS, and not a flat network.

What should be best practice is the same networking should be configured across ALL HOSTS, it then does not matter where the VM is hosted.

To use a VLAN in ESXi, each Virtual Machine Portgroup needs to have a VLAN TAG - simple.

So if you have a very large Datacentre, you could have many thousands of VLANS, and Virtual Machine portgroups.

Many reasons to use VLANS, and this is not specific to ESXi. It's networking design.

You may want to use VLANS to isolate traffic, DMZ, Printer Traffic, VPN Traffic, Management Traffic etc some organisations has VLANS for different floors, buildings, workstations, servers, Locations, DR Sites etc

and remember, limit of some networks is 255 IP devices etc If you are an organisation that uses a Class A network, you need some method to device and route that network!
0
jskfanAuthor Commented:
Let 's say we have ESX host with IP address 192.168.0.8/24 the Default gateway for ESX host is 192.168.0.254 (L3 Switch interface or a router).

Then when you create VM Port Groups with VLAN IDs in Vsphere , for instance (110,1121,1130,etc..)

how do you associate those VLAN IDs  with physical VLANs on the Switch.

Thank you
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Let 's say we have ESX host with IP address 192.168.0.8/24 the Default gateway for ESX host is 192.168.0.254 (L3 Switch interface or a router).

Then when you create VM Port Groups with VLAN IDs in Vsphere , for instance (110,1121,1130,etc..)

how do you associate those VLAN IDs  with physical VLANs on the Switch.

Thank you

It has nothing to do with IP Addresses!

Configuration of the physical switches, nothing to do with VMware ESXi. It just simply adds a number to the traffic you give it, on the Virtual Machine Portgroup.

All ESXi Host does, is add the Ethernet VLAN TAG of whatever (number you give it e.g.  (110,1121,1130,etc..) to the ethernet packet, when it hits a physical switch which understands VLANS, if checks for a TAG, and then hands off the traffic down that pipe....

It might be a bit heavy going this link, but have a read...

http://www.mustbegeek.com/understanding-vlans-in-switching-world/
0
jskfanAuthor Commented:
Andrew,

I understand how VLANs work in Physical switch. I am trying to understand how you configure in Vsphere the VMs in one Vlan to talk to other VMs in the other Vlan.

If I understand your comment , when you add VM Port Group , you should enter VLAN ID the same as the VLAN number of on the physical Switch.

For instance if I have a physical switch VLAN 110 then the Vlan ID of the VM port group should be VLAN ID 110

Correct ?
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I am trying to understand how you configure in Vsphere the VMs in one Vlan to talk to other VMs in the other Vlan.


The answer is SIMPLE - YOU DON'T! or CANNOT.

VMware ESXi does not provide any functions to do this, or vCenter Server.

You would need some sort of routing function and ESXi/vCenter Server does not provide this!


If I understand your comment , when you add VM Port Group , you should enter VLAN ID the same as the VLAN number of on the physical Switch.

For instance if I have a physical switch VLAN 110 then the Vlan ID of the VM port group should be VLAN ID 110

Correct ?

That is correct.
0
jskfanAuthor Commented:
I guess I got it... the physical switch, through the Trunk port, looks at the VLAN ID that came from Vsphere and knows to which Vlan on the physical switch it should go to.

-Regarding the IP address of the ESX Host,  is it the same IP address as the one you configure on the Management Network Port group  ?
0
jskfanAuthor Commented:
I guess I got it... the physical switch, through the Trunk port, looks at the VLAN ID that came from Vsphere and knows to which Vlan on the physical switch it should go to.

adding one question to my above comment : if the Vlan ID  that came from ESX to physical switch has no match  on the physical switch (I mean there is no VLAN that matches that VLAN ID), then what will happened, will it be dropped ? or forwarded to other physical switches ?

Some L3 switches Trunks can be configured to allow all Vlans to pass through.
L2 Switches  will allow all Vlans to pass through by default
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I guess I got it... the physical switch, through the Trunk port, looks at the VLAN ID that came from Vsphere and knows to which Vlan on the physical switch it should go to.

correct its called TAGGING, hence the expression VLAN TAG

adding one question to my above comment : if the Vlan ID  that came from ESX to physical switch has no match  on the physical switch (I mean there is no VLAN that matches that VLAN ID), then what will happened, will it be dropped ? or forwarded to other physical switches ?

NOTHING, its got nowhere to go...

Some L3 switches Trunks can be configured to allow all Vlans to pass through.
L2 Switches  will allow all Vlans to pass through by default

it may pass them all, but its traffic is not going to get anywhere, to its destination if nothing is configured for the Tag
0
jskfanAuthor Commented:

it may pass them all, but its traffic is not going to get anywhere, to its destination if nothing is configured for the Tag


Andrew , I meant if that VLAN is located in a physical switch that is not directly to that ESX Host
for instance VLAN 110 is in ESX55 connected to physical Switch77, but the physical Switch88 that has Vlan 110 is not directly connected to ESX55

Now Physical Switch77 should have some mechanism to channel  VLAN 110 traffic to physical Switch88 that has VLAN 110
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
in a network the VLAN TAG must exist/configured on ALL network equipment attached for the VLAN TAG traffic to pass.

whether that be ALL or Specific on the trunk or port.

if you want that TAG to be available in your network infrastructure.

In your example, it's called the BACKBONE is configured to carry all VLANS.

There is no point using VLANS if they are not configured everywhere!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jskfanAuthor Commented:
Got it...
Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.