VMware Cloud Community
HUMIS
Contributor
Contributor

NIC Teaming using Port ID

I have changed the load balancing policy on one of our test hosts from ether-channel and IP Hash teaming policy

to trunked ports on the Physical Cisco switch and route based on the originating virtual port ID.

I am trying to understand why I'm not getting load balancing on the 2 vmnics both active.

I currently have the following vm's in vswitch1:

3 VM's each have 1 virtual network card all in vlan1

1 VM with 2 virtual network cards 1 in vlan 2 and 1 in vlan3

Why would I still see 0 transmitted packets on one of the vmnics?

I am also unclear as to the following:-

a virtual machine's outbound traffic is mapped to a specified physical NIC based on ID of the virtual port to which the virtual machine is connected. This means no matter how busy the NIC becomes, even if there is another completely idle NIC, the traffic will never use the idle adapter, but will continue to use the overloaded NIC.

How do you find the ID of the virtual port to which a VM is connected?

How can I get the VM's to load balance outbound traffic across both nics?

0 Kudos
11 Replies
AWo
Immortal
Immortal

I am also unclear as to the following:-

a virtual machine's outbound traffic is mapped to a specified physical NIC based on ID of the virtual port to which the virtual machine is

connected. This means no matter how busy the NIC becomes, even if there is another completely idle NIC, the traffic will never use the

idle adapter, but will continue to use the overloaded NIC

Yes. The question is, does one NIC really becomes overloaded while the other is doing nothing? All vNIC's got distributed over all pNIC's equally. That would mean you have a bunch of guests doing a lot of traffic and using all the same pNIC (by coincidence) while the guests using the other pNIC do nearly nothing. Or you have less vNIC's than pNIC's. That could in fact leed to pNIC's doing nothing.


AWo

VCP 3 & 4

Author @ vmwire.net

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
AWo
Immortal
Immortal

BTW, you stated you have three vlans but two pNIC's. Do you run two vlans over one swicth port?


AWo

VCP 3 & 4

Author @ vmwire.net

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
HUMIS
Contributor
Contributor

Thanks for the reply.

The vlans I mentioned are actually port groups that have vlan id numbers assigned to them.

0 Kudos
AWo
Immortal
Immortal

Without a corresponding physical vlan? Why?

Are some guests talking to each other directly. They you don't see activity on the vmnic.


AWo

VCP 3 & 4

Author @ vmwire.net

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
weinstein5
Immortal
Immortal

What VMware does is not really load balancing but load distribution - only way you can have a VM potenitally use all pNICs in a NIC team is to use IP Hash - this will only work if the the VM is communicating to many different machines with different IP addresses since the outbound port is selected base don orginating and destination IP addresses -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
HUMIS
Contributor
Contributor

Thanks for your response,

My current NIC teaming is IP Hash with the Cisco switch set to ether-channel and 4 pnics all active.

the inbound traffic into the Vswitch is distributed on all pnics.

The outbound traffic is sent down 1 pnic only.

is this usual?

You mentioned that it would load balance if a server was communicating to lots of clients.

I have a file server that runs which can be accessed by hundreds of clients at any one time but I don't see any distribution of load on the outbound traffic.

0 Kudos
AWo
Immortal
Immortal

Yes, IP hash calculates the route from the destination IP. So if there are many communication partners there are many different routes.

the inbound traffic into the Vswitch is distributed on all pnics.

The outbound traffic is sent down 1 pnic only.

I expected it more the other way around...something like TLB (Transmit Load Balancing) as long as you use IP hash. If you use Port ID the traffic is bound to a vNIC-to-pNIC pair.

Maybe you should start small, use the switch as a dumb one and try Port ID. You should see activity on all pNIC's as long as you have the equal number or more vNIC's than pNIC's.

Then you can try Ether Channel again, but that requires IP Hash.


AWo

VCP 3 & 4

Author @ vmwire.net

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
HUMIS
Contributor
Contributor

I just want to clear up the point made about the number of vmnics or more to the number of pnics

My test esx server has 4 pnics (see attached screen shot)

2 vmnics assigned to vswitch0 for service console and vmkernel (vmnic0 & vmnic2)

2 vmnics assigned to vswitch1 for vm's (vmnic3 & vmnic1)

Therefore I should get load balancing across both vmnics for received and transmitted data using IP hash

0 Kudos
AWo
Immortal
Immortal

Therefore I should get load balancing across both vmnics for received and transmitted data using IP hash

Yes, if you have more than two communication partners of your virtual servers. VMware recommends not to use IP hash if you have "dumb" switches, they recommend Port ID. If many communication partners are involved IP Hash might be better, but remeber the setting affects all guests using a prot group, even the ones with less communication partners. I would test it.

If you use Ether Channel you must use IP Hash.

Be aware that

when you use Port ID, the incoming and outgoing traffic of one NIC is bound to a pNIC as long as this pNIC is available and its link is up.

when you use IP hash the same applies for the source-destination IP address pair.


AWo

VCP 3 & 4

Author @ vmwire.net

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
weinstein5
Immortal
Immortal

Not received unless you have a physical load balancer- esx only

distributes OUTBOUND traffic

Sent from my iPhone

On Apr 14, 2010, at 2:57 AM, HUMIS <communities-emailer@vmware.com

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
AWo
Immortal
Immortal

Not received unless you have a physical load balancer- esx only

distributes OUTBOUND traffic

Sure? As it is not really a load balancing but a load distribution you can't call it TLB. Incoming packets take the same route as outgoing packets. So I would say it does the distribution for outgoing and incoming packets.

If it would be load balancing, where the packets would be change the path on the vmnic level during communication to the same communicatin partner I would agree as long as dumb switches are used.

But load balancing can't be done on the vSwitch level as it depends on where the MAC address comes from when an ARP request is issued. In load balancing in TLB mode only one NIC is used for answers to ARP requests.


AWo

VCP 3 & 4

Author @ vmwire.net

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos