Back to Basics: Using the vSphere 5.1 Web Client to configure a vSwitch

In the previous articles we created a Datacenter, a cluster and added hosts to it. Now that we have done that we can start finalizing the configuration. This is just one example out of the many ways to configure networking for an ESXi host, and I kept it really really simple. This is not following any best practices, I just wanted to show some of the steps. In this scenario I have 4 network cards per host and I have VLANs for each network segment. Separating traffic through the use of VLAN is highly recommended and is a best practice.

Lets configure the virtual switch first. I will use a “standard vSwitch” for now. In this case we will set all vmnics to active on the vSwitch and control NIC usage on a portgroup level.This is how you do that:

  • Go to vCenter —> Hosts and Clusters
  • Click a host in the left pane
  • Click on the “Manage” tab
  • Click on “Networking”
  • Select vSwitch0 and click the “pencil” to edit it.
  • Click “Teaming and failover”, select all vmnics and move them up to “active” by clicking the “upward arrow”
  • Click “OK”

Next we will configure the individual portgroups correctly and start adding additional required portgroups. As this is no production environment and we have a limited amount of NICs we will separate traffic during normal operation but when a NIC fails some flows will need to be combined. Although it is not optimal, it is the best we can do for now. We will create the following setup:

  1. Management Network – vmnic0 active | vmnic2 standby
  2. vMotion Network – vmnic1 active | vmnic 3 standby
  3. Storage Network – vmnic2 active | vmnic0 standby
  4. VM Network – vmnic3 active | vmnic1 standby

This is how we configure it:

  • Click on the “VM Network” portgroup
  • Click the “pencil” to edit it
  • Set the correct “VLAN ID” for VM Network traffic on “Properties”
  • Click “Teaming and failover”
  • Tick “Override” on “Load Balancing” and select “Use explicit failover order”
  • Tick “Override” under “Failover order”
  • Move “vmnic0” and “vmnic2” to “Unused”
  • Move “vmnic1” to “Standby”
  • Only “vmnic3” should now be under “Active”
  • Your configuration should now look as follows
  • Click “OK”

Now we can do the same for the “Management Network”:

  • Click on the “Management Network” portgroup
  • Click the “pencil” to edit it
  • Click “Teaming and failover”
  • Untick “Network failure detection”, “Notify switches” and “Failback” as we want to inherit those settings from the vSwitch configuration
  • Tick “Override” on “Load Balancing” and select “Use explicit failover order”
  • Tick “Override” under “Failover order”
  • Move “vmnic1” and “vmnic3” to “Unused”
  • Move “vmnic2” to “Standby”
  • Only “vmnic0” should now be under “Active”

Next we will create a portgroup for vMotion traffic:

  • Click the network icon with the green plus called “host networking”
  • Select the “VMkernel Network Adapter” under “Select connection type”
  • Select your vSwitch, in my scenario “vSwitch0” under “Select target device”
  • Under “Port properties” change the “Network label” to “vMotion Network” and tick the “vMotion traffic” tickbox under “Available Services”
  • Fill out the required IP details
  • Finish

Now we will need to configure the failover order of the “vMotion Network”:

  • Click on the “vMotion Network” portgroup
  • Click the “pencil” to edit it
  • Click “Teaming and failover”
  • Tick “Override” on “Load Balancing” and select “Use explicit failover order”
  • Tick “Override” under “Failover order”
  • Move “vmnic0” and “vmnic2” to “Unused”
  • Move “vmnic1” to “Standby”
  • Only “vmnic2” should now be under “Active”

Finally we will create a portgroup for our network connected storage device. In our case this is iSCSI and NFS based storage. Note that we only use a single active NIC for this. This is not optimal and there are various ways to configure this. We would like to refer to the documentation for more details on advanced configurations. (I might come back to this later if I can find the time…)

  • Click the network icon with the green plus called “host networking”
  • Select the “VMkernel Network Adapter” under “Select connection type”
  • Select your vSwitch, in my scenario “vSwitch0” under “Select target device”
  • Under “Port properties” change the “Network label” to “Storage Network” and make sure that none of the “Available Services” are selected.
  • Fill out the IP details
  • Finish

Now we will need to configure the failover order of the “iSCSI Network”:

  • Click on the “Storage Network” portgroup
  • Click the “pencil” to edit it
  • Click “Teaming and failover”
  • Tick “Override” on “Load Balancing” and select “Use explicit failover order”
  • Tick “Override” under “Failover order”
  • Move “vmnic1” and “vmnic3” to “Unused”
  • Move “vmnic2” to “Standby”
  • Only “vmnic0” should now be under “Active”

That is it from a networking perspective. Again, this is not an optimal scenario but it will work… The end result should look similar to this:

Be Sociable, Share!

    Comments

    1. Wez Nagwama says

      Hi Duncan

      Unfortunately, Right-Click host > All vCenter Actions > Add Networking – is grayed out.

      Also, if I click the host > manage > networking > Virtual Switches, the pencil etc. as outlined above is grayed out also!!!.

      I checked permissions, tried different AD user, local root, all users have full administrative rights over the host and vCenter, I can do everything else except configure networking.

      Any thoughts? Thanks.

      • says

        This should work by default and I have never experienced this…. not sure what is happening or why. I suggest contacting support, I bet they will figure it out fairly quickly.

        • Wez Nagwama says

          Hi Duncan,

          I forgot I posted the above question, for reference, I don’t remember what I did, but it all works. haha.

          Hope that helps someone from Google? :).

    2. Mike says

      what are the implications of active active in the teaming order for physical switch? taking it back to basics i suppose, physical switch tags vlan as access port. normally i do active passive and dont think about it but was thinking of active active to get more use of second nic. should I be enabling something on physical switch

    3. Vlad says

      I have one question regarding your test setup:
      Is it better to combine MNG/vMot/VMnet/Stor under one vSwitch in comparison to having 1 vswitch for MNG and vMot, 1 for Stor and 1 for VM?

    Leave a Reply