Networking

How to Setup VLANs in Basic terms

How to Setup VLANs in Basic terms

VLANs or virtual local area networks allow for a wide range of capabilities when it comes to segmented and connecting different segments of network traffic.ย  However, there can be much confusion when it comes to how these are setup and how the flow of traffic between switches is accomplished.ย  Of course depending on the manufacturer of the switch and other factors, the syntax for setting up VLANs may be different from switch to switch, however, the general concept remains the same.

VLANs allow for networks to be setup that may span several switches or locations but function and act like you are sitting on the same segment with another user or device that is plugged into the same physical switch.ย  This is accomplished via VLAN tagging and special information being added at the packet level to make this all happen.

Administrators who have never setup VLANs sometimes get confused as to how they should setup the switch to pass traffic between switches.ย  There are a few things that must be accomplished when setting up VLANs.ย  They include:

  • Setting up a VLAN ID
  • Configuring both the access ports and trunk ports
  • Setting up an address scheme

VLAN ID

The VLAN ID is important because this same ID must be set on all switches that will be carrying this particular VLAN traffic.ย  So, for instance, if you setup a VLAN identifier of “50” this VLAN 50 must be created on all switches that you want to be able to communicate and carry traffic on this segment.

Access and Trunk Ports

Access ports and trunk ports provide the means for communication.ย  The Access ports are the ports that the devices are actually plugged into that you want to communicate on a particular VLAN.ย  The trunk port(s) is the port that actually carries the traffic between your switches.ย  Typcially, this would be your “uplink” port in the most basic configuration.ย  The uplink port that uplinks a particular switch to the rest of the network serves the same purpose in a flat network or a non-VLAN’ed network.ย  In a VLAN scenario, it simply has the added special role of carrying the “tagged” VLAN traffic.

Many are confused by the terms tagged and untagged and are not sure what ports need to be setup as what.ย  Typically, your access ports are setup as untagged ports and only know about the particular VLAN they are a member of.ย  So if you created an untagged port, it will not receive traffic from the rest of the network aside from the particular VLAN it resides on.ย  We mentioned above that the uplink port would generally be the “tagged” port which carries the VLAN traffic and allows it to “uplink” to the rest of the network.ย  The uplink port or tagged port is typically tagged with “all” of the VLANs that are configured on the switch.ย  So it essentially is a member of all the VLANs so it can communicate with all VLANs.ย  All traffic that comes across the uplink is examined and the “tagging” alerts the switch of which VLAN to send the traffic to.

Address Scheme

Setting up a VLAN does not negate the need to configure host addressing.ย  If you have a number of hosts on the same VLAN and they are all configured for different subnets, they will NOT be able to communicate due to simply having them on the same VLAN in itself.ย  Addressing still has to be setup appropriately to allow for communication.

Putting it all together

VLANs are not difficult to configure, however, they require forethought about the ID, ports, and address scheme.ย  In its most basic configuration, a switch or number of switches will have:

  • one or more ports setup as access ports (untagged generally)
  • one or more ports setup as trunk ports (usually is the uplink port that is “tagged” with the VLAN ID)
  • Address scheme between hosts that allows for communication

After setting up the above, you should have a basic functional VLAN scenario that will allow for a virtual grouping of hosts not matter how far or close they may be as if they were on the same flat network.

 

 

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.