802.1Q Encapsulation Explained

Lesson Contents

To send traffic for multiple VLANs between switches, you need a trunk link and a trunking protocol. 802.1Q is the most common trunking protocol. A trunking protocol is required because a standard Ethernet frame has no field to identify to which VLAN the Ethernet frame belongs to. 802.1Q solves this by inserting a “tag” into the frame that specifies the VLAN ID. In this lesson you will learn what 802.1Q is and how it works.

Key Takeaways

  • 802.1Q is an industry-standard VLAN trunking protocol supported by most network vendors
  • It inserts a 4-byte tag into Ethernet frames containing a VLAN identifier (VID) and priority field
  • Trunk links allow multiple VLANs to traverse a single connection between switches
  • 802.1Q is a standard and preferred over Cisco’s proprietary ISL protocol for multi-vendor environments
  • The priority field enables Quality of Service (QoS) for time-sensitive traffic like VoIP

Explanation

Let’s look at a normal Ethernet frame:

Ethernet Frame 8023

Do you see any field where we can specify to which VLAN our Ethernet frame belongs? Well, there isn’t! So, how does a switch know to which VLAN an Ethernet frame belongs? It has no clue, so that’s why we need another protocol to add VLAN information.



If you want to VLAN traffic between switches, we have to use a trunk. A trunk connection is simply said nothing more than a normal link, but it is able to pass traffic from different VLANs and has a method to separate traffic between VLANs. Here’s an example:

 

802.1q trunk example

As you can see, we have computers on both sides, and they are in different VLANs, by using trunks, we can make sure all VLAN traffic can be sent between the switches. Because our regular Ethernet frames don’t have anything to show to which VLAN they belong, we will need another protocol.

There are two trunking protocols:

  • 802.1Q: This is the most common trunking protocol. It’s a standard and is supported by many vendors.
  • ISL: This is the Cisco trunking protocol. Not all switches support it.

Let’s take a look at 802.1Q:

Unlock This Lesson for Free - No Payment Required!

If you like to keep on reading, register now!

  • Learn CCNA, CCNP and CCIE R&S. Explained As Simple As Possible.
  • Get Instant Access to this Full Lesson, Completely for Free!
  • Unlock More to Read. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
2957 Sign Ups in the last 30 days

Tags: ,


Forum Replies

  1. so nice simply u r network genious… thanku sir…

  2. Hi René,

    I would like to thank you for the great content porvided. Good job !

    i am a little be confused about tagging, so my question is :

    Where the frame is tagged :

    1. At the entry of the switch port wich is assigned to a vlan with the " switchport acces " command
    2. Or when it lives the switch on the trunk port command

    thks in advance

  3. Hi Abdelwahid,

    The switch will tag the frame when it leaves the trunk. Internally, there’s no need to tag frames. In the MAC address table the switch will keep track of MAC addresses, interfaces but also the VLANs.

    Hope that helps!

    Rene

  4. Yes indeed, it helps a lot

    Many thanks René :slight_smile:

  5. Hi Rene,
    Can you please share your posts that explain Q-in-Q?

    Thanks,
    Srini

76 more replies! Ask a question or join the discussion by visiting our Community Forum