VMware Cloud Community
marcelovvm
Contributor
Contributor
Jump to solution

Best approach: one NIC to each VM X all NICs to on vSwitch

HI all,

         I am newbie to using ESXi (free) and I have a question. All the servers in my work have 4 NICs (1GB) each and when we started using ESXi we defined that each server would have up to 4 VMs as it would be a NIC for each VM. Reading and learn better about ESXi I discovered that we can put more than one NIC in a vSwitch and with this, in addition to having high availability (without a NIC fail the others continue to work), we can have a better advantage of network traffic because now the communication channel is 4GB (4 X 1GB).

     Would that work? Put 4 NICs in a vSwitch and configure the physical switch on the other side with Link Aggregation. And since we would only have one vSwitch, all VMs would be associated with that vSwitch.

Live long and prosper,
Marcelo Magalhães
Rio de Janeiro - BR
0 Kudos
1 Solution

Accepted Solutions
minivlab
Enthusiast
Enthusiast
Jump to solution

As far as best approach is concerned, you definitely don't want to assign one NIC per VM - you'll never be able to scale/take full advantage of virtualization that way.  You can create a virtual switch (vSwitch) with as little or as many physical NICs attached to it as you'd like.  In most deployments you'll find at least two physical connections to a vSwitch for redundancy/load balancing.

If you have 4 NICs, you could create two vSwitches with two NICs each (one for management traffic, and one for VM network traffic).  Some people argue it is a waste to dedicate physical interfaces to management traffic, but it really depends on your environment. Some people are required to have dedicated management links or simply prefer it.

If you create one vSwitch with 4 NICs, you'll want to configure the ports on your switch to be trunk ports (carrying management and any other networks required).  On the vSwitch you'll create one port group per VLAN, and of course you'll have a VMKernel adapter for management traffic.

When you assign multiple NICs to a vSwitch, vSphere will by default implement a fault tolerance model - if a physical link goes down, it uses another active one.  If you want to implement load balancing you need to set the vSwitch teaming policy to "route based on IP hash".  If you use the IP hash method, you will need to configure an EthernetChannel/bond/aggregate/etc. on your switch to ensure they are properly communicating with each other and using the same algorithm for load balancing.

View solution in original post

0 Kudos
9 Replies
pragg12
Hot Shot
Hot Shot
Jump to solution

Hi,

Let us know some background details like your requirement, ESXi version, number of ESXi hosts, network switch hardware vendor, to further assist you.

Consider marking this response as "Correct" or "Helpful" if you think my response helped you in any way.
0 Kudos
MikeStoica
Expert
Expert
Jump to solution

Why do you want to use LACP? As the other person said, please give us more details about ESXi version and environment. If you can use vDS (vSphere Distributed Switch) there is no point to create a LACP.

Would recommend to go through these links also: VMware Knowledge Base , LACP Configuration in vSphere 6 , Configure a Link Aggregation Group to Handle the Traffic for Distributed Port Groups

0 Kudos
malickware
Enthusiast
Enthusiast
Jump to solution

Hi,
when you use the default setting each VM will connect to the uplink that port group has thus in your case 1 Vm will connect to 1GB nic.

With this setting, you may achieve only network redundancy by adding all the nic in the port group however to gain the 4GB bandwidth you can use a simple port channel on the physical switch.

Change the port group load balancing policy to "Route based on IP hash".

LACP is an advanced function and if you are only looking for added bandwidth use a simple port channel.

The configuration has to be done on you physical switch as well.

0 Kudos
marcelovvm
Contributor
Contributor
Jump to solution

ESXi version: 6.0U3 (FREE)

Number of ESXi hosts: 7 (4 HP Proliant DL 380 G7 + 3 HP Proliant DL 360 G7)

Network switch: HPE 1920-48G Switch JG927A

Live long and prosper,
Marcelo Magalhães
Rio de Janeiro - BR
0 Kudos
marcelovvm
Contributor
Contributor
Jump to solution

Hi Mike,

   I can not use vDS or LACP in ESXi because we use de free version of it. I not talked about LACP (the protocol) I talked about link aggregation (sum of link) without the need to use the LACP protocol (even though the free version of ESXi does not support the LACP protocol).

Live long and prosper,
Marcelo Magalhães
Rio de Janeiro - BR
0 Kudos
marcelovvm
Contributor
Contributor
Jump to solution

Hi malickware,

     Okay, but my question is: if I do the aggregation of the 4 1GB NICs on a single channel, is it better to leave one each VM with a 1GB channel?

Live long and prosper,
Marcelo Magalhães
Rio de Janeiro - BR
0 Kudos
malickware
Enthusiast
Enthusiast
Jump to solution

If you a single channel and all the 4 nic card you have, on the vSwtich you have to add all the 4 NIC and choose the policy as "IP hash",ESXi will take care of the load balancing,

You do not have to specific one nic per VM as this will ruin the purpose of it.

0 Kudos
minivlab
Enthusiast
Enthusiast
Jump to solution

As far as best approach is concerned, you definitely don't want to assign one NIC per VM - you'll never be able to scale/take full advantage of virtualization that way.  You can create a virtual switch (vSwitch) with as little or as many physical NICs attached to it as you'd like.  In most deployments you'll find at least two physical connections to a vSwitch for redundancy/load balancing.

If you have 4 NICs, you could create two vSwitches with two NICs each (one for management traffic, and one for VM network traffic).  Some people argue it is a waste to dedicate physical interfaces to management traffic, but it really depends on your environment. Some people are required to have dedicated management links or simply prefer it.

If you create one vSwitch with 4 NICs, you'll want to configure the ports on your switch to be trunk ports (carrying management and any other networks required).  On the vSwitch you'll create one port group per VLAN, and of course you'll have a VMKernel adapter for management traffic.

When you assign multiple NICs to a vSwitch, vSphere will by default implement a fault tolerance model - if a physical link goes down, it uses another active one.  If you want to implement load balancing you need to set the vSwitch teaming policy to "route based on IP hash".  If you use the IP hash method, you will need to configure an EthernetChannel/bond/aggregate/etc. on your switch to ensure they are properly communicating with each other and using the same algorithm for load balancing.

0 Kudos
marcelovvm
Contributor
Contributor
Jump to solution

Hi minivlab,

     Thank you, your response was thorough and straightforward. exactly what he was looking for. I'll make the suggested changes.

Live long and prosper,
Marcelo Magalhães
Rio de Janeiro - BR
0 Kudos