6.7

Table Of Contents
Table 84. Considerations on Using Route Based on Source MAC Hash
Considerations Description
Advantages
n
A more even distribution of the traffic than Route Based on
Originating Virtual Port, because the virtual switch calculates
an uplink for every packet.
n
Virtual machines use the same uplink because the MAC
address is static. Powering a virtual machine on or off does
not change the uplink that the virtual machine uses.
n
No changes on the physical switch are required.
Disadvantages
n
The bandwidth that is available to a virtual machine is
limited to the speed of the uplink that is associated with the
relevant port ID, unless the virtual machine uses multiple
source MAC addresses.
n
Higher resource consumption than Route Based on
Originating Virtual Port, because the virtual switch calculates
an uplink for every packet.
n
The virtual switch is not aware of the load of the uplinks, so
uplinks might become overloaded.
Route Based on IP Hash
The virtual switch selects uplinks for virtual machines based on the source and destination IP address of
each packet.
To calculate an uplink for a virtual machine, the virtual switch takes the last octet of both source and
destination IP addresses in the packet, puts them through a XOR operation, and then runs the result
through another calculation based on the number of uplinks in the NIC team. The result is a number
between 0 and the number of uplinks in the team minus one. For example if a NIC team has four uplinks,
the result is a number between 0 and 3 as each number is associated with a NIC in the team. For non-IP
packets, the virtual switch takes two 32-bit binary values from the frame or packet from where the IP
address would be located.
Any virtual machine can use any uplink in the NIC team depending on the source and destination IP
address. In this way, each virtual machine can use the bandwidth of any uplink in the team. If a virtual
machine runs in an environment with a large number of independent virtual machines, the IP hash
algorithm can provide an even spread of the traffic between the NICs in the team. When a virtual machine
communicates with multiple destination IP addresses, the virtual switch can generate a different hash for
each destination IP. In this way, packets can use different uplinks on the virtual switch that results in
higher potential throughput.
However, if your environment has a small number of IP addresses, the virtual switch might consistently
pass the traffic through one uplink in the team. For example, if you have a database server that is
accessed by one application server, the virtual switch always calculates the same uplink, because only
one source-destination pair exists.
vSphere Networking
VMware, Inc. 98