STP (PVST+) — Verificación

Estado general de STP

Switch# show spanning-tree

Salida típica (una VLAN):

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0002.4A5D.89C4
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     0002.4A5D.89C4
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- ----
Fa0/8            Desg FWD 19        128.8    P2p
Fa0/18           Desg FWD 19        128.18   P2p
Fa0/15           Desg LSN 19        128.15   P2p

Cómo leerla:

  • Root ID: la prioridad y MAC del root bridge. Si dice This bridge is the root, este switch es el root de esa VLAN.
  • Bridge ID: la prioridad de este switch, con el desglose (priority 32768 sys-id-ext 1). El sys-id-ext es el número de VLAN.
  • Role: Root, Desg (designated), Altn (alternate/blocking).
  • Sts (Status): FWD (Forwarding), BLK (Blocking), LSN (Listening), LRN (Learning).
  • Cost: costo de la interface hacia el root.
  • Prio.Nbr: port-priority.puerto.
  • Type: P2p (punto a punto).

STP de una VLAN concreta

Switch# show spanning-tree vlan número-de-vlan

Útil para confirmar quién es el root de esa VLAN y ver la carga repartida entre switches (por ejemplo, distinto root en VLAN 1 y en VLAN 20). En un switch que no es root, aparece el Root port hacia el root bridge.


Puertos bloqueados por STP

Switch# show spanning-tree blocked ports

Lista los puertos que STP dejó en Blocking para evitar bucles. Es la forma rápida de ver qué enlaces redundantes están inactivos.


Resumen y detalle

Switch# show spanning-tree summary
Switch# show spanning-tree interface nombre-interfaz
Switch# show spanning-tree interface nombre-interfaz detail
  • summary: modo de STP, y conteo de puertos por estado.
  • interface ... detail: costo, prioridad, contador de BPDUs y detalles del puerto.

Añadido pro: show spanning-tree root muestra de un vistazo el root de cada VLAN y el costo/puerto hacia él.

Switch# show spanning-tree root

Cómo confirmar que tu diseño de root quedó bien

  • En el switch que quieres como root: show spanning-tree vlan <n> debe decir This bridge is the root.
  • En los demás switches: el Root ID debe apuntar a la MAC/prioridad de ese root, y debe existir un Root port hacia él.
  • Los enlaces redundantes deben aparecer en BLK en el extremo que STP decidió bloquear.