Spanning Tree Port States
Spanning Tree Port States
com
Search...
Table of Contents
CCIE Routing & Switching
Unit 1: Preparation
Unit 2: Switching
Static MAC Address Table Entry
802.1Q Encapsulation
VTP Version 3
Protected Port
Introduction to Spanning-Tree
Spanning-Tree Portfast
Spanning-Tree UplinkFast
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 1/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
Rapid Spanning-Tree
Spanning-Tree BPDUGuard
Spanning-Tree BPDUFilter
Spanning-Tree RootGuard
FlexLinks
Introduction to Etherchannel
Layer 3 Etherchannel
Unit 3: IP Routing
Unit 4: RIP
Unit 5: EIGRP
Unit 6: OSPF
Unit 7: BGP
Unit 8: Multicast
Unit 9: IPv6
Unit 10: Quality of Service
Unit 11: Security
Unit 12: System Management
Unit 13: Network Services
Unit 14: MPLS
If you have played with some Cisco switches before you might have noticed that every time you
plug in a cable the led above the interface was orange and after a while became green. What is
happening at this moment is that spanning tree is determining the state of the interface.
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 2/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
05:16
Listening state: Only a root or designated port will move to the listening state. The non-
designated port will stay in the blocking state.No data transmission occurs at this state for
15 seconds just to make sure the topology doesn’t change in the meantime. After the
listening state we move to the learning state.
Learning state: At this moment the interface will process Ethernet frames by looking at the
source MAC address to ㈀ll the mac-address-table. Ethernet frames however are not
forwarded to the destination. It takes 15 seconds to move to the next state called the
forwarding state.
Forwarding state: This is the ㈀nal state of the interface and ㈀nally the interface will forward
Ethernet frames so that we have data transmission!
This means it takes 30 seconds in total to move from listening to forwarding…that’s not really
fast right? This will happen on all interfaces on the switch.
When an interface is in blocking mode and the topology changes, it’s possible that an interface
that is currently in blocking mode has to move to the forwarding state. When this is the case,
the blocking mode will last for 20 seconds before it moves to the listening state. This means
that it takes 20 (blocking) + 15 (listening) + 15 (learning) = 50 seconds before the interface is in
the forwarding state.
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 3/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
30 seconds is a long time right? Any modern PC with a SSD drive boots faster than that. Here’s
an overview of the di漀椀erent port states:
Blocking No No 20 seconds
Listening No No 15 seconds
So what does this look like on an actual Cisco switch? Let me show you an example of an
interface that is connected to a router. I just unplugged and plugged the cable (or do a”shut”
and “no shut”) and the ㈀rst time we run the show command it looks like this:
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0019.569d.5700
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
You can see that the role of the port is designated and the status is listening. Keep refreshing
this show command and after ~ 15 seconds it looks like this:
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 4/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0019.569d.5700
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
It has moved to the learning state and after another ~ 15 seconds it looks like this:
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0019.569d.5700
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Very nice, you just witnessed an interface moving through the di漀椀erent spanning tree port
states. A better method to see the changes is by enabling a debug:
When we disable and enable the interface again you can see it moving through the spanning
tree port states in realtime:
SW1#
00:14:57: STP: VLAN0001 Fa0/1 ‐> listening
00:15:12: STP: VLAN0001 Fa0/1 ‐> learning
00:15:27: STP: VLAN0001 Fa0/1 ‐> forwarding
That's pretty neat right? I hope this tutorial has helped you to understand the spanning tree
port states! If you have any questions, feel free to leave a comment.
« Previous Lesson
PVST (Per VLAN Spanning Tree)
Next Lesson
Spanning-Tree TCN (Topology
Change Noti ㈀cation)
»
Home › Forums › Spanning Tree Port States
This topic contains 14 replies, has 9 voices, and was last updated by Rene Molenaar 6 days,
15 hours ago.
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 6/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
Veerender K
Member
When we connect a cable on Switch which runs STP on a unused port, will whole switch run STP
on all ports and all ports move from Listening — Learning–Forwarding mode?
Regards,
Veerender
Rene Molenaar
Keymaster
Hi Veerender,
It’s done per interface, not for all interfaces on the switch.
Rene
francesco r
Participant
Hello, Rene
if we suppose that we have 3 switch..we power on them…after booting,
the port of each switch connected each other goes into listening ,because they need to do an
election…(in this 15 seconds a port is learning if it will be root port,designated port , or non
designated port. Once understood, if it wiil be non designated goes into blocking state
otherwise it’s going into learning and then forwarding).Now the switch network will be
converged….If now I focus at the port in blocking state ,it receive BPDU by a peer designatet
port,every 2 sec, and store that bpdu value (here now we can speak of the value of MaxAge-
MessageAge..20 sec)..At one time the blocking port doesn’t receive bpdu from it’s designated
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 7/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
switch, this one send a TCN to root bridge out it’s root-port, but my blocking port has to wait 20
second( MaxAge-messageAge) before going into listening state and can send out BPDu frame…
Meanwhile this switch with this blocking port has to lower the aging time??? But I don’t
understand who say to switch ..lower the aging time
Rene Molenaar
Keymaster
Hi Francesco,
The TCN is the trigger to set the aging time, the originating switch will reduce its aging the time
and other switches will as soon as they receive the TCN.
Rene
christopher c
Participant
That was very good, I would also like to see the same output from a non root switch, and see at
which point it changes from designated to root or non-designated. I guess the whole point of
this is I can set it up myself and watch what happens.
Chris
Rene Molenaar
Keymaster
Hi Chris,
The output of a non-root bridge will be the same if you connect a new cable, it will go through
the listening > learning > forwarding states. It might be interesting though to look at an
interface that is currently in blocking mode.
Just take two switches, enable the debug I did and take a look…good exercise
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 8/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
Rene
Ravi J
Participant
Hi Rene,
In blocking port state,switch not able to receive and transmit any BPDUs,then How blocking
port state move to listening state.
–Ravi
Andrew P
Moderator
Ravi,
In a Blocking state, the switch does receive BPDUs. In fact, it is the act of receiving inferior
BPDUs that keeps the state as Blocking. Should an interface stop receiving BPDUs, then it will
transition into a Listening-Learning-Forwarding state.
Ravi J
Participant
Hi Andrew,
Thanks for clearing concept.
-Ravi
Mohammad Hasanuz Z
Participant
Hlw Rene,
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 9/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
Root Port , Designated port will send & Receive BPDU right ??
How a Alternate port know , It have to move Listening, Learning , Forwording after Root port
down as per attached Topology on switchC.
br/
zaman
Andrew P
Moderator
Mohammad,
The concept of an Alternate port was introduced with Rapid Spanning Tree. This feature takes
over what the traditional (802.1 D) spanning-tree enhancement of “uplink-fast” used to do. The
Alternate port serves as a “hot-standby” for a switch’s Root Port, but Alternate Port is
considered to be in a Discarding state (Discarding is the RSTP term for Blocking, Listening, and
Disabled for spanning-tree).
This means that an Alternate port can receive BPDUs but will not send them. As soon as a Root
Port fails, the Alternate Port will immediately transition to forwarding, skipping the Learning
state (there is no such thing as “Listening” in Rapid Spanning Tree).
You are correct that Root and Designated ports both send and receive BPDUs.
Gagan c
Participant
OMG,This is the easiest way to understand the stp concept and ports state.
sze jie k
Participant
Hi Rene,
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 10/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
q1) What is the di漀椀erence between a port in BLOCK and LISTEN state ? LISTEN does send and
receive but BLOCK only receives BPDUs ?
q2) I saw an amber light on a port in BLOCK state, but if we have PVST and we con ㈀gure
di漀椀erent root bridges, how does the switch
re㘀ect a ND port that is BLOCK in 1 VLAN but not BLOCK in another VLAN ?
q3) “Only a root or designated port will move to the listening state”
what is the state for the interfaces/ports before everything (e.g. root bridge, root port,
designated port) are determined ? — still listening ?
Regards,
Alan
Rene Molenaar
Keymaster
Hi Alan,
1. In the blocking state, the switch only receives BPDUs but does not send them. In the listening
state, we send and receive BPDUs.
2. If it’s an access interface then it will be amber. Trunk interfaces will always have a green led
(since you can have more than one VLAN).
3. When you ㈀rst enable the interface, it will start in the listening state.
Rene
Author
Posts
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 11/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
Attachments:
Выберите файл Файл не выбран
Add another ㈀le
Submit
About NetworkLessons.com
Hello There! I'm René Molenaar (CCIE #41726), Your Personal Instructor of
Networklessons.com. I'd like to teach you everything about Cisco, Wireless and
Security. I am here to Help You Master Networking!
Read my story
Social Fans
14,267 7,929 1,589
FANS FOLLOWERS SUBSCRIBERS
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 12/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com
New Lessons
Disclaimer
Privacy Policy
Support
Spanning Tree Port States written by Rene Molenaar average rating 4.9/5 - 22 user ratings
https://networklessons.com/cisco/ccieroutingswitching/spanningtreeportstates/ 13/13