Networking

Exclusive offer: get 50% off this eBook here
VMware ESXi Cookbook

VMware ESXi Cookbook — Save 50%

Over 50 recipes to master VMware vSphere administration with this book and ebook

$32.99    $16.50
by Aravind Sivaraman Mohammed Raffic Kajamoideen | March 2014 | Cookbooks Enterprise Articles

This article by Mohammed Raffic Kajamoideen and Aravind Sivaraman, authors of the book VMware ESXi Cookbook, helps you to understand the vSphere networking concepts—the distributed switch—then moves on to discuss some of the more advanced networking configurations available in the distributed switch.

(For more resources related to this topic, see here.)

Working with vSphere Distributed Switches

A vSphere Distributed Switch (vDS) is similar to a standard switch, but vDS spans across multiple hosts instead of creating an individual switch on each host. The vDS is created at the vCenter level, and the configuration is stored in the vCenter database. A cached copy of the vDS configuration is also stored on each host in case of a vCenter outage.

Getting ready

Log in to the vCenter Server using the vSphere Web Client.

How to do it…

In this section, you will learn how to create a vDS, dvportgroup, and manage the ESXi host using the vDS.

First, we will create a vSphere Distributed Switch. The steps involved in creating a vDS are as follows:

  1. Select the datacenter on which the vDS has to be created.
  2. Navigate to Actions | New Distributed Switch...., as shown in the following screenshot

  3. Enter the Name and location for the vDS and click on Next.
  4. Select the version for the vDS, as shown in the following screenshot, and click on Next:

  5. In the Edit settings page, provide the following details:
    • Number of uplinks: This specifies the number of physical NIC of the host which would be part of the vDS.
    • Network I/O Control: This option controls the input/output to the network and can be set to either Enabled or Disabled.
    • Default port group: This option lets you create a default port group. To create one, enable the checkbox and provide the Port group name.
    • Click on Next when finished.

  6. In the Ready to complete screen, review the settings and click on Finish.

The following steps will create a new distributed port group:

  1. The next step after creating a vDS is to create a new port group if it is not been created as part of the vDS. Select the vDS and click on Actions | New Distributed Port Group.
  2. Provide the name and select the location for the port group and click on Next.
  3. In the Configure settings screen, set the following general properties for the port group:
    • Port binding: This provides us with three options, namely, Static, Dynamic, and Ephemeral (no binding).
      • Static binding: This is selected when a VM is connected to the port group where a port is assigned and reserved for the VM. Only when the VM is deleted, the port is freed up.
      • Ephemeral binding: This port is created and assigned to the VM by the host when a VM is powered on and the port is deleted when the VM is powered off.
      • Dynamic binding: This is depreciated in ESXi 5.x version and is no longer in use, but the option is still available in the vSphere Client.
    • Port allocation: This can be set to either Elastic or Fixed.
      • Elastic: The default port is 8, and when all ports are used, a new set of ports is created automatically
      • Fixed: The ports are fixed to 8, and no additional ports are created when all ports are used up
    • Number of ports: This option is set to 8 by default.
    • Network resource pool: This option is enabled only if a user-defined network pool is created; it can be set even after creating the port group.
    • VLAN type: The available options are None, VLAN, VLAN trunking, and Private VLAN.
      • None: This means that no VLAN is used
      • VLAN: This implies that VLAN is used and the ID has to be specified
      • VLAN trunking: This implies that a group of VLANs is being trunked and their respective ID have to be used
      • Private VLAN: This menu is empty if a private VLAN does not exist

  4. In the Ready to complete screen, review the settings and click on Finish.

The next step after creating a distributed port group is to add the ESXi host to the vDS. While the host is being added, it is possible to migrate the VMkernel and VM port group from the vSS to vDS, or it can be done later. Now, let's see the steps involved:

  1. Select the Distributed Switch in the vSphere Web Client.
  2. Navigate to Actions | Add and Manage Hosts.
  3. In the Select task screen, select Add hosts, as shown in the following screenshot, and click on Next:

  4. Click on the + icon to select hosts to be added and click on OK.

  5. Click on Next in the Select new hosts screen.
  6. Select the physical network adapters, which will be used as an uplink for the vDS, and click on Next.
  7. In the Select virtual network adapters screen, you will have the option to migrate the VMkernel interface to the vDS group; select the appropriate option and click on Next.
  8. Review any dependencies on the validation page and click on Next.
  9. Optionally, you can migrate the VM Network to the vDS port group in the Select VM network adapters screen by selecting the appropriate option and clicking on Next.
  10. In the Ready to complete screen, review the settings and click on Finish.

An ESXi host can be removed from the vDS only if there is no VM still connected to the vDS. Make sure the VMs are either migrated to the standard switch or to another vDS. The following steps will remove an ESXi host from the Distributed Switch:

  1. Browse to the Distributed Switch in the vSphere Web Client.
  2. Navigate to Actions | Add and Manage Hosts.
  3. In the Select task screen, select Remove hosts, as shown in the following screenshot, and click on Next:

  4. Click on the + icon to select new hosts to be removed and click on OK.

  5. Click on Next in the Select hosts screen.
  6. In the Ready to complete screen, review the settings and click on Finish.

