Spanning Tree Protocol: Loop Prevention
IEEE 802.1D Spanning Tree Protocol on a random switched LAN of ten Blender-modelled switches joined by RJ45 cables. The bridge with the lowest Bridge ID (priority and MAC) is elected root, every switch finds its cheapest root path cost with the standard per-speed port costs, and root, designated and blocking ports are assigned so that exactly one link per loop is blocked and the forwarding links form a spanning tree. Watch ports pass through blocking, listening and learning to forwarding on the real 802.1D timers, click a switch to make it the root, cut a link and see the backup take over, or switch STP off and watch one broadcast multiply around the loops into a storm. Independent numerical checks test the costs against Bellman-Ford and an exhaustive path search, the spanning-tree property over hundreds of random networks, flooding counts on a tree, a ring and the complete graph K4 against closed forms, the 802.1D timer constraints and the layout physics. Educational model; real networks also use RSTP, VLANs and edge-port protections.
Real switched networks are wired with redundant links for resilience — but two switches connected by more than one active path create a broadcast loop that can melt a LAN in seconds. This simulator builds a random 3D switch topology with deliberate redundant links, runs the real IEEE 802.1D Spanning Tree algorithm — root bridge election by Bridge ID, root path cost using standard per-speed port costs, and root/designated/blocking port assignment — and renders the result live: green and cyan links are forwarding, dimmed red links are blocked to break every loop, and animated pulses trace BPDUs flowing outward from the root along the resulting spanning tree. Pick any switch as the root bridge or add more redundant links and watch the whole tree recompute.
IEEE 802.1D Spanning Tree Protocol on a random switched LAN of ten Blender-modelled switches joined by RJ45 cables. The bridge with the lowest Bridge ID (priority and MAC) is elected root, every switch finds its cheapest root path cost with the standard per-speed port costs, and root, designated and blocking ports are assigned so that exactly one link per loop is blocked and the forwarding links form a spanning tree. Watch ports pass through blocking, listening and learning to forwarding on the real 802.1D timers, click a switch to make it the root, cut a link and see the backup take over, or switch STP off and watch one broadcast multiply around the loops into a storm. Independent numerical checks test the costs against Bellman-Ford and an exhaustive path search, the spanning-tree property over hundreds of random networks, flooding counts on a tree, a ring and the complete graph K4 against closed forms, the 802.1D timer constraints and the layout physics. Educational model; real networks also use RSTP, VLANs and edge-port protections.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install