{"id":3432,"date":"2026-10-27T13:03:07","date_gmt":"2026-10-27T20:03:07","guid":{"rendered":"https:\/\/cyber.mag212.com\/learn\/stp-cheat-sheet\/"},"modified":"2026-10-27T13:03:07","modified_gmt":"2026-10-27T20:03:07","slug":"stp-cheat-sheet","status":"publish","type":"page","link":"https:\/\/cyber.mag212.com\/fr\/learn\/stp-cheat-sheet\/","title":{"rendered":"Aide-m\u00e9moire sur l&#039;arbre couvrant"},"content":{"rendered":"<style>.m212st{background:#07111C;color:#ECF7FB;font-family:Inter,Arial,sans-serif;line-height:1.65;border:1px solid #1f3b4d;border-radius:14px;overflow:hidden;font-size:16px}\n.m212st *{box-sizing:border-box}\n.m212st .st-hero{padding:40px 6%;background:linear-gradient(120deg,#102c40,#07111c);border-bottom:3px solid #46DB82}\n.m212st .brand{color:#46DB82;letter-spacing:4px;font-size:16px;font-weight:800}\n.m212st .st-title{font-size:clamp(32px,6vw,60px);line-height:1.07;margin:16px 0;color:#fff;border:0;padding:0}\n.m212st .tagline{color:#3CC8E8;font-size:20px}\n.m212st .st-main{padding:10px 24px 20px}\n.m212st .st-sec{padding:18px 0 28px}\n.m212st h2{font-size:28px;color:#46DB82;border-bottom:1px solid #315066;padding-bottom:12px;margin:10px 0 14px}\n.m212st p{font-size:17px;color:#D1E4EE;margin:0 0 12px}\n.m212st figure{margin:22px 0;padding:0;background:#0E2435;border:1px solid #315466;border-radius:16px;overflow:hidden}.m212st figure svg{width:100%;height:auto;display:block}\n.m212st pre{overflow-x:auto;background:#101f2c;padding:20px;border:0;border-left:4px solid #3CC8E8;color:#B9F3CD;white-space:pre-wrap;line-height:1.5;font:14px\/1.5 ui-monospace,Consolas,monospace;margin:10px 0 16px;border-radius:4px}\n.m212st pre code{color:#B9F3CD}\n.m212st code{color:#9cebd3;font-family:ui-monospace,Consolas,monospace}\n.m212st table{border-collapse:collapse;width:100%;margin:18px 0;font-size:15px}\n.m212st th{text-align:left;background:#184459;color:#fff}\n.m212st td,.m212st th{padding:11px;border:1px solid #365568;color:#ECF7FB;vertical-align:top}\n.m212st tr:nth-child(even) td{background:#102638}\n.m212st .note{border-left:4px solid #F2A65C;background:#23262B;padding:16px 18px;border-radius:4px;color:#FBE6C2;margin:14px 0}\n.m212st .qa{background:#102638;padding:15px 20px;margin:10px 0;border-radius:10px}.m212st .qa b{color:#46DB82}.m212st .qa p{margin:4px 0 0}\n.m212st a{color:#3CC8E8}\n.m212st .st-dl{display:inline-block;margin-top:6px;background:#46db82;color:#04130c;font-weight:800;text-decoration:none;border-radius:8px;padding:11px 18px}\n.m212st .st-foot{padding:22px;text-align:center;border-top:2px solid #46DB82;color:#AFCAD5;font-size:14px}\n@media(max-width:620px){.m212st .st-hero{padding:26px 18px}.m212st .st-main{padding:6px 12px 14px}.m212st table{font-size:13px}.m212st td,.m212st th{padding:7px}}<\/style>\n<div class=\"m212st\" id=\"m212-stp\"><div class=\"st-hero\"><div class=\"brand\">MAG212 CYBER<\/div><h2 class=\"st-title\">Arbre couvrant<br>Ultimate Cheat Sheet<\/h2><div class=\"tagline\">Cisco Switching \u2022 Rapid PVST+ \u2022 MST \u2022 Root Bridge \u2022 Troubleshooting &#038; Security<\/div><p>Network Engineering Field Guide \u00b7 October 2026<\/p><a class=\"st-dl\" href=\"https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/10\/MAG212_CYBER_STP_Ultimate_Cheat_Sheet.pdf\" target=\"_blank\" rel=\"noopener\">\u2b07 T\u00e9l\u00e9charger l&#039;\u00e9dition PDF<\/a><\/div><div class=\"st-main\">\n<div class=\"st-sec\"><h2>01  STP essentials<\/h2>\n<p>Spanning Tree Protocol (STP) prevents Layer 2 switching loops by selecting a loop-free forwarding topology. Redundant Ethernet links remain physically present, but some logical paths discard traffic. A topology change can activate an alternate path.<\/p>\n<table><thead><tr><th>Mode<\/th><th>Instances<\/th><th>Purpose<\/th><\/tr><\/thead><tbody>\n<tr><td>802.1D STP<\/td><td>One<\/td><td>Legacy, slower convergence<\/td><\/tr>\n<tr><td>PVST+<\/td><td>Per VLAN<\/td><td>Cisco implementation<\/td><\/tr>\n<tr><td>Rapid PVST+<\/td><td>Per VLAN<\/td><td>Rapid convergence per VLAN<\/td><\/tr>\n<tr><td>RSTP (802.1w)<\/td><td>One<\/td><td>Standards-based rapid tree<\/td><\/tr>\n<tr><td>MST (802.1s \/ 802.1Q)<\/td><td>Mapped VLAN groups<\/td><td>Scales instances across VLANs<\/td><\/tr>\n<\/tbody><\/table>\n<div class=\"note\">Configuration examples use Cisco Catalyst IOS XE syntax. Commands, defaults and supported modes vary by platform and release; verify before applying changes.<\/div>\n<\/div>\n<div class=\"st-sec\"><h2>02  Root bridge, port roles and failover<\/h2>\n<p>The root bridge is the switch with the lowest bridge ID (priority plus extended system ID plus MAC address). Each non-root switch chooses one root port with the lowest total path cost. Every segment has a designated port; redundant paths can become alternate\/discarding ports.<\/p>\n<figure><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 1800 1000\" role=\"img\" aria-labelledby=\"st1T st1D\"><title id=\"st1T\">Rapid PVST+ VLAN 10 port roles<\/title><desc id=\"st1D\">SW1 is the root bridge for VLAN 10. SW2 and SW3 each use their direct link to SW1 as root port. On the SW2 to SW3 link, SW2 Gi1\/0\/2 is the designated forwarding port and SW3 Gi1\/0\/2 is the alternate discarding port.<\/desc><defs><lineargradient id=\"st1bg\" x2=\"1\" y2=\"1\"><stop stop-color=\"#05121e\"\/><stop offset=\"1\" stop-color=\"#0f2a3d\"\/><\/lineargradient><\/defs><rect width=\"1800\" height=\"1000\" fill=\"url(#st1bg)\"\/><g stroke=\"#1f3d52\" opacity=\".45\"><path d=\"M0 0V1000\"\/><path d=\"M50 0V1000\"\/><path d=\"M100 0V1000\"\/><path d=\"M150 0V1000\"\/><path d=\"M200 0V1000\"\/><path d=\"M250 0V1000\"\/><path d=\"M300 0V1000\"\/><path d=\"M350 0V1000\"\/><path d=\"M400 0V1000\"\/><path d=\"M450 0V1000\"\/><path d=\"M500 0V1000\"\/><path d=\"M550 0V1000\"\/><path d=\"M600 0V1000\"\/><path d=\"M650 0V1000\"\/><path d=\"M700 0V1000\"\/><path d=\"M750 0V1000\"\/><path d=\"M800 0V1000\"\/><path d=\"M850 0V1000\"\/><path d=\"M900 0V1000\"\/><path d=\"M950 0V1000\"\/><path d=\"M1000 0V1000\"\/><path d=\"M1050 0V1000\"\/><path d=\"M1100 0V1000\"\/><path d=\"M1150 0V1000\"\/><path d=\"M1200 0V1000\"\/><path d=\"M1250 0V1000\"\/><path d=\"M1300 0V1000\"\/><path d=\"M1350 0V1000\"\/><path d=\"M1400 0V1000\"\/><path d=\"M1450 0V1000\"\/><path d=\"M1500 0V1000\"\/><path d=\"M1550 0V1000\"\/><path d=\"M1600 0V1000\"\/><path d=\"M1650 0V1000\"\/><path d=\"M1700 0V1000\"\/><path d=\"M1750 0V1000\"\/><path d=\"M1800 0V1000\"\/><path d=\"M0 0H1800\"\/><path d=\"M0 50H1800\"\/><path d=\"M0 100H1800\"\/><path d=\"M0 150H1800\"\/><path d=\"M0 200H1800\"\/><path d=\"M0 250H1800\"\/><path d=\"M0 300H1800\"\/><path d=\"M0 350H1800\"\/><path d=\"M0 400H1800\"\/><path d=\"M0 450H1800\"\/><path d=\"M0 500H1800\"\/><path d=\"M0 550H1800\"\/><path d=\"M0 600H1800\"\/><path d=\"M0 650H1800\"\/><path d=\"M0 700H1800\"\/><path d=\"M0 750H1800\"\/><path d=\"M0 800H1800\"\/><path d=\"M0 850H1800\"\/><path d=\"M0 900H1800\"\/><path d=\"M0 950H1800\"\/><path d=\"M0 1000H1800\"\/><\/g><text x=\"60\" y=\"70\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"42\" font-weight=\"900\" fill=\"#46db82\">MAG212 CYBER<\/text><text x=\"460\" y=\"70\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"34\" font-weight=\"800\" fill=\"#e3f4fc\">\u00b7 RAPID PVST+ \u00b7 VLAN 10<\/text><text x=\"62\" y=\"106\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"20\" fill=\"#9cc3d9\">Three-switch triangle \u00b7 1 Gb\/s trunks (port cost 4) \u00b7 one alternate port prevents the Layer 2 loop<\/text><path d=\"M550 360L1250 360\" stroke=\"#46db82\" stroke-width=\"10\" stroke-linecap=\"round\"\/><path d=\"M480 395L840 685\" stroke=\"#46db82\" stroke-width=\"10\" stroke-linecap=\"round\"\/><path d=\"M1320 395L1140.0 540.0\" stroke=\"#46db82\" stroke-width=\"10\" stroke-linecap=\"round\"\/><path d=\"M1140.0 540.0L960 685\" stroke=\"#f25c5c\" stroke-width=\"10\" stroke-dasharray=\"18 12\"\/><circle cx=\"1014.5127736358298\" cy=\"641.0869323489148\" r=\"22\" fill=\"#2a0f14\" stroke=\"#f25c5c\" stroke-width=\"3\"\/><path d=\"M1004.9127736358298 631.4869323489148L1024.1127736358299 650.6869323489149M1024.1127736358299 631.4869323489148L1004.9127736358298 650.6869323489149\" stroke=\"#f25c5c\" stroke-width=\"5\" stroke-linecap=\"round\"\/><rect x=\"350.0\" y=\"325.0\" width=\"200.0\" height=\"70.0\" rx=\"10.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"350.0\" y=\"325.0\" width=\"200.0\" height=\"29.4\" rx=\"10.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"3.0\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M378.0 339.7h24.0\" \/><path d=\"M402.0 339.7l-6.0 -5.0M402.0 339.7l-6.0 5.0\"\/><path d=\"M418.0 339.7h24.0\" \/><path d=\"M418.0 339.7l6.0 -5.0M418.0 339.7l6.0 5.0\"\/><path d=\"M458.0 339.7h24.0\" \/><path d=\"M482.0 339.7l-6.0 -5.0M482.0 339.7l-6.0 5.0\"\/><path d=\"M498.0 339.7h24.0\" \/><path d=\"M498.0 339.7l6.0 -5.0M498.0 339.7l6.0 5.0\"\/><\/g><rect x=\"368.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"396.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"424.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"452.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"480.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"508.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1250.0\" y=\"325.0\" width=\"200.0\" height=\"70.0\" rx=\"10.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"1250.0\" y=\"325.0\" width=\"200.0\" height=\"29.4\" rx=\"10.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"3.0\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M1278.0 339.7h24.0\" \/><path d=\"M1302.0 339.7l-6.0 -5.0M1302.0 339.7l-6.0 5.0\"\/><path d=\"M1318.0 339.7h24.0\" \/><path d=\"M1318.0 339.7l6.0 -5.0M1318.0 339.7l6.0 5.0\"\/><path d=\"M1358.0 339.7h24.0\" \/><path d=\"M1382.0 339.7l-6.0 -5.0M1382.0 339.7l-6.0 5.0\"\/><path d=\"M1398.0 339.7h24.0\" \/><path d=\"M1398.0 339.7l6.0 -5.0M1398.0 339.7l6.0 5.0\"\/><\/g><rect x=\"1268.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1296.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1324.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1352.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1380.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1408.0\" y=\"368.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"800.0\" y=\"685.0\" width=\"200.0\" height=\"70.0\" rx=\"10.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"800.0\" y=\"685.0\" width=\"200.0\" height=\"29.4\" rx=\"10.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"3.0\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M828.0 699.7h24.0\" \/><path d=\"M852.0 699.7l-6.0 -5.0M852.0 699.7l-6.0 5.0\"\/><path d=\"M868.0 699.7h24.0\" \/><path d=\"M868.0 699.7l6.0 -5.0M868.0 699.7l6.0 5.0\"\/><path d=\"M908.0 699.7h24.0\" \/><path d=\"M932.0 699.7l-6.0 -5.0M932.0 699.7l-6.0 5.0\"\/><path d=\"M948.0 699.7h24.0\" \/><path d=\"M948.0 699.7l6.0 -5.0M948.0 699.7l6.0 5.0\"\/><\/g><rect x=\"818.0\" y=\"728.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"846.0\" y=\"728.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"874.0\" y=\"728.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"902.0\" y=\"728.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"930.0\" y=\"728.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"958.0\" y=\"728.4\" width=\"16.0\" height=\"9.0\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"575\" y=\"307\" width=\"144.39999999999998\" height=\"33\" rx=\"8\" fill=\"#0a1f2f\" stroke=\"#2f7d58\"\/><text x=\"647.2\" y=\"331\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"17\" font-weight=\"700\" fill=\"#bff5d6\" text-anchor=\"middle\">Gi1\/0\/1 \u00b7 DP<\/text><rect x=\"1080.6\" y=\"307\" width=\"144.39999999999998\" height=\"33\" rx=\"8\" fill=\"#0a1f2f\" stroke=\"#3d6a84\"\/><text x=\"1152.8\" y=\"331\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"17\" font-weight=\"700\" fill=\"#bfe9ff\" text-anchor=\"middle\">Gi1\/0\/1 \u00b7 RP<\/text><rect x=\"360.6\" y=\"452\" width=\"144.39999999999998\" height=\"33\" rx=\"8\" fill=\"#0a1f2f\" stroke=\"#2f7d58\"\/><text x=\"432.8\" y=\"476\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"17\" font-weight=\"700\" fill=\"#bff5d6\" text-anchor=\"middle\">Gi1\/0\/2 \u00b7 DP<\/text><rect x=\"645.6\" y=\"617\" width=\"144.39999999999998\" height=\"33\" rx=\"8\" fill=\"#0a1f2f\" stroke=\"#3d6a84\"\/><text x=\"717.8\" y=\"641\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"17\" font-weight=\"700\" fill=\"#bfe9ff\" text-anchor=\"middle\">Gi1\/0\/1 \u00b7 RP<\/text><rect x=\"1295\" y=\"452\" width=\"144.39999999999998\" height=\"33\" rx=\"8\" fill=\"#0a1f2f\" stroke=\"#2f7d58\"\/><text x=\"1367.2\" y=\"476\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"17\" font-weight=\"700\" fill=\"#bff5d6\" text-anchor=\"middle\">Gi1\/0\/2 \u00b7 DP<\/text><rect x=\"1040\" y=\"689\" width=\"287.2\" height=\"33\" rx=\"8\" fill=\"#0a1f2f\" stroke=\"#8a3a44\"\/><text x=\"1183.6\" y=\"713\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"17\" font-weight=\"700\" fill=\"#ffc2c8\" text-anchor=\"middle\">Gi1\/0\/2 \u00b7 ALT (discarding)<\/text><text x=\"450\" y=\"250\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"30\" font-weight=\"800\" fill=\"#fff\" text-anchor=\"middle\">SW1 \u00b7 ROOT BRIDGE<\/text><text x=\"450\" y=\"278\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"18\" font-weight=\"700\" fill=\"#46db82\" text-anchor=\"middle\">Priority 4096 + VLAN 10 = 4106<\/text><text x=\"1350\" y=\"250\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"30\" font-weight=\"800\" fill=\"#fff\" text-anchor=\"middle\">SW2 \u00b7 non-root<\/text><text x=\"1350\" y=\"278\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"18\" font-weight=\"700\" fill=\"#3cc8e8\" text-anchor=\"middle\">Priority 8192 + VLAN 10 = 8202<\/text><text x=\"900\" y=\"800\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"30\" font-weight=\"800\" fill=\"#fff\" text-anchor=\"middle\">SW3 \u00b7 non-root<\/text><text x=\"900\" y=\"828\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"18\" font-weight=\"700\" fill=\"#ffb0b8\" text-anchor=\"middle\">Priority 32768 (default) + VLAN 10 = 32778<\/text><rect x=\"60\" y=\"890\" width=\"1680\" height=\"70\" rx=\"12\" fill=\"#0a1f2f\" stroke=\"#3d6a84\"\/><path d=\"M100 925h70\" stroke=\"#46db82\" stroke-width=\"9\" stroke-linecap=\"round\"\/><text x=\"185\" y=\"932\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"19\" font-weight=\"600\" fill=\"#d7e8f3\">Forwarding<\/text><path d=\"M360 925h70\" stroke=\"#f25c5c\" stroke-width=\"9\" stroke-dasharray=\"18 12\"\/><text x=\"445\" y=\"932\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"19\" font-weight=\"600\" fill=\"#d7e8f3\">Discarding (alternate port side)<\/text><text x=\"840\" y=\"932\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"19\" fill=\"#d7e8f3\"><tspan font-weight=\"700\" fill=\"#46db82\">DP<\/tspan> designated port \u00b7 <tspan font-weight=\"700\" fill=\"#3cc8e8\">RP<\/tspan> root port \u00b7 <tspan font-weight=\"700\" fill=\"#ff8a95\">ALT<\/tspan> alternate port<\/text><\/svg><\/figure>\n<div class=\"note\">Diagram assumes equal 1-Gb\/s trunk costs. SW1 is root for VLAN 10; SW2 and SW3 reach it directly through their root ports. On the SW2\u2013SW3 segment both switches advertise the same root path cost (4), so the lower sender bridge ID wins: SW2 Gi1\/0\/2 becomes the designated (forwarding) port and SW3 Gi1\/0\/2 becomes the alternate (discarding) port. Only SW3\u2019s end of that link blocks.<\/div>\n<table><thead><tr><th>Link speed<\/th><th>Short path cost (Cisco default)<\/th><th>Long path cost (802.1t)<\/th><\/tr><\/thead><tbody>\n<tr><td>10 Mb\/s<\/td><td>100<\/td><td>2,000,000<\/td><\/tr><tr><td>100 Mb\/s<\/td><td>19<\/td><td>200,000<\/td><\/tr><tr><td>1 Gb\/s<\/td><td>4<\/td><td>20,000<\/td><\/tr><tr><td>10 Gb\/s<\/td><td>2<\/td><td>2,000<\/td><\/tr><\/tbody><\/table>\n<p>Use the same path-cost method on every switch (<code data-no-translation=\"\">spanning-tree pathcost method long<\/code> if you need to distinguish links faster than 10 Gb\/s).<\/p>\n<p>If SW3 loses its forwarding link to SW1, RSTP can rapidly transition its alternate port toward SW2. Actual convergence depends on topology and platform behavior.<\/p>\n<\/div>\n<div class=\"st-sec\"><h2>03  Per-VLAN load balancing<\/h2>\n<figure><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 1800 720\" role=\"img\" aria-labelledby=\"st2T st2D\"><title id=\"st2T\">Root bridge placement per VLAN<\/title><desc id=\"st2D\">VLAN 10 uses SW1 as root and blocks SW3 port toward SW2. VLAN 20 uses SW2 as root and blocks SW3 port toward SW1, so both uplinks carry traffic.<\/desc><defs><lineargradient id=\"st2bg\" x2=\"1\" y2=\"1\"><stop stop-color=\"#05121e\"\/><stop offset=\"1\" stop-color=\"#0f2a3d\"\/><\/lineargradient><\/defs><rect width=\"1800\" height=\"720\" fill=\"url(#st2bg)\"\/><g stroke=\"#1f3d52\" opacity=\".45\"><path d=\"M0 0V720\"\/><path d=\"M50 0V720\"\/><path d=\"M100 0V720\"\/><path d=\"M150 0V720\"\/><path d=\"M200 0V720\"\/><path d=\"M250 0V720\"\/><path d=\"M300 0V720\"\/><path d=\"M350 0V720\"\/><path d=\"M400 0V720\"\/><path d=\"M450 0V720\"\/><path d=\"M500 0V720\"\/><path d=\"M550 0V720\"\/><path d=\"M600 0V720\"\/><path d=\"M650 0V720\"\/><path d=\"M700 0V720\"\/><path d=\"M750 0V720\"\/><path d=\"M800 0V720\"\/><path d=\"M850 0V720\"\/><path d=\"M900 0V720\"\/><path d=\"M950 0V720\"\/><path d=\"M1000 0V720\"\/><path d=\"M1050 0V720\"\/><path d=\"M1100 0V720\"\/><path d=\"M1150 0V720\"\/><path d=\"M1200 0V720\"\/><path d=\"M1250 0V720\"\/><path d=\"M1300 0V720\"\/><path d=\"M1350 0V720\"\/><path d=\"M1400 0V720\"\/><path d=\"M1450 0V720\"\/><path d=\"M1500 0V720\"\/><path d=\"M1550 0V720\"\/><path d=\"M1600 0V720\"\/><path d=\"M1650 0V720\"\/><path d=\"M1700 0V720\"\/><path d=\"M1750 0V720\"\/><path d=\"M1800 0V720\"\/><path d=\"M0 0H1800\"\/><path d=\"M0 50H1800\"\/><path d=\"M0 100H1800\"\/><path d=\"M0 150H1800\"\/><path d=\"M0 200H1800\"\/><path d=\"M0 250H1800\"\/><path d=\"M0 300H1800\"\/><path d=\"M0 350H1800\"\/><path d=\"M0 400H1800\"\/><path d=\"M0 450H1800\"\/><path d=\"M0 500H1800\"\/><path d=\"M0 550H1800\"\/><path d=\"M0 600H1800\"\/><path d=\"M0 650H1800\"\/><path d=\"M0 700H1800\"\/><\/g><text x=\"900\" y=\"72\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"36\" font-weight=\"900\" fill=\"#46db82\" text-anchor=\"middle\">ROOT BRIDGE PLACEMENT PER VLAN<\/text><text x=\"900\" y=\"108\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"19\" fill=\"#9cc3d9\" text-anchor=\"middle\">Different roots per VLAN put both of SW3\u2019s uplinks to work \u00b7 equal 1 Gb\/s costs assumed<\/text><rect x=\"60\" y=\"140\" width=\"820\" height=\"555\" rx=\"22\" fill=\"#0b2335\" fill-opacity=\".8\" stroke=\"#2f88b0\" stroke-width=\"2.5\"\/><text x=\"470\" y=\"190\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"28\" font-weight=\"800\" fill=\"#3cc8e8\" text-anchor=\"middle\">VLAN 10 \u00b7 SW1 is root<\/text><path d=\"M330 320L610 320\" stroke=\"#46db82\" stroke-width=\"10\" stroke-linecap=\"round\"\/><path d=\"M275 350L420 530\" stroke=\"#46db82\" stroke-width=\"9\" stroke-linecap=\"round\"\/><path d=\"M665 350L592.5 440.0\" stroke=\"#46db82\" stroke-width=\"9\" stroke-linecap=\"round\"\/><path d=\"M592.5 440.0L520 530\" stroke=\"#f25c5c\" stroke-width=\"9\" stroke-dasharray=\"18 12\"\/><circle cx=\"554.5031245829955\" cy=\"487.1685350004194\" r=\"19\" fill=\"#2a0f14\" stroke=\"#f25c5c\" stroke-width=\"3\"\/><path d=\"M546.7031245829955 479.3685350004194L562.3031245829955 494.9685350004194M562.3031245829955 479.3685350004194L546.7031245829955 494.9685350004194\" stroke=\"#f25c5c\" stroke-width=\"5\" stroke-linecap=\"round\"\/><rect x=\"170.0\" y=\"292.0\" width=\"160.0\" height=\"56.0\" rx=\"8.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"170.0\" y=\"292.0\" width=\"160.0\" height=\"23.52\" rx=\"8.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"2.4000000000000004\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M192.4 303.76h19.200000000000003\" \/><path d=\"M211.6 303.76l-4.800000000000001 -4.0M211.6 303.76l-4.800000000000001 4.0\"\/><path d=\"M224.4 303.76h19.200000000000003\" \/><path d=\"M224.4 303.76l4.800000000000001 -4.0M224.4 303.76l4.800000000000001 4.0\"\/><path d=\"M256.4 303.76h19.200000000000003\" \/><path d=\"M275.6 303.76l-4.800000000000001 -4.0M275.6 303.76l-4.800000000000001 4.0\"\/><path d=\"M288.4 303.76h19.200000000000003\" \/><path d=\"M288.4 303.76l4.800000000000001 -4.0M288.4 303.76l4.800000000000001 4.0\"\/><\/g><rect x=\"184.4\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"206.8\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"229.20000000000002\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"251.60000000000002\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"274.0\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"296.4\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><text x=\"250\" y=\"274\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"24\" font-weight=\"800\" fill=\"#46db82\" text-anchor=\"middle\">SW1 \u00b7 ROOT<\/text><rect x=\"610.0\" y=\"292.0\" width=\"160.0\" height=\"56.0\" rx=\"8.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"610.0\" y=\"292.0\" width=\"160.0\" height=\"23.52\" rx=\"8.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"2.4000000000000004\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M632.4 303.76h19.200000000000003\" \/><path d=\"M651.6 303.76l-4.800000000000001 -4.0M651.6 303.76l-4.800000000000001 4.0\"\/><path d=\"M664.4 303.76h19.200000000000003\" \/><path d=\"M664.4 303.76l4.800000000000001 -4.0M664.4 303.76l4.800000000000001 4.0\"\/><path d=\"M696.4 303.76h19.200000000000003\" \/><path d=\"M715.6 303.76l-4.800000000000001 -4.0M715.6 303.76l-4.800000000000001 4.0\"\/><path d=\"M728.4 303.76h19.200000000000003\" \/><path d=\"M728.4 303.76l4.800000000000001 -4.0M728.4 303.76l4.800000000000001 4.0\"\/><\/g><rect x=\"624.4\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"646.8\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"669.1999999999999\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"691.6\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"714.0\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"736.4\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><text x=\"690\" y=\"274\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"24\" font-weight=\"800\" fill=\"#fff\" text-anchor=\"middle\">SW2<\/text><rect x=\"390.0\" y=\"532.0\" width=\"160.0\" height=\"56.0\" rx=\"8.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"390.0\" y=\"532.0\" width=\"160.0\" height=\"23.52\" rx=\"8.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"2.4000000000000004\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M412.4 543.76h19.200000000000003\" \/><path d=\"M431.6 543.76l-4.800000000000001 -4.0M431.6 543.76l-4.800000000000001 4.0\"\/><path d=\"M444.4 543.76h19.200000000000003\" \/><path d=\"M444.4 543.76l4.800000000000001 -4.0M444.4 543.76l4.800000000000001 4.0\"\/><path d=\"M476.4 543.76h19.200000000000003\" \/><path d=\"M495.6 543.76l-4.800000000000001 -4.0M495.6 543.76l-4.800000000000001 4.0\"\/><path d=\"M508.4 543.76h19.200000000000003\" \/><path d=\"M508.4 543.76l4.800000000000001 -4.0M508.4 543.76l4.800000000000001 4.0\"\/><\/g><rect x=\"404.4\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"426.79999999999995\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"449.2\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"471.59999999999997\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"494.0\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"516.4\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><text x=\"470\" y=\"626\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"24\" font-weight=\"800\" fill=\"#fff\" text-anchor=\"middle\">SW3<\/text><text x=\"470\" y=\"672\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"17\" fill=\"#a9c7d8\" text-anchor=\"middle\">priority SW1 4096 \u00b7 SW2 8192 \u00b7 SW3 32768 \u00b7 SW3 port toward SW2 is alternate<\/text><rect x=\"920\" y=\"140\" width=\"820\" height=\"555\" rx=\"22\" fill=\"#0b2335\" fill-opacity=\".8\" stroke=\"#2f88b0\" stroke-width=\"2.5\"\/><text x=\"1330\" y=\"190\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"28\" font-weight=\"800\" fill=\"#3cc8e8\" text-anchor=\"middle\">VLAN 20 \u00b7 SW2 is root<\/text><path d=\"M1190 320L1470 320\" stroke=\"#46db82\" stroke-width=\"10\" stroke-linecap=\"round\"\/><path d=\"M1135 350L1207.5 440.0\" stroke=\"#46db82\" stroke-width=\"9\" stroke-linecap=\"round\"\/><path d=\"M1207.5 440.0L1280 530\" stroke=\"#f25c5c\" stroke-width=\"9\" stroke-dasharray=\"18 12\"\/><circle cx=\"1245.4968754170045\" cy=\"487.1685350004194\" r=\"19\" fill=\"#2a0f14\" stroke=\"#f25c5c\" stroke-width=\"3\"\/><path d=\"M1237.6968754170045 479.3685350004194L1253.2968754170045 494.9685350004194M1253.2968754170045 479.3685350004194L1237.6968754170045 494.9685350004194\" stroke=\"#f25c5c\" stroke-width=\"5\" stroke-linecap=\"round\"\/><path d=\"M1525 350L1380 530\" stroke=\"#46db82\" stroke-width=\"9\" stroke-linecap=\"round\"\/><rect x=\"1030.0\" y=\"292.0\" width=\"160.0\" height=\"56.0\" rx=\"8.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"1030.0\" y=\"292.0\" width=\"160.0\" height=\"23.52\" rx=\"8.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"2.4000000000000004\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M1052.4 303.76h19.200000000000003\" \/><path d=\"M1071.6 303.76l-4.800000000000001 -4.0M1071.6 303.76l-4.800000000000001 4.0\"\/><path d=\"M1084.4 303.76h19.200000000000003\" \/><path d=\"M1084.4 303.76l4.800000000000001 -4.0M1084.4 303.76l4.800000000000001 4.0\"\/><path d=\"M1116.4 303.76h19.200000000000003\" \/><path d=\"M1135.6 303.76l-4.800000000000001 -4.0M1135.6 303.76l-4.800000000000001 4.0\"\/><path d=\"M1148.4 303.76h19.200000000000003\" \/><path d=\"M1148.4 303.76l4.800000000000001 -4.0M1148.4 303.76l4.800000000000001 4.0\"\/><\/g><rect x=\"1044.4\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1066.8000000000002\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1089.2\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1111.6000000000001\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1134.0\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1156.4\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><text x=\"1110\" y=\"274\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"24\" font-weight=\"800\" fill=\"#fff\" text-anchor=\"middle\">SW1<\/text><rect x=\"1470.0\" y=\"292.0\" width=\"160.0\" height=\"56.0\" rx=\"8.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"1470.0\" y=\"292.0\" width=\"160.0\" height=\"23.52\" rx=\"8.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"2.4000000000000004\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M1492.4 303.76h19.200000000000003\" \/><path d=\"M1511.6 303.76l-4.800000000000001 -4.0M1511.6 303.76l-4.800000000000001 4.0\"\/><path d=\"M1524.4 303.76h19.200000000000003\" \/><path d=\"M1524.4 303.76l4.800000000000001 -4.0M1524.4 303.76l4.800000000000001 4.0\"\/><path d=\"M1556.4 303.76h19.200000000000003\" \/><path d=\"M1575.6 303.76l-4.800000000000001 -4.0M1575.6 303.76l-4.800000000000001 4.0\"\/><path d=\"M1588.4 303.76h19.200000000000003\" \/><path d=\"M1588.4 303.76l4.800000000000001 -4.0M1588.4 303.76l4.800000000000001 4.0\"\/><\/g><rect x=\"1484.4\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1506.8000000000002\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1529.2\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1551.6000000000001\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1574.0\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1596.4\" y=\"326.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><text x=\"1550\" y=\"274\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"24\" font-weight=\"800\" fill=\"#46db82\" text-anchor=\"middle\">SW2 \u00b7 ROOT<\/text><rect x=\"1250.0\" y=\"532.0\" width=\"160.0\" height=\"56.0\" rx=\"8.0\" fill=\"#155a78\" stroke=\"#9fe6ff\" stroke-width=\"3\"\/><rect x=\"1250.0\" y=\"532.0\" width=\"160.0\" height=\"23.52\" rx=\"8.0\" fill=\"#2c7ea2\"\/><g stroke=\"#effaff\" stroke-width=\"2.4000000000000004\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M1272.4 543.76h19.200000000000003\" \/><path d=\"M1291.6 543.76l-4.800000000000001 -4.0M1291.6 543.76l-4.800000000000001 4.0\"\/><path d=\"M1304.4 543.76h19.200000000000003\" \/><path d=\"M1304.4 543.76l4.800000000000001 -4.0M1304.4 543.76l4.800000000000001 4.0\"\/><path d=\"M1336.4 543.76h19.200000000000003\" \/><path d=\"M1355.6 543.76l-4.800000000000001 -4.0M1355.6 543.76l-4.800000000000001 4.0\"\/><path d=\"M1368.4 543.76h19.200000000000003\" \/><path d=\"M1368.4 543.76l4.800000000000001 -4.0M1368.4 543.76l4.800000000000001 4.0\"\/><\/g><rect x=\"1264.4\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1286.8000000000002\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1309.2\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1331.6000000000001\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1354.0\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><rect x=\"1376.4\" y=\"566.72\" width=\"12.8\" height=\"7.2\" rx=\"2\" fill=\"#46db82\"\/><text x=\"1330\" y=\"626\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"24\" font-weight=\"800\" fill=\"#fff\" text-anchor=\"middle\">SW3<\/text><text x=\"1330\" y=\"672\" font-family=\"DejaVu Sans,Arial,sans-serif\" font-size=\"17\" fill=\"#a9c7d8\" text-anchor=\"middle\">priority SW1 8192 \u00b7 SW2 4096 \u00b7 SW3 32768 \u00b7 SW3 port toward SW1 is alternate<\/text><\/svg><\/figure>\n<p>Configure SW1 as root for VLAN 10 and SW2 as root for VLAN 20. This gives different VLANs different preferred Layer 2 roots. Plan gateway placement and uplink utilization together; a root bridge is not automatically the default gateway.<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">! SW1\nconf t\nspanning-tree mode rapid-pvst\nspanning-tree vlan 10 priority 4096\nspanning-tree vlan 20 priority 8192\nend\n! SW2\nconf t\nspanning-tree mode rapid-pvst\nspanning-tree vlan 10 priority 8192\nspanning-tree vlan 20 priority 4096\nend<\/code><\/pre>\n<div class=\"note\">Choose priority values in increments of 4096. A lower value wins unless an even lower bridge ID is advertised.<\/div>\n<\/div>\n<div class=\"st-sec\"><h2>04  Edge protection and trunk hardening<\/h2>\n<p>Use PortFast only on verified endpoint-facing ports. BPDU Guard shuts down an edge port that receives an unexpected BPDU, helping contain accidental loops and rogue switches. Root Guard protects a designated port from an unexpected superior root advertisement. Loop Guard protects non-designated\/root path conditions when BPDUs disappear.<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">! Confirm these are host-only access ports\ninterface range GigabitEthernet1\/0\/10-24\n switchport mode access\n spanning-tree portfast\n spanning-tree bpduguard enable\n! Designated downlink to an access switch, not an uplink to root\ninterface GigabitEthernet1\/0\/3\n spanning-tree guard root\n! Optional network-wide loop protection (validate design first)\nspanning-tree loopguard default<\/code><\/pre>\n<div class=\"note\">Do not combine root guard and loop guard on the same interface. Avoid unreviewed BPDU filter on production ports; suppressing BPDUs can hide loops. Do not enable edge PortFast indiscriminately on switch trunks.<\/div>\n<\/div>\n<div class=\"st-sec\"><h2>05  MST configuration and region consistency<\/h2>\n<p>MST maps many VLANs to a small number of spanning-tree instances. Switches in the same MST region must match region name, revision, and VLAN-to-instance mappings. A mismatch creates a boundary and can produce surprising forwarding behavior.<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">spanning-tree mode mst\nspanning-tree mst configuration\n name MAG212-CAMPUS\n revision 5\n instance 1 vlan 10,30\n instance 2 vlan 20,40\n exit\nspanning-tree mst 1 priority 4096\nspanning-tree mst 2 priority 8192\n! Verify\nshow spanning-tree mst configuration\nshow spanning-tree mst detail<\/code><\/pre>\n<div class=\"note\">Plan MST-to-Rapid-PVST interoperability before deployment. Region boundary and PVST simulation inconsistencies need special attention.<\/div>\n<\/div>\n<div class=\"st-sec\"><h2>06  Critical verification commands<\/h2>\n<table><thead><tr><th>Commande<\/th><th>What it tells you<\/th><\/tr><\/thead><tbody>\n<tr><td><code data-no-translation=\"\">show spanning-tree summary<\/code><\/td><td>Active mode and global statistics<\/td><\/tr>\n<tr><td><code data-no-translation=\"\">show spanning-tree vlan 10<\/code><\/td><td>Root ID, local bridge ID, ports and states<\/td><\/tr>\n<tr><td><code data-no-translation=\"\">show spanning-tree root<\/code><\/td><td>Root bridge per instance<\/td><\/tr>\n<tr><td><code data-no-translation=\"\">show spanning-tree interface gi1\/0\/1 detail<\/code><\/td><td>Role, state, BPDU counters<\/td><\/tr>\n<tr><td><code data-no-translation=\"\">show spanning-tree inconsistentports<\/code><\/td><td>Root\/loop\/PVST inconsistency blocking<\/td><\/tr>\n<tr><td><code data-no-translation=\"\">show interfaces trunk<\/code><\/td><td>Allowed VLANs and operational trunks<\/td><\/tr>\n<tr><td><code data-no-translation=\"\">show etherchannel summary<\/code><\/td><td>Bundle consistency if trunks are aggregated<\/td><\/tr>\n<tr><td><code data-no-translation=\"\">show logging | include SPANTREE|BPDU<\/code><\/td><td>Topology events and guard violations<\/td><\/tr>\n<\/tbody><\/table>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">SW3# show spanning-tree vlan 10\nVLAN0010\n  Root ID    Priority    4106\n             Address     0011.2233.4400\n             Cost        4\n             Port        1 (Gi1\/0\/1)\n  Bridge ID  Priority    32778\nInterface           Role Sts Cost\nGi1\/0\/1            Root FWD 4\nGi1\/0\/2            Altn BLK 4<\/code><\/pre>\n<div class=\"note\">Output is illustrative, not a captured device result. Rapid PVST+ often displays BLK for an alternate\/discarding port.<\/div>\n<\/div>\n<div class=\"st-sec\"><h2>07  Troubleshooting playbook<\/h2>\n<table><thead><tr><th>Symptom<\/th><th>V\u00e9rifier<\/th><th>Likely action<\/th><\/tr><\/thead><tbody>\n<tr><td>Frequent topology changes<\/td><td>show spanning-tree detail; interface counters<\/td><td>Find flapping or unmanaged bridge<\/td><\/tr>\n<tr><td>Wrong root bridge<\/td><td>Root ID and priority per VLAN<\/td><td>Set deterministic root priorities<\/td><\/tr>\n<tr><td>Host port err-disabled<\/td><td>show logging and interface status<\/td><td>Remove rogue switch\/loop before recovery<\/td><\/tr>\n<tr><td>Traffic blackhole on trunk<\/td><td>VLAN allowance, state, native VLAN<\/td><td>Fix trunk or STP inconsistency<\/td><\/tr>\n<tr><td>MST neighbors disagree<\/td><td>Region name\/revision\/VLAN mapping<\/td><td>Align region configuration<\/td><\/tr>\n<tr><td>Unidirectional link<\/td><td>Loop guard, optics, UDLD status<\/td><td>Replace faulty link, validate guards<\/td><\/tr>\n<\/tbody><\/table>\n<p>Change-control sequence: capture baseline, change one switch or VLAN group at a time, verify root IDs and port roles, then simulate one approved link failure during a maintenance window.<\/p>\n<\/div>\n<div class=\"st-sec\"><h2>08  Practice Q&amp;A<\/h2>\n<div class=\"qa\"><b>Q1. SW1 priority 4096 and SW2 priority 8192 in VLAN 10. Who wins?<\/b><p>SW1, assuming normal extended system ID behavior; its effective bridge priority is lower.<\/p><\/div>\n<div class=\"qa\"><b>Q2. Does the root bridge have a root port?<\/b><p>No. The root is the reference point; its participating ports are designated on their attached segments.<\/p><\/div>\n<div class=\"qa\"><b>Q3. Why can an RSTP port be discarding while the cable is up?<\/b><p>To prevent a forwarding loop while preserving a backup path.<\/p><\/div>\n<div class=\"qa\"><b>Q4. PortFast and BPDU Guard together?<\/b><p>Appropriate on verified host-facing switchports; not a blanket trunk setting.<\/p><\/div>\n<div class=\"qa\"><b>Q5. What must match in an MST region?<\/b><p>Region name, revision and VLAN-to-instance mappings.<\/p><\/div>\n<div class=\"qa\"><b>Q6. Can root guard and loop guard coexist on the same interface?<\/b><p>No; Cisco documents them as mutually exclusive on an interface.<\/p><\/div>\n<div class=\"qa\"><b>Q7. Is a router IP subnet required for an L2 STP trunk?<\/b><p>No. STP operates on bridge ports at Layer 2; VLAN IDs, interface roles and path costs are the meaningful labels.<\/p><\/div>\n<div class=\"qa\"><b>Q8. Why is a 2-Way OSPF concept irrelevant here?<\/b><p>STP uses BPDU\/bridge and port roles, not Layer 3 routing adjacency states.<\/p><\/div>\n<\/div>\n<div class=\"st-sec\"><h2>09  Sources &amp; further reading<\/h2>\n<p>This is an original MAG212 CYBER guide: all diagrams, examples and explanations were written independently. The topic coverage was inspired by the classic PacketLife.net Spanning Tree cheat sheet.<\/p>\n<p>Standards and vendor references: IEEE 802.1D (STP), 802.1w (RSTP) and 802.1s\/802.1Q (MST); <a href=\"https:\/\/www.cisco.com\/c\/en\/us\/support\/docs\/lan-switching\/spanning-tree-protocol\/24062-146.html\" target=\"_blank\" rel=\"noopener\">Cisco \u2014 Understanding Rapid Spanning Tree Protocol (802.1w)<\/a>; <a href=\"https:\/\/www.cisco.com\/c\/en\/us\/support\/docs\/lan-switching\/spanning-tree-protocol\/10556-16.html\" target=\"_blank\" rel=\"noopener\">Cisco \u2014 Troubleshoot STP Problems and Related Design Considerations<\/a>. Verify syntax against your platform and software release before applying changes.<\/p>\n<\/div>\n<\/div><div class=\"st-foot\">\u00a9 2026 MAG212 CYBER \u00b7 cyber.mag212.com \u00b7 Original illustrations \u00b7 Technical reference<br><a href=\"\/fr\/learn\/\">Plus de guides dans Apprendre<\/a> \u00b7 <a href=\"\/fr\/learn\/interior-routing-protocols\/\">Comparaison des protocoles de routage<\/a> \u00b7 <a href=\"\/fr\/services\/\">Conseil en r\u00e9seau et s\u00e9minaires<\/a><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Spanning Tree field guide: Rapid PVST+ and MST, root bridge election, port roles, per-VLAN load balancing, guards and troubleshooting.<\/p>","protected":false},"author":1,"featured_media":0,"parent":3385,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3432","page","type-page","status-publish","hentry"],"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"_links":{"self":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/pages\/3432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/comments?post=3432"}],"version-history":[{"count":0,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/pages\/3432\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/pages\/3385"}],"wp:attachment":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/media?parent=3432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}