Loopback Cert Guide
Lab 2.5Spanning Tree

Rapid PVST+, every port and every role.

A live network of four switches running one tree per VLAN. Change priorities, costs and guards from the console or with a click, then cut cables and plug in a rogue switch and watch it reconverge. Drills check that you can call it before the simulator does.

  • 2.5.aRoot bridge (primary, secondary), root port and the other port names
  • 2.5.bPort states and roles
  • 2.5.cPortFast
  • 2.5.dRoot guard, loop guard, BPDU filter and BPDU guard
01Live network

Four switches with every port live.

Letters on the cables are port roles: R root, D designated, A alternate. Green forwards, white discards. Click any switch, port or cable to change it; the console shows the IOS command for every change.

Live network · Rapid PVST+ · simulated
  • Forwarding
  • Discarding
  • Learning
  • Blocked by a guard
  • Edge (PortFast)
  • Shut or err-disabled

Simulated: the switches, MAC addresses and console output are Loopback's simulation of a Catalyst switch running Rapid PVST+, not a real device. Port costs use the short (IEEE 802.1D-1998) values unless you switch a switch to the long method.

02Tasks

Solve the task and the network checks your work.

Each task loads its own starting point onto the network. Solve it from the console or with clicks; the checks tick live, and you see one model answer when you're done.

    03What happens if

    Predict the result, then watch it happen.

    Eight breakages the exam loves: rogue switches, one-way links, a dead root. Pick what you think happens, then load it on the network and see it.

      04Drills

      A new network every round, so nothing is memorized.

      Random topologies, priorities and MACs, graded by the same simulator that runs the network. Build a streak.

      05Recall sheet

      The whole topic on one sheet.

      The numbers, orders and commands the network runs on. Cover a column and say it before you look.

      Bridge ID

      Priority4 bits Sys-id-ext12 bits: the VLAN MAC address48 bits
      • Priority runs 0 to 61440 in steps of 4096. Default 32768.
      • Show output adds the VLAN: VLAN 10 at the default reads 32778.
      • Lowest wins: priority first, then the lowest MAC.
      • root primary sets 24576, or 4096 below the current root if that's not enough. root secondary sets 28672.

      Who wins

      1. Root bridge: lowest bridge ID.
      2. Root port, one per non-root switch: lowest root path cost, then lowest neighbor bridge ID, then lowest neighbor port ID.
      3. Designated port, one per link: the side with the lowest root path cost, then bridge ID, then port ID. Every port on the root is designated.
      4. Everything else discards: alternate, or backup if the better BPDU comes from the same switch.

      Port ID is priority (default 128, steps of 16) then port number, shown as 128.1.

      Port roles

      RoleShowState
      RootRootForwarding. Best path to the root.
      DesignatedDesgForwarding. Best port on its link.
      AlternateAltnDiscarding. Backup path to the root.
      BackupBackDiscarding. Backup for a designated port on a shared segment.
      DisablednoneShut down; not listed.

      States: 802.1D and RSTP

      802.1DRSTPLearns MACsForwards
      DisabledDiscardingNoNo
      BlockingNoNo
      ListeningNoNo
      LearningLearningYesNo
      ForwardingForwardingYesYes

      Show output prints discarding as BLK, and a guard's block as BKN*.

      Path cost

      SpeedShortLong
      10 Mbps1002,000,000
      100 Mbps19200,000
      1 Gbps420,000
      10 Gbps22,000

      Root path cost adds the cost of each port a BPDU arrives on, on the way back from the root. show spanning-tree summary says which method is in use.

      Timers

      2 s
      Hello: BPDU interval
      20 s
      Max age (802.1D)
      15 s
      Forward delay: each of listening and learning
      3 hellos
      RSTP drops a neighbor's info after 3 missed hellos (6 s)

      Without PortFast, a port with no RSTP partner (a PC) waits 2 × 15 s before forwarding.

      PortFast and the four guards

      FeaturePut it onTriggerResultRecovery
      PortFastAccess ports to end devicesLink upForwards right away as an edge port. A BPDU in makes it a normal STP port.n/a
      BPDU guardPortFast portsAny BPDUerr-disabledshutdown then no shutdown, or errdisable recovery
      BPDU filter, interfaceRarely: it's riskyn/aSends no BPDUs and ignores the ones it gets. Can loop.n/a
      BPDU filter, globalPortFast portsA BPDU inThe port drops PortFast and filtering and runs normal STPAutomatic
      Root guardDesignated ports where the root must never beA superior BPDURoot-inconsistent (BKN*, ROOT_Inc)Automatic once those BPDUs stop
      Loop guardRoot and alternate portsBPDUs stop arrivingLoop-inconsistent (BKN*, LOOP_Inc)Automatic once BPDUs return

      Commands

      Global

      spanning-tree mode rapid-pvst
      spanning-tree vlan 10 priority 4096
      spanning-tree vlan 10 root primary
      spanning-tree vlan 20 root secondary
      spanning-tree portfast default
      spanning-tree portfast bpduguard default
      spanning-tree portfast bpdufilter default
      spanning-tree loopguard default
      spanning-tree pathcost method long

      Interface

      spanning-tree portfast
      spanning-tree portfast trunk
      spanning-tree bpduguard enable
      spanning-tree bpdufilter enable
      spanning-tree guard root
      spanning-tree guard loop
      spanning-tree cost 10
      spanning-tree vlan 10 cost 10
      spanning-tree port-priority 64

      Verify

      show spanning-tree
      show spanning-tree vlan 10
      show spanning-tree interface gi1/0/1
      show spanning-tree summary
      show spanning-tree root
      show spanning-tree blockedports
      show spanning-tree inconsistentports
      show interfaces status err-disabled

      Newer IOS releases also accept spanning-tree portfast edge for the same thing. All of these work in the network's consoles.

      Jump to a page

      1. Gi0/1HomeconnectedHow the exam works and a sample of every station
      2. Gi0/2Practice Testsconnected18 tests by domain, every answer explained
      3. Gi0/3Flashcardsconnected401 cards on every objective, plus your own
      4. Gi0/4CLI LabconnectedCommand drills and config tasks, checked like IOS
      5. Gi0/5Concept LabsconnectedYou're in Lab 2.5 Spanning Tree. All labs.
      6. Gi0/6Study PlanconnectedAll 53 objectives, graded from your progress