To get/set the load balancing policy on a Virtual Switch on an ESXi Host
To list the current NIC teaming policy of a vSwitch, use the command below, replacing vSwitch_name with the name of your vSwitch, e.g. vSwitch0:
esxcli network vswitch standard policy failover get -v <vSwitch_name>To set the load balancing policy of a vSwitch, use this command:
esxcli network vswitch standard policy failover set -l <policy> -v <vSwitch_name>Note: available policy options:
explicit = Use explicit failover order
portid = Route based upon port id (this is the default setting)
mac = Source based upon MAC hash
iphash = Source based up IP hash (this is only to be used in a etherchannel/Portchannel)
For example, to set the load balancing policy of a vSwitch named vSwitch0 to IP hash:
esxcli network vswitch standard policy failover set -l iphash -v vSwitch0
To get/set the load balancing policy on a Port Group on an ESXi Host
To list the current load balancing policy of a port group, run this command with (use your own specified port group name):
esxcli network vswitch standard portgroup policy failover get -p <portgroup_name>To set the load balancing policy of a port group, run this command (with your desired policy from the list above):
esxcli network vswitch standard portgroup policy failover set -p <portgroup_name> -l <policy>For example, to set the load balancing policy of a portgroup named "Management Network" to IP hash:
esxcli network vswitch standard portgroup policy failover set -p "Management Network" -l iphash