Determine use cases for and configure VLAN Trunking on vSphere 5

by admin

VLANs use the 802.1Q standard to tag traffic as associated with a particular VLAN. There are three main ways of using VLANs with vSphere:

  • Virtual guest tagging (VGT) – requires VLAN driver support in the guest OS
  • Virtual Switch tagging (VST) – common option, requires VLAN trunking on external switches
  • External switch tagging (EST) – less flexible and requires more physical NICs

The VLAN tag is a number ranging from 1 to 4094, though VLAN 4095 is also available. Use of VLAN 4095 is known as VGT (Virtual Guest Tagging) and basically extends the trunk to the virtual machine, where the tagging now occurs, rather than at the vSwitch. Use of VGT requires a supported guest OS. Not specifying a VLAN (vlan 0) means that the traffic will be tagged at the virtual switch (this would be considered an access port on the switch rather than a trunk).

Tagging allows you to send traffic belonging to multiple networks/subnets along the same cable/switch port. Before VLANs were available, to give your virtual machines access to different networks you would have had to have a separate physical cable (or 2) for each network you needed to place your VMs on. VLANs allow these networks/subnets to be trunked down a single physical connection. The tag is used to identify which subnet/segment the traffic belongs to. VLAN trunking has been common place in networks for quite a while, often used on connections between two Layer 2 network devices. The advantage of VLANs when it comes to virtualisation is that because you have a limited number of network cards available on your host’s hardware, it isn’t usually feasible to dedicate a physical network connection to just one network segment. By using VLANs to logically separate your hosts network traffic, you can provide access to many VLANs/network segments by using the same number of physical NICs.

VLAN tagging in vSphere is defined on the portgroups. A VLAN can contain multiple port groups, but a port group can only be associated with one VLAN at any given time. A prerequisite for VLAN functionality on a vSwitch is that the uplinks have to be connected to a trunk port on the physical switch. The trunk port will also need to be configured so that it carries the correct VLANS (if it is filtered).

Creating a new Portgroup on a dvSwitch

  1.  In vCenter browse to the network configuration page
  2. Right-click the appropriate switch, click New Port Group.
  3. On the Create Distributed Switch Port Group screen, enter the appropriate Name and Number of Ports. For VLAN type, select VLAN trunking. Enter the appropriate VLAN trunk range, click Next then click Finish.

 


Keep up to date with new posts on Buildvirtual.net - Follow us on Twitter:
Be Sociable, Share!

Leave a Comment

*

Previous post:

Next post: