Labs / The Switchyard / VLANs, trunks & multicast

Lab 2 of 3 · VLANs, trunks & multicast

VLANs across switches: trunks

Carry several VLANs between two switches on one trunk, voice VLAN included.

Open this lab Pro 6 steps

The idea

alice and a build server on coreSwitch, bob, carol, a desk phone and a printer on floorSwitch: two switches joined by one cable, a trunk. It carries many VLANs, each frame with its tag; one VLAN, the native, goes untagged.

The tag lives only on the trunk
The tag lives only on the trunk
Two tags, one stripped
Two tags, one stripped

Steps

  1. Access ports: the switch does the tagging

    bob is in sales, VLAN 10, on floorSwitch. List floorSwitch's ports (named after their devices) and their VLANs, then bob's card, to find out who does the tagging.

    floorSwitch:~# bridge vlan show
    bob:~# ip -br -4 addr show eth0
    bob:~# ping -c1 -W2 10.0.10.2
  2. One trunk, many VLANs

    alice, also in sales, is on coreSwitch, so sales spans two switches and one cable. Read that cable's VLANs, then ping bob from alice while it is recorded.

    floorSwitch:~# bridge vlan show dev coreSwitch
    alice:~# ping -c1 -W2 10.0.10.11

Pro

4 more steps in the app

  1. VLAN 1 and the native VLAN
  2. A voice VLAN on a desk port
  3. Allowed VLANs on the trunk
  4. Routing between VLANs on the switch
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab