The idea
Three switches, coreSwitch, floorA and floorB, are cabled in a loop, with alice and bob plugged in. You will see one broadcast circle the loop, then spanning tree elect a root and block one port so frames cannot circle.
Steps
-
Three switches, a loop
The switches are cabled in a triangle: two ways round. List floorB's ports; then we turn spanning tree off, alice sends one broadcast, and bob counts what reaches him.
floorB:~# bridge link show alice:~# arping -c1 -w1 -I eth0 10.0.1.12 bob:~# timeout 3 tcpdump -nni eth0 -w /dev/null arp
-
Electing a root
Spanning tree first elects one switch, the root, so that every switch measures its way from the same place. coreSwitch's priority is 4096, floorA's 8192, floorB's the default 32768. Ask floorB which switch it believes is the root.
floorB:~# ip -d link show br0 coreSwitch:~# ip -d link show br0
Pro
4 more steps in the app
- One port blocked: the loop is gone
- Moving the root
- A cable fails: the blocked port takes over
- BPDUs: how the switches talk