Blue Flower

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, here is how to do it

 

1. Create a port-channel group

On the Cisco switch create a port-channel to link that will link the 4 x physical nics of the ESXi host (on my example I used the 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 config for 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

If the host is running version 6.5 or higher, it default 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. 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, 10th May 2018

 

References:

http://packetpushers.net/understand-etherchannel-load-balancing-catalyst-switches/

https://kb.vmware.com/s/article/1004048

https://kb.vmware.com/s/article/1022751

https://kb.vmware.com/s/article/1001938

 

Print Friendly, PDF & Email