VMware Cloud Community
anthonyhelmey
Enthusiast
Enthusiast

Assign 2 vNICs to 2 different networks and 2 physical NICs

Hello,

I am working with ESXi 5.5 and vSphere.

I have 3 VMs configured and 2 vNICs assigned to each. I would like to know if there is a way to assign one vNIC in the 172.20.2.0/24 subnet that is used for primary traffic and have it be able to come out of the physical NIC assigned to a specific switch port on its own VLAN (101 in this case) in that network. Also I need to have the second vNIC assigned to in the 172.20.3.0/24 network and have it tied to its own physical NIC that is going to be used for multicast video streaming only in VLAN 202, again tied to its own switch port.

Is there a way to do this?

Thanks

0 Kudos
5 Replies
a_p_
Leadership
Leadership

Yes you can certainly do this. Depending on whether your physical switch supports 802.1Q you can do this with a single vSwitch with multiple port groups for the different VLANs, or by using separate vSwitches for each VLAN.

André

anthonyhelmey
Enthusiast
Enthusiast

The physical switch does indeed support 802.1Q. However I am wanting to keep the NICs on separate VLANs. In the topology there will be no router and no communication between VLANs which is what is needed. So trunking the ports will not be the best solution. Here is a small overview of the topology.

vNIC1 172.20.2.0 > Physical NIC1 > Switch ports 1-12

vNIC2 172.20.3.0 > Physical NIC2 > Switch ports 13-24

Do you have an article or guide on how to correctly do this? I am sure i could figure it out with trial and error, but there is a bit of a time crunch. I have been reading about using vmkernel interfaces, but I see them using it for vMotion, which is not what i need.

Thanks

0 Kudos
a_p_
Leadership
Leadership

Additional VMkrenel interfaces are not required in this case, as you are looking to connect the VM's to different subnets. What you will need to do is to create a Virtual Machine Port Group on one vSwitch with uplinks (vmnics) to one subnet (switch ports 1...12) and use the "Add Networking..." link to create another vSwitch with a VM port group that's connected to the other subnet (switch ports 13...24).

Assuming your ESXi host has its Management Network in subnet 172.20.2.x, you will end up with

vSwitch0: 2 port groups - one for the Manegement Network and a VM port group - switch port 1...12

vSwitch1: 1 port group - VM port group - switch port 13...24

André

anthonyhelmey
Enthusiast
Enthusiast

Cool. When I use the add networking link, i get 2 options, virtual Machine and VMKernel. To make another switch i would use the Virtual machine option correct?

0 Kudos
a_p_
Leadership
Leadership

Correct!

André

0 Kudos