A switch port that is in the Spanning Tree Protocol (STP) listening state can send and receive bridge protocol data units (BPDUs), but the port will not update its Media Access Control (MAC) address table.
There are five possible port states when 802.1D Spanning Tree Protocol (STP) is used: blocking, listening, learning, forwarding, and disabled. After a port is initialized, it enters the blocking state. From the blocking state, the port transitions to either the listening state or the disabled state. From the listening state, the port transitions to either the learning state or the disabled state. From the learning state, the port transitions to either the forwarding state or the disabled state.
A port will enter the listening state from the blocking state if STP determines that the port can enter the forwarding state. When a port is in the listening state, the port discards any data frames that it receives; however, it receives and forwards BPDUs. Additionally, the port is able to receive and respond to network management messages. The port does not learn any MAC addresses and does not populate its MAC address table. The root bridge, root port, and designated ports are elected during the listening state.
When a port is in the learning state, it does not forward data frames but does populate the MAC address table based on the frames that it receives. The port responds to network management messages, receives and directs BPDUs to the system module, and processes BPDUs received from the system module.
Similar to a port in the learning state, a port in the forwarding state can populate the MAC address table based on the frames that it receives. However, unlike a port in the learning state, a port in the forwarding state can forward data frames as well as receive and process data frames, BPDUs, and network management messages.
A port in the blocking state is similar to a port in the listening state in that the port cannot forward data frames or populate the MAC address table. Additionally, a port in the blocking state can receive BPDUs as well as receive and respond to network management messages.
A port in the disabled state does not process or forward data frames, nor does it forward BPDUs or update the MAC address table. A port in the disabled state does not participate in STP.