In an iSCSI setup (software initiator or HBA), if your host has more than one pNIC, there are two types of configuration you can build. First one a two vSwitches type of configuration where you have a separate vSwitch for each network adapter and VMKernel iSCSI port pair in a 1:1 mapping as shown on the picture below,
The second type, my preferred one particularly in my home lab, an one vSwitch type of configuration where multiple network adapter and VMKernel iSCSI port pairs sharing the same vSwitch as shown on the picture below:
For that kind of config, when you have a single vSwitch with multiple VMKernel iSCSI ports, something many time overlooked by the admins is the binding. Indeed in such very specific case, single vSwitch configuration, the default binding is not optimized. Although it works, you won’t have the redundancy and multipathing you would expect! Indeed by default the VMKernel iSCSI ports you add are all bind to a single vmnic.
The iSCSI SAN Configuration Guide for vSphere 4.1 is clear about such configuration. You must override the default setup and make sure that each port maps to only one active NIC. But that’s only half of what needs to be done to configure properly your VMKernel iSCSI ports!
So after you map VMKernel iSCSI ports to network adapters, the second step consists of using the esxcli command to bind the VMKernel iSCSI ports (vmk) to the iSCSI adapters (vmhba). The following example shows how to connect the VMKernel iSCSI ports vmk1 and vmk2 to the software iSCSI adapter vmhba33.
- Connect vmk1 to vmhba33: esxcli swiscsi nic add -n vmk1 -d vmhba33
- Connect vmk2 to vmhba33: esxcli swiscsi nic add -n vmk2 -d vmhba33
- Verify vmhba33 configuration: esxcli swiscsi nic list -d vmhba33 -> Both vmk1 and vmk2 should be listed.
If you display the Paths view for the vmhba33 adapter through the vSphere Client, you see that the adapter uses two paths to access the same target. The runtime names of the paths are vmhba33:C1:T1:L0 and vmhba33:C2:T1:L0. C1 and C2 in this example indicate the two network adapters that are used for multipathing.