STP – do we really need a Listening state?

By certskills May 5, 2011 09:42

Long story, but I had a reason today to try and think of a case in which a temporary loop might occur for which the listening state in STP was really necessary. The short answer? I couldn’t come up with one. And I found an interesting quote along the way. Maybe you’ll find the quote from Radia Perlman, creator of STP, to be interesting – I sure did.

First off, listening state is that interim 802.1D STP state in which a switch listens for BPDUs, but does not learn MAC addresses. The reason for the state is to allow time for the MAC table entries to timeout, so that during learning state, the switch can learn new states. With default timers, a switch will timeout all entries in the MAC table in the same time it spends in a listening state.

What I can’t do is find a case in which if the listening state allowed a switch to learn new MAC address table entries, a loop would occur with unicast frames. First off, the MAC address table learning process does not change the STP topology (the set of forwarding and blocking interfaces). But if the STP topology had a temporary loop, then broadcasts would loop. The question is, could unicast frames loop, assuming that the “wrong” MAC table entry was learned, assuming listening state allowed switches to learn new MAC table entries?

Whew, that’s a lot. I couldn’t come up with a good example. Can you? Post away.

In the mean time, I looked to the source: Radia Perlman. She create spanning tree while at MIT, and wrote a wonderful book 20 years or so about spanning tree and routing, called “interconnections”. And here’s an interesting quote on this very subject – very telling about whether we really need a listening state, in which no new MAC table entries are learned. From page 63:

“In the original spanning tree algorithm, I had only a single intermediate state, known as “preforwarding”. The committee asked whether bridges should learn station addresses in the preforwarding state. I said I didn’t think it mattered. The committee decided to break preforwarding into the two aforementioned states (added by Wendell: listening, learning). I believe that having two states is unnecessary and that bridges would work fine regardless of whether or not they learn station addresses in preforwarding. Breaking this period into two states makes the algorithm more complicated to understand but does not harm”

Looks like the listening state may not have been needed at all, all these years. Of course, today, in real life, we’d just use the RSTP 802.1w version of spanning tree. But maybe you found this brief diversion interesting as well. Here’s a link to the book if interested – an oldie but a goodie.


Mind Maps for Exam Terminology Review
Subnetting Speed Practice #1
By certskills May 5, 2011 09:42
Write a comment


  1. Anthony Sequeira December 16, 08:43

    Great stuff my friend!

    Reply to this comment
  2. Marshal Gwata March 30, 09:10


    Reply to this comment
  3. Ehsan July 22, 10:09

    Hello,You told: ‘With default timers, a switch will timeout all entries in the MAC table in the same time it spends in a listening state’, but default aging for MAC Address entries is 300Sec and default listening state time is 15Sec. how all all entries in the MAC table get timeout?

    Reply to this comment
    • certskills Author July 22, 12:29

      Hi Ehsan,
      Wow, I wrote this post over ten years ago… 🙂
      To answer:
      Independent of STP logic, I agree that Cisco switches default to a MAC table timeout of 300 seconds. What I didn’t fully explain in the 2nd paragraph above (which is where the sentence you quoted comes from) is this: When STP on a switch realizes the topology has changed, it no longer uses the 300 second MAC table timeout. It dynamically switches to using a different timeout value, equal to the current STP MaxAge variable setting (default 15 seconds.) As a result, by the end of the Listening state, all related MAC table entries have expired. Hope that clears it up.
      Also, FYI, RSTP just flushes the table – doesn’t have to wait. See section 13.27.28 of the 802.1Q-2018 standard if you want a little more.

      Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email


Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.