Labs / The Switchyard / VLANs, trunks & multicast

Lab 1 of 3 · VLANs, trunks & multicast

VLANs: many networks on one switch

Split one switch into separate networks and route between them on a stick.

Open this lab Pro 5 steps

The idea

alice and bob in sales, carol and a build server in engineering, all plug into one Switch, officeSwitch. VLANs split it into networks that cannot hear each other; officeRouter, a Router, joins them on purpose.

Four bytes: the VLAN tag
Four bytes: the VLAN tag
Up tagged 10, down tagged 20
Up tagged 10, down tagged 20

Steps

  1. A card for each VLAN

    Here the split lives on the devices' cards, so read alice's card, then the router's.

    alice:~# ip -d link show eth0.10
    alice:~# ip -br -4 addr show
    officeRouter:~# ip -br -4 addr show
  2. The tag inside the frame

    Alice pings bob, in her VLAN, starting with an ARP broadcast. Alice, and carol (VLAN 20) on her cable and on her VLAN card, record it, to find where the tag sits and who hears it.

    alice:~# ping -c1 -W2 10.0.10.11

Pro

3 more steps in the app

  1. Between VLANs: the router on a stick
  2. The router decides who crosses
  3. A PC in the wrong VLAN
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