Specifying or changing the NIC teaming policy from the command line in ESX/ESXi 4.x and ESXi 5.x
search cancel

Specifying or changing the NIC teaming policy from the command line in ESX/ESXi 4.x and ESXi 5.x

book

Article ID: 302391

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article outlines how to specify the NIC teaming policy on a vSwitch or port group from the command line.

Environment

VMware ESXi 4.1.x Embedded
VMware ESXi 4.0.x Embedded
VMware vSphere ESXi 5.5
VMware ESXi 4.1.x Installable
VMware vSphere ESXi 5.0
VMware vSphere ESXi 5.1
VMware ESX 4.1.x
VMware ESXi 4.0.x Installable
VMware ESX 4.0.x

Resolution

To Set the NIC teaming policy on a Virtual Switch on an ESXi 5.x

  • To list the current NIC teaming policy of a vSwitch, use the command:

    # esxcli network vswitch standard policy failover get -v vSwitch0

  • To set the NIC teaming policy of a vSwitch, use this command:
# esxcli network vswitch standard policy failover set -l policy -v vSwitchX
For example, to set the NIC teaming policy of a vSwitch to IP hash:

# esxcli network vswitch standard policy failover set -l iphash -v vSwitch0
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)

To Set the NIC teaming policy on a Port Group

  1. To list the current NIC teaming policy of a port group, run this command:


    esxcli network vswitch standard portgroup policy failover get -p "Management Network"


  2. To set the NIC teaming policy of a port group, run this command:


    esxcli network vswitch standard portgroup policy failover set -p "Management Network" -l "Policy Options"

To monitor and manage NIC teaming policies in previous versions of ESXi/ESX

  1. To configure NIC teaming on a chosen port group in ESXi/ESX 4.1, use the command:

    vim-cmd hostsvc/net/portgroup_set --nicteaming-policypolicy_namevswitchportgroup_name

  2. To confirm your changes, run the command:
  • In ESXi/ESX4.1:

    • vim-cmd hostsvc/net/vswitch_setpolicy --nicteaming-policy policy vSwitch

  • In ESXi/ESX 4.0:
    • vimsh -n -e "hostsvc/net/vswitch_info vSwitch0" | grep policy


Additional Information

For more information on: