802.1Q Encapsulation Explained

When you want VLAN traffic between two switches, then there is one problem we run into…take a look at the image below:

Ethernet Frame 8023

This is a normal Ethernet frame…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 what VLAN something belongs when it receives a frame? It has no clue so that’s why we need another protocol to help us.



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 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)
1650 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