Lion Cipher Lab

Build a Linux bridge, watch spanning tree block a loop, and stop a rogue bridge

Why it matters

Ethernet has no TTL. A frame that is sent round a loop between switches keeps going and a broadcast multiplies until the network is down. Spanning tree is the protocol that finds loops and blocks one link on purpose. It is also a trust problem: any device that can send spanning tree messages can take part in the election, and a bridge with a good enough priority becomes the root and pulls traffic through itself. Defenders turn spanning tree on where there are redundant links, then protect the edge so only switches they own can speak it. You will do both on your own machine in about an hour,…

What you'll learn

Steps in this lab

  1. Why a network with a loop needs spanning tree
  2. Check your kernel and create three namespaces
  3. Join sw1 and sw2 with two cables, a deliberate loop
  4. Wait for the election, then read which port is blocking
  5. Prove traffic crosses, then break the active cable
  6. Bring the cable back, then attach a rogue bridge
  7. Protect the port: guard on stops a bridge you did not expect
  8. What a professional does differently
  9. Clean up

Open the full interactive lab →

Keep learning