The load balancing needs to be set up on both the vSwitch and the switch stack.
Highlight the ESX Server host.
Click the Configuration tab.
Click the Networking link.
Click Properties over the target vSwitch
Highlight the virtual switch in the Ports tab and click Edit.
Click the NIC Teaming tab.
From the Load Balancing dropdown, choose Route based on ip hash.
Verify that there are two or more network adapters listed under Active Adapters.
In an enable prompt on the stack:
Remove any extraneous commands from your target interfaces.
Any differing settings between the interfaces could cause the interface to not be added to the etherchannel.
In this example I am using a switch stack consisting of 2 3750s. I have 2 NICs on the host connecting to an etherchannel that spans these 2 physical switches in the stack. In this way I am able to have one switch physically fail (or loose power) and the connection stays up. I am using interface 21 on both switches in the stack and using channel-group 28.
#(config)> int range gi1/0/21,gi2/0/21
#(config-if)> channel-group 28 mode on
because the port-channel does not already exist this creates the port channel.
Check to see the number of ports in the etherchannel
#> sho etherchannel summary
Test the load balance type
#>sho etherchannel load-balance
If the etherchannel load balance type needs to be changed set it to source and destination ip
#(config)> port-channel load-balance src-dst-ip
test the load balance for an address behind the interface
#> test etherchannel load-balance interface port-channel 28 ip 192.168.1.81 192.168.1.11
#> test etherchannel load-balance interface port-channel 28 ip 192.168.1.81 192.168.0.11
Save the changes