802.1Q Trunking

A trunk link is a connection that carries traffic from multiple VLANs between switches. In this lesson, you’ll learn how 802.1Q tagging makes this possible.

  • A trunk link is a Layer 2 connection that carries traffic from multiple VLANs between switches.
    Without trunking, each VLAN would be confined to the switch in which it was created.

    Why Trunking Is Needed

    To understand why trunking is important, let’s look at a simple example.

    Below, two VLANs are created on two switches.
    PC1 and PC3 belong to VLAN 10, but they are connected to different switches.

    Network topology demonstrating 802.1Q trunking between two switches, SW1 and SW2, connecting VLAN 10 and VLAN 20 devices.

    Figure 1 – VLANs on Different Switches

    Even though both devices belong to VLAN 10, they still cannot communicate because they are located on separate switches.

    To allow communication between these two devices, we need two things:

    1. A physical link connects the switches.

    2. 802.1Q trunking is enabled on that link.

    Network diagram showing two switches (SW1 and SW2) connected by a central trunk link, extending VLAN 10 (PC1, PC3) and VLAN 20 (PC2, PC4) across the network.

    Figure 2 – Trunk Link Between Switches

    Enabling trunking allows VLAN 10 and VLAN 20 traffic to pass through the inter-switch link.
    This means that each VLAN can now extend beyond a single switch. For example, VLAN 10 on SW1 can reach VLAN 10 on SW2.

    Let’s walk through an example to see this in action.

    PC1 send traffic to PC3.
    SW1 receives the frame on interface F0/1, which is an access port in VLAN 10.
    Since PC3 is connected to another switch, SW1 forwards the frame to SW2 over the trunk link.

    Network diagram illustrating VLAN 10 traffic (ETH frames with '10' tag) traversing a trunk link between two switches (SW1 and SW2), extending VLAN 10 and VLAN 20 connectivity for connected PCs.

    Figure 3 – VLAN Tagging with 802.1Q Trunking

    SW2 receives the frame, identifies it as part of VLAN 10, and forwards it to PC3.
    From the user’s perspective, both PCs appear to be on the same local network, even though they are on different switches.

    The purpose of trunking is to extend VLANs across multiple switches while keeping the traffic of each VLAN logically separate.

    Now that we understand what trunking involves, the next step is to examine how VLAN information is added to, transported through and removed from frames as they cross the trunk.

    Answer the question below

    What type of link carries multiple VLANs between SW1 and SW2?