Search the VMware Knowledge Base (KB)
View by Article ID

Troubleshooting IP-Hash outbound NIC selection (1007371)

  • 12 Ratings

Symptoms

If you have configured a NIC team for your VMkernel traffic using 2 physical uplinks, EtherChannel, and 2 storage target IP's, you may experience the following symptoms if you are using IP-Hash for load balancing: 
  • The vSwitch's traffic is not balanced across uplink adapters. 
  • All traffic is transmitted out of a single uplink adapter.

Resolution

This issue may occur if the calculated hash returns the same result based on the source IP and both destination IP's.
 
To resolve this issue, use this example to manually calculate the IP-Hash with the IP's you are using to help you choose 2 target IP's that utilize both uplinks on the vSwitch. 

To convert the NFS IP addresses to Hex:
  1. Use any online IP Hex Converter tool to convert the IP addresses to Hex. 

    This is an example we used a vSwitch with 2 uplinks, EtherChannel and IP-Hash:


    Links = 2 (0 and 1)
    VMKnic 10.0.0.10 = 0xa00000a
    NFS1 10.0.0.20 = 0xa000014
    NFS2 10.0.0.22 = 0xa000016

  2. Use the following IP-Hash formula to calculate the outbound uplink:

    VMKnic > NFS1 (0xa00000a Xor 0xa000014 =1E) % 2= 0
    VMKnic > NFS2 (0xa00000a Xor 0xa000016 =1C) % 2= 0

    1. On any scientific calculator, select Hex and Qword.
    2. Enter the VMKnic IP in HEX format (a00000a) and click Xor.
    3. Enter NFS1 IP in HEX format (a000014) and click =.
    4. Press Mod, press 2 for the number of uplinks, then click =. The result is 0.
    5. Repeat steps a-e, using the NFS2 IP (a000016) in step c. The result is also 0.

      IP-Hash chooses the first uplink in the team because they both have result of 0.

To ensure that IP-Hash balances outbound traffic:

  1. Change the IP for NFS2 from 10.0.0.22 to 10.0.0.21.
  2. Use any online IP Hex Converter tool to convert the IP addresses to Hex.

    For example:

    Links = 2 (0 and 1)
    VMknic 10.0.0.10 = 0xa00000a
    NFS1 10.0.0.20 = 0xa000014
    NFS2 10.0.0.21 = 0xa000015

  3. Use the following IP-Hash formula to calculate the outbound uplink:

    VMKnic > NFS2 (0xa00000a Xor 0xa000015 =1F) % 2= 1

    1. On any scientific calculator, select Hex and Qword.
    2. Select Hex and Qword.
    3. Enter the VMKnic IP in HEX format (a00000a) and click Xor.
    4. Enter NFS2 IP in HEX format (a000015) and click =.
    5. Press Mod, press 2 for the number of uplinks, then click =. The result is 1.

      Now the IP-Hash algorithm returns a different result. IP-Hash now balances the outbound traffic across both vSwitch uplinks.

Additional Information

For additional information about Etherchannel, see Etherchannel Sample Configuration (1004048).

Update History

07/27/2010 - Added ESX/ESXi 4.0 and 4.1 to products.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 12 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 12 Ratings
Actions
KB: