Labs / The Switchyard / Switching, STP & link aggregation

Lab 3 of 4 · Switching, STP & link aggregation

Rapid Spanning Tree: the blocked port takes over in about a second

Cut a cable in a looped network; the spare port takes over in a second.

Open this lab Pro 5 steps

The idea

core, floor1 and floor2 are three switches cabled in a triangle, with alice, bob and a printer plugged in. Rapid Spanning Tree (RSTP) keeps a spare port ready, so a cut cable heals in about a second, and host ports forward at once.

Every cable end has a role
Every cable end has a role
The spare was already chosen
The spare was already chosen

Steps

  1. Port roles and states: the loop, solved

    The triangle is a loop, so one cable end must not pass traffic, as in classic spanning tree. core's priority is lowest, so core is the root. Ask floor2 for its RSTP view.

    floor2:~# ovs-appctl rstp/show br0
    core:~# ovs-appctl rstp/show br0
  2. Edge ports (PortFast): a host port forwards at once

    Behind bob's port there is only bob, no switch, so no loop can start there and waiting is wasted. We make it an ordinary port and bounce its cable; then we mark it edge and bounce it again.

    floor2:~# ovs-appctl rstp/show br0
    floor2:~# ovs-appctl rstp/show br0

Pro

3 more steps in the app

  1. Rapid convergence: a cable fails
  2. BPDU guard: a switch on an access port is shut down
  3. BPDU filter: a silent edge port
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