Let's say you have a VMware ESXi single host with 4 x network cards, and you want to load balance the traffic of these 4 x nics, by creating a trunk and connecting them to a Cisco C2960 switch. Here is how to do it

  1. Create a port-channel group
  2. Configure the 4 x ports in the switch
  3. Enable load-balance method
  4. Enable "IP Hash" load balancing on the ESXi host virtual switch
  5. Enable "Inherit from vSwitch" on the Management Network
  6. Test the network traffic

 

1. Create a port-channel group

On the Cisco switch create a port-channel to bound the traffic of all these 4 x physical nics of the ESXi host (for my example, I'm using port-channel number 6)

(config)#interface port-channel 6
(config-if)#description ESXi_Host5
(config-if)#switchport access vlan 11
(config-if)#switchport mode access

 

2. Configure the 4 x ports in the switch

To the 4 x ports where the ESXi host is going to connect, configure all of them and leave all shutdown but one! The port number that I used for this example were 24, 26, 28 and 30

This is the configuration that you need to put on each one of the ports, notice that by using "mode on" we are telling the switch that we stick to the "Etherchannel" protocol only

(config)#interface GigabitEthernet0/24
(config-if)#description ESXi_Host5
(config-if)#switchport access vlan 11
(config-if)#switchport mode access
(config-if)#channel-group 6 mode on

 

3. Enable load-balance method

Now on the configuration mode, run this command to enable the load-balance between source and destination, which is supported by ESXi hosts

(config)#port-channel load-balance src-dst-ip

 

4. Enable "IP Hash" load balancing on the ESXi host virtual switch

If the host is running version 6.5 or higher, it defaults to use IP Hash for load balancing, but if your host is running 6.0 it default to use the "Virtual Port ID" method, which will not work with Etherchannel. 

 

 

 

5. Enable "Inherit from vSwitch" on the Management Network

One common mistake is to forget to check the NIC Teaming setting, ensure you either configure the load balancing there to "IP Hash" or better choose the setting "Inherit from vSwitch"

 

6. Test the network traffic

Once all is setup, you can issue this command to test the traffic

#test etherchannel load-balance port-channel n "Source IP" "Destination IP"

See on my example below how, when testing the port channel 4, some IPs will go through port Gi0/14 while others will go by Gi0/16

All done!

 

London, 10 May 2018

 

References:

Understanding Etherchannel Load Balancing http://packetpushers.net/understand-etherchannel-load-balancing-catalyst-switches/

Sample configuration of EtherChannel / Link Aggregation Control Protocol https://kb.vmware.com/s/article/1004048

NIC teaming using EtherChannel leads to intermittent network connectivity in ESXi https://kb.vmware.com/s/article/1022751

Host requirements for link aggregation for ESXi and ESX https://kb.vmware.com/s/article/1001938

 

Print Friendly, PDF & Email

Comments powered by CComment