Tip

How to configure Virtual Switch Tagging for vSphere VLANs

In the first part of this series on 802.1Q VLAN tagging in vSphere VLANs, we learned about the different types of VLAN tagging and why Virtual Switch Tagging (VST) is the most commonly used

    Requires Free Membership to View

form of VLAN tagging. In this tip, learn how to configure your switch for Virtual Switch Tagging.

Virtual switch tagging allows greater flexibility when configuring virtual networking because a few physical NICs can support a large number of VLANs. Not only can it simplify your virtual networking, it can also help reduce costs by limiting the number of physical NICs that a host needs to connect to many VLANs. Using VST is a must in any environment where the physical network topology is configured into many VLANs.

VLAN tagging
Understand the basics of VLAN tagging for vSphere VLANs.

Steps to configuring Virtual Switch Tagging

Setting up your vSwitch to use VST mode is fairly simple. First, you need to configure the physical switch ports that the physical NICs of the vSwitch will be connected to. You will need to specify that the ports be configured as trunk ports and also configure the VLAN IDs that it will support. The configuration for this will vary based on the switch manufacturer. VMware provides a guide for 802.1Q VLAN solutions, with examples for Cisco switches. Once you have this configured, your pNICs in vSphere will start showing IP ranges for observed traffic in every VLAN for a specified configured port, as shown below.


You can now create or modify port groups to specify a VLAN ID for each VLAN on a specified configured pNIC. To do this, you edit the vSwitch and add a Virtual Machine network to it, which will create a new port group on the vSwitch. You can also use VLAN IDs with Service Console and VMkernel network. In the port group properties, you enter a network label for it (i.e., VLAN20) and a VLAN ID, as shown in the figure below.


The default VLAN ID is None (0), which uses EST mode and lets the physical switch handle the VLAN tagging. VLAN IDs using VST mode can be set from 1 to 4094. If you want to use VGT mode and do tagging inside the guest OS, you set the VLAN ID to 4095. You would repeat this process creating a port group for every VLAN ID that you have configured on the physical switch ports connected to the vSwitch. Once you are done, you can configure the vNICs of your VMs to be connected to the appropriate port group for the VLAN that you want the VM to be connected to, as shown below.


It's important to make sure your vSwitches are configured to use the same tagging mode that the physical switch ports are configured for. If your physical switch ports are configured as trunk ports (VST mode) and you do not set a VLAN ID on your vSwitch port groups (default EST mode), then your VMs will not be able to communicate on the network.

About the author: Eric Siebert is a 25-year IT veteran with experience in programming, networking, telecom and systems administration. He is a guru-status moderator on the VMware community VMTN forum and maintains VMware-land.com, a VI3 information site.


This was first published in June 2010

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.