Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

STP/RSTP Flag Reference

Direct answer

The flags byte in a BPDU carries the topology-change bits and, in RSTP, the sending port's role and state and the proposal and agreement bits of the rapid handshake.

When to use this

Use it to trace where topology changes come from, and to see in a capture why a link did or did not go forwarding quickly.

First 30 seconds

1. show spanning-tree vlan <id> detail | include topology|from|occurred — how many, when, from which port?

2. Follow that port to the next switch and repeat.

3. At the source: a flapping link, or an end-device port without PortFast.

4. Fix the link, or add spanning-tree portfast.

5. The counter should then stay still.

Operational verification

edge ports on all end devices → only inter-switch link changes raise TC → TC flag propagates on non-edge ports → MAC tables flushed once → counter stable until the next real change

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Key commandshow spanning-tree vlan 10 detail | include topology|from|occurred
Scope / prerequisiteUse it to trace where topology changes come from, and to see in a capture why a link did or did not go forwarding quick…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification Verify boundary
show spanning-tree vlan 10 detail | include topology|from|occurred
show spanning-tree vlan 10
show mac address-table count

The first prints the number of topology changes, when the last one occurred, and the port it came in on. Follow that port to the next switch and repeat until reaching the port where the change originated. The per-VLAN output shows each port's role and state — the same information the flags carry — and whether it is an edge port.

In a capture, the flags byte is decoded per BPDU; look for the TC bit, and for proposal and agreement when a link comes up.

Known-good: the topology change counter is stable for hours or days, and the last change corresponds to a known event.

Step 2 Failure isolation workflow Narrow the fault
  • The topology change counter climbs steadily. A port keeps going up and down, or end-device ports are not edge ports. Trace the "from" port switch by switch to the source.
  • Bursts of flooding and brief slowness across the network. MAC tables are being flushed by topology changes.
  • A link takes 30 seconds to forward. No agreement was returned: the neighbour runs classic STP or the link is treated as shared.
  • Proposals repeat without an answer. BPDUs from the other side are not arriving.
  • Topology changes come from a port to a server. It is not an edge port; a trunk to a server needs spanning-tree portfast trunk (edge trunk).
  • Only TC and acknowledgment bits are ever set. The switch runs classic STP.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

A topology change makes every switch flush learned MAC addresses, which causes flooding. In RSTP only a non-edge port going forwarding triggers one — so end-device ports must be edge ports. A normal designated port sends 0x3C.

Key checks
  • show spanning-tree vlan <id> detail | include topology|from|occurred — count, time and source port of topology changes.
  • show spanning-tree vlan <id> — roles, states and edge ports.
  • Capture filter stp — the flags decoded per BPDU.
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

One byte in every BPDU holds the flags. In classic STP two of its bits are used, both for signalling a topology change. RSTP uses all eight: it adds the sending port's role and state, and the two bits of the proposal/agreement handshake.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

The flags carry the two things about spanning tree that happen in real time: the handshake that brings a link up quickly, and the announcement that the topology has changed — which makes every switch discard learned MAC addresses. Frequent topology changes are a common cause of unexplained flooding and slow networks.

ReferenceHow it works1 section · depth on demand

How it works

BitValueNameUsed byMeaning
00x01Topology change (TC)STP, RSTPThe topology has changed; shorten or flush MAC address tables
10x02ProposalRSTPThe sender wants to become designated and forward on this link
2–30x0CPort roleRSTP01 alternate or backup, 10 root, 11 designated
40x10LearningRSTPThe sending port is learning
50x20ForwardingRSTPThe sending port is forwarding
60x40AgreementRSTPAnswer to a proposal: the sender has made itself safe and accepts
70x80Topology change acknowledgmentSTPConfirms a topology change notification

A designated port in normal operation therefore sends 0x3C: role designated, learning and forwarding. During the handshake on a new link, the first BPDU from the upstream switch has the proposal bit and no forwarding bit; the reply has the agreement bit.

Topology change in classic STP. A switch that notices a change sends a separate notification BPDU towards the root, acknowledged hop by hop with bit 7. The root then sets the TC bit in its BPDUs for a period, and every switch shortens the ageing of its MAC table to 15 seconds.

Topology change in RSTP. Only one event counts: a non-edge port moving to forwarding. The switch where it happens sends BPDUs with the TC bit on all its non-edge ports for a few seconds. Every switch that receives them immediately flushes the MAC addresses learned on its other ports and passes the TC on. The whole network relearns.

That is why ports to end devices must be edge ports: an edge port coming up causes no topology change. Without it, every PC that boots makes all switches flush their tables, and traffic is flooded until the addresses are learned again.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

The RSTP flags byte encodes role, state and handshake signals

Cisco's RSTP document explains that 802.1D used only two bits of the flags byte (TC and TCA), and that RSTP uses the remaining six to encode the port role and state and to carry the proposal and agreement handshake.

BitValueFlagMeaning
00x01Topology Change (TC)A topology change is being propagated
10x02ProposalDesignated port proposes to become forwarding
2–30x0CPort role00 unknown, 01 alternate/backup, 10 root, 11 designated
40x10LearningPort is learning
50x20ForwardingPort is forwarding
60x40AgreementAnswer to a proposal
70x80Topology Change Ack (TCA)Used only towards 802.1D bridges

Decoding examples

FlagsDecoded
0x3CDesignated (0x0C) + learning + forwarding: a stable designated port
0x0EDesignated + proposal: a designated port asking to forward
0x78Root (0x08) + learning + forwarding + agreement: a root port agreeing
0x79Root + learning + forwarding + agreement + TC

Port role field values in bits 2–3: 0x04 alternate/backup, 0x08 root, 0x0C designated.

$ tshark -r stp.pcap -Y stp -T fields -e stp.flags -e stp.flags.port_role -e stp.flags.proposal -e stp.flags.agreement -e stp.flags.tc
0x3c    3    0    0    0
0x0e    3    1    0    0
0x78    2    0    1    0

Using flags in troubleshooting

ObservationMeaning
Proposals sent repeatedly, no agreement receivedNeighbour not RSTP, or the link isn't point-to-point
TC flag set oftenFrequent topology changes: find the port with show spanning-tree detail
TCA setAn 802.1D bridge is involved on that link

The Cisco document notes that the detecting bridge floods TC-flagged BPDUs and every receiving bridge flushes MAC entries and does the same. Frequent TCs therefore mean frequent MAC flushes and flooding across the domain.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → STP/RSTP Flag Reference. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
rstp flagsbpdu flags
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

STP/RSTP Flags

TC/Proposal/Role/Learn/Fwd/Agreement.

30-second lookup

  • Open Packet Field Explorer for field-level metadata.
  • Use Packet Decoders for bit/flag values where relevant.
  • Use Paste Output / Structured Parser for CLI evidence.
  • Use Packet Filters to prove the wire boundary.

Evidence rule

A decoded field proves what is present in that packet/output at that moment. Continue through the verification chain before concluding end-to-end behavior.

Confirmation

Confirm action

Continue?