VLAN and Trunking Concepts, Protocols, and Configuration

In This Lesson We Will:

  • Learn What VLANs are and why they are implemented
  • Learn about Trunking and why it is important
  • How configure VLANs and Trunking in your network

VLAN Definitions:

A VLAN is a Virtual LAN. This is a grouping of end devices within the same switch. A way to segment users by their department without using more hardware. In layman’s terms; You can put Accounting, Claims, and Security on one switch by subnetting their networks and placing them into separate VLANs. There are 4 types of VLAN that are focused on in the CCNA:

Default VLAN – This is VLAN1 on the switch that is already available upon startup. This is typically restricted to serve only L2 (data link layer) control traffic.

Data VLAN – Carries only user-generated traffic. This is used to keep voice and management traffic separate from data traffic.

Black Hole VLAN – The administrator would assign all unused ports on a switch to this VLAN. It acts as a dummy to prevent any unauthorized devices that may connect to unused ports from reaching the rest of the network.

Native VLAN– This is the common identifier on opposing ends of a trunk link.

VLAN Trunking:

Trunking – The process in which multiple VLANs are assigned on a single switch port between switches. Traffic is segmented on the line in a trunk. Below is an example of a trunk shown in a network topology:

A trunk will allow switches to switch and forward traffic from multiple VLANs with minimal ports. Think of how a tree “trunk” will distribute water to each branch and leaf individually; a switch will essentially stripe and distribute the specific VLANs traffic along its connection with the other switch so that only VLAN10 will get VLAN10 traffic from the other switch, and VLAN20 will only get VLAN20 traffic.

Configuring VLANs

You can create a VLAN in either global configuration (‘enable’ – ‘configure terminal’) or under a specific interface. Typically, you will create a VLAN in global config as this will allow you to create, name, and place the VLAN in fewer commands. Below is a screenshot of commands used to create, name, and assign VLANs in a Cisco Switch CLI:

Note – This will assume you have checked your available interfaces and know how to do so. I have touched on these in earlier lessons (linked here: )

How to implement trunking using DTP – Dynamic Trunking Protocol

DTP is Cisco’s proprietary protocol and it negotiates both the status of trunk ports and the trunk encapsulation of trunk ports. Below are descriptions of each trunking mode:

  1. Unconditional Trunking – Use CLI command “switchport mode trunk” This will send DTP messages to the remote port, advertising it is in an unconditional trunking state. Unconditional meaning it will always try to form a trunk.
  2. Dynamic Auto Trunking – Use the command “switchport mode trunk dynamic auto” This will advertise that it is ready to be trunked, but will not auto-negotiate a trunk. It will wait on the other end of the link to negotiate the trunk.
  3. Dynamic Desirable – Use the command “switchport mode dynamic desirable” This is a combination of the above two. If configured with this command, the switch will both advertise and request to negotiate a trunking state.
  4. No-Negotiate – Use the command “switchport nonegotiate” You would only this command when attempting to set up a trunk with a non-cisco switch. This operates as unconditional trunking.

Troubleshoot an active Trunk

Troubleshooting an active Trunk is relatively simple. Typically, if something is going to go wrong, it’s going to be one of four things. Below is a list of the most common issues and resolutions, in their respective orders in relation to troubleshooting trunking. All of these can be discerned by using the CLI command “show interface switchport” in global configuration mode:

  1. Identify all access interfaces and their VLANs. Reassign to correct VLANs as appropriate.
  2. Determine if the VLAN in fact exists and is active.
  3. Check allowed VLANs on both ends of the trunk.
  4. Make sure both switches are trunking.

Conclusion

This was a relatively simple breakdown of what a VLAN is, how they are implemented, and how to trunk them. I highly recommend you follow my lab to download packet tracer and play around with setting up your own VLANs and trunking them. I will post a specific lab on this topic at a later date as well.

As always, if you enjoy my content and labs, feel free to subscribe to my newsletter to be notified when I post new content.

Stay healthy, productive, and positive.

Leave a Reply