VMware Cloud Community
m4biz
Hot Shot
Hot Shot

Virtual VLANs and physical VLANs

Hi.

A simple question.

I've N.3 ESXi 5.5 VMs that share the same physical NIC and are connected to the same virtual switch : vSwitch0.

The physical NIC is connected to the port #01 of a real, physical, switch (external to ESXi server).

On this switch are definied N. 3 VLANs.

I'd like that every VM will be a member of only one of the different VLAN definied on the physical switch.

I.e. VM1, must be member of the VLAN1, VM2 member of VLAN2, and so on...

As I've just said, all VMs are connected to the same physical NIC and, than, to a single physical switch port.

On my physical switch I can only define VLAN based on the physical port.

I.e. on VLAN1 there are port from 1 to 5, on VLAN2 port from 6 to 10, and so on..

May I realize this in a mixed real/virtual environment?

Thanks in advance.

Ing. Cosimo Mercuro http://cosimomercuro.wordpress.com/
Tags (1)
Reply
0 Kudos
1 Reply
sk84
Expert
Expert

If you need 3 physical switch ports because for some reason you can only configure 1 VLAN per port, how do you want to wire it to just one server network card?

If you have only one physical network port on your server, the only way is to have 1 switchport on the physical switch in trunk mode, configure the 3 VLANs on the trunk port and create 3 different portgroups on your vSwitch0, each with a specific VLAN ID. Then you can assign the VMs to the correct portgroup.

Another option would be to add more network cards to the server so that you can use a total of 3 network cables and 3 different physical switchports. With that you can create 3 vSwitches (vSwitch0-2) and assign each vSwitch a network card port as an uplink. After that, you can create a portgroup on each vSwitch with the respective VLAN ID and connect your VMs to the right portgroups.

--- Regards, Sebastian VCP6.5-DCV // VCP7-CMA // vSAN 2017 Specialist Please mark this answer as 'helpful' or 'correct' if you think your question has been answered correctly.
Reply
0 Kudos