When the entire host is being added to the vDS, you can start to migrate the resources from vSS to vDS. The following steps will help you migrate from a Standard to a Distributed Switch:

  1. Select the Distributed Switch in the vSphere Web Client.
  2. Navigate to Actions | Migrate VM to Another Network.
  3. In the Select source and destination networks screen, you have the option to browse to a specific network or no network for source network migration. These options are described as follows:
    • Specific network: This option allows you to select the VMs residing on a particular port group
    • No network: This option implies that VMs that are not connected to any network will be selected for migration

  4. In the Destination network option, browse and select the distributed port group for the VM network and click on Next.

  5. Select the VM to migrate and click on Next.
  6. In the Ready to complete screen, review the settings and click on Finish.

How it works...

vSphere Distributed Switches extend the capabilities of virtual networking. vDS can be broken into the following two logical sections; one is the data plane and the other is management plane:

  • Data plane: This is also called the I/O plane and it takes cares of the actual packet switching, filtering, tagging, and all networking-related activities.
  • Management plane: This is also known as the control plane. It is a centralized control to manage and configure the data plane functionality.

There's more...

It is possible to preserve the vSphere Distributed Switch configuration information to a file. You can use these configurations for other deployments and also as a backup. You can restore the port group configuration in case of any misconfiguration.

The following steps will export the vSphere Distributed Switch configuration:

  1. Select the vSphere Distributed Switch from the vSphere Web Client.
  2. Navigate to Actions | All vCenter Actions | Export Configurations.
  3. In Configuration to export, you will have the following two options. Select the appropriate one.
    • Distributed Switch and all port groups
    • Distributed Switch only
  4. Click on OK.
  5. Exporting would begin, and once done, it would ask for saving the configuration. Click on Yes and provide the path to store the file.

The import configuration function can be used to create a copy of the exported vDS from the existing configuration file. The following steps will import the vSphere Distributed Switch configuration file:

  1. Select the Distributed Switch from the vSphere Web Client.
  2. Navigate to Actions | All vCenter Actions | Import distributed port group.
  3. In the Import Port Group Configuration option, browse to the backup file and click on Next.
  4. Review the import settings and click on Finish.

The following steps will restore the vSphere distributed port group configuration:

  1. Select the distributed port group from the vSphere Web Client.
  2. Navigate to Actions | All vCenter Actions | Restore Configuration.
  3. Select one of the following options and click on OK:
    • Restore to a previous configuration: This allows you to restore the configuration of the port group to your previous snapshot
    • Restore configuration from a file: This allows you to restore to the configuration from the file saved on your local system
  4. In the Ready to complete screen, review the settings and click on Finish.

Summary

In this article, we understood the vSphere networking concepts and how to work with vSphere distributed switches. We also discussed some of the more advanced networking configurations available in the distributed switch.

Resources for Article:


Further resources on this subject:


VMware ESXi Cookbook Over 50 recipes to master VMware vSphere administration with this book and ebook
Published: March 2014
eBook Price: $32.99
Book Price: $54.99
See more
Select your format and quantity:

About the Author :


Aravind Sivaraman

Aravind Sivaraman is a virtualization engineer with over eight years of experience in the IT industry and for the past five years he has been focused on virtualization solutions, especially on VMware products. He holds different certifications from VMware, Microsoft, and Cisco and has been awarded the vExpert for the year 2013. He is a VMware Technology Network (VMTN) and Experts Exchange contributor and maintains his personal blog at http://aravindsivaraman.com/. He can be followed on Twitter at @ss_aravind.

He is also the technical reviewer for the book Troubleshooting vSphere Storage, Mike Preston, Packt Publishing.

Mohammed Raffic Kajamoideen

Mohammed Raffic Kajamoideen (@VMwareArena) is a subject matter expert for VMware virtualization technology and works as a system administrator in VMware Inc. where he provides high-level technical guidance to support and implement VMware's virtualization products. He is an author, a technology enthusiast, and a blogger focusing on virtualization and cloud computing.

He has over six years of high-level knowledge in remote infrastructure services, consulting, designing, implementing, and troubleshooting VMware virtualization technology. He is well known for his contribution towards the virtualization community through his virtualization blog (http://www.vmwarearena.com).

He holds many specialized certifications from VMware, Microsoft, and Citrix®, which includes VCP4, VCP5, VCAP4-DCA, VCAP5-DCA, VCP-Cloud, MCTS-virtualization, CCA, and MCSA. Prior to joining VMware, he has served other large organizations such as CGI, Infosys, and Microsoft as a virtualization support engineer and a subject matter expert.

Books From Packt


vSphere High Performance Cookbook
vSphere High Performance Cookbook

VMware vSphere 5.x Datacenter Design Cookbook
VMware vSphere 5.x Datacenter Design Cookbook

VMware View Security Essentials
VMware View Security Essentials

Instant VMware View Virtualization How-to [Instant]
Instant VMware View Virtualization How-to [Instant]

 Instant VMware Player for Virtualization [Instant]
Instant VMware Player for Virtualization [Instant]

VMware vSphere 5.1 Cookbook
VMware vSphere 5.1 Cookbook

Implementing VMware Horizon View 5.2
Implementing VMware Horizon View 5.2

VMware ThinApp 4.7 Essentials
VMware ThinApp 4.7 Essentials


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software