NIC teaming for ESX can be configured for both network load balancing and failover. If you have more than one NICs in the ESX host machine, you can make use of this configuration for network optimization. This is a recommended configuration in production scenarios. In case of a failover configuration, the NICs are configured in active-passive mode. In case of load balancing (which is explained here), all the involved NICs are in active mode and the traffic from the host is distibuted among the teamed NICs.
This document explains how to create a vSwitch for teaming and the corresponding Network switch configuration.
Two or more NIC cards are required to use NIC teaming in ESX Server.
Step 1: Create a new vSwitch and give it a network label like "VM Network”.
Add the required NICs to the switch. Procedure on how to add a NIC to a virtual switch is described below:
Select the vSwitch from the Configuration -> networking . Select Network adapters and click on add.
In the Add Adapter Wizard select the NIC card which needs to be added to the switch and click on next. If the NIC card is already attached to another virtual switch, it will be removed from it and added to the new one.
Go to next screen.
In the failover order, we can configure the active and standby adapters if required. Click next and finish the configuration.
Step 2: Configure teaming Configuring teaming in ESX Server will implement load balancing for outbound traffic only. For implementing the same for inbound traffic the required configurations need to be done on the physical switch to which the NICs are actually connected.
Switch configuration steps:
Suppose two NICs vnic0 and vnic1 are added to a virtual switch vswitch0. vnic0 and vnic1 are physical adapters connected to switch ports gi0/23 and gi0/24
Create a port channel in the switch for the ports.
Commands used for the same in Cisco Catalyst IOS-based physical switches are given below:
s3(config)#int port-channel1s3(config-if)#description NIC team for ESX servers3(config-if)#int gi0/23s3(config-if)#channel-group 1 mode ons3(config-if)#int gi0/24s3(config-if)#channel-group 1 mode on
This will report the current load balancing algorithm in use by the switch. We can either use
IP based or
MAC based load balancing . IP based option gives better utilization across the members of the NIC team than some of the other options.
Set the switch load-balancing algorithm using one of the following commands in global configuration mode: