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.
STP/RSTP Flag Reference
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.
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.
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
Operational reference
Fast context before you go deeper.
show spanning-tree vlan 10 detail | include topology|from|occurredVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
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.
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
| Bit | Value | Name | Used by | Meaning |
|---|---|---|---|---|
| 0 | 0x01 | Topology change (TC) | STP, RSTP | The topology has changed; shorten or flush MAC address tables |
| 1 | 0x02 | Proposal | RSTP | The sender wants to become designated and forward on this link |
| 2–3 | 0x0C | Port role | RSTP | 01 alternate or backup, 10 root, 11 designated |
| 4 | 0x10 | Learning | RSTP | The sending port is learning |
| 5 | 0x20 | Forwarding | RSTP | The sending port is forwarding |
| 6 | 0x40 | Agreement | RSTP | Answer to a proposal: the sender has made itself safe and accepts |
| 7 | 0x80 | Topology change acknowledgment | STP | Confirms 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.
| Bit | Value | Flag | Meaning |
|---|---|---|---|
| 0 | 0x01 | Topology Change (TC) | A topology change is being propagated |
| 1 | 0x02 | Proposal | Designated port proposes to become forwarding |
| 2–3 | 0x0C | Port role | 00 unknown, 01 alternate/backup, 10 root, 11 designated |
| 4 | 0x10 | Learning | Port is learning |
| 5 | 0x20 | Forwarding | Port is forwarding |
| 6 | 0x40 | Agreement | Answer to a proposal |
| 7 | 0x80 | Topology Change Ack (TCA) | Used only towards 802.1D bridges |
Decoding examples
| Flags | Decoded |
|---|---|
| 0x3C | Designated (0x0C) + learning + forwarding: a stable designated port |
| 0x0E | Designated + proposal: a designated port asking to forward |
| 0x78 | Root (0x08) + learning + forwarding + agreement: a root port agreeing |
| 0x79 | Root + 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
| Observation | Meaning |
|---|---|
| Proposals sent repeatedly, no agreement received | Neighbour not RSTP, or the link isn't point-to-point |
| TC flag set often | Frequent topology changes: find the port with show spanning-tree detail |
| TCA set | An 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.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
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.