0% found this document useful (0 votes)
20 views13 pages

Spanning Tree Port States

Uploaded by

Neha Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views13 pages

Spanning Tree Port States

Uploaded by

Neha Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

22.06.2016 Spanning Tree Port States | NetworkLessons.

com

Search...

Table of Contents
CCIE Routing & Switching

Unit 1: Preparation
Unit 2: Switching
Static MAC Address Table Entry

Cisco Switch Virtualization

Introduction to VLANs (Virtual LAN)

How to con ㈀gure VLANs

802.1Q Encapsulation

How to con ㈀gure a trunk between switches

Cisco DTP (Dynamic Trunking Protocol) Negotiation

802.1Q Tunneling (Q-in-Q)

Etherchannel over 802.1Q Tunneling

How to change the Native VLAN

VTP (VLAN Trunking Protocol)

VTP Version 3

Protected Port

Private VLANs (PVLAN)

Introduction to Spanning-Tree

Spanning-Tree Cost Calculation

PVST (Per VLAN Spanning Tree)

Spanning-Tree Port States

Spanning-Tree TCN (Topology Change Noti ㈀cation)

Spanning-Tree Portfast

Spanning-Tree UplinkFast

https://networklessons.com/cisco/ccie­routing­switching/spanning­tree­port­states/ 1/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com

Spanning-Tree Backbone Fast

Rapid Spanning-Tree

Rapid Spanning-Tree Con ㈀guration

MST (Multiple Spanning-Tree)

Spanning-Tree BPDUGuard

Spanning-Tree BPDUFilter

Spanning-Tree RootGuard

Spanning-Tree LoopGuard and UDLD

FlexLinks

Introduction to Etherchannel

Layer 3 Etherchannel

Cisco IOS SPAN and RSPAN

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

You are here: Home » Cisco » CCIE Routing & Switching

Spanning Tree Port States


22 votes

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.

This is what happens as soon as you plug in a cable:

https://networklessons.com/cisco/ccie­routing­switching/spanning­tree­port­states/ 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!

When a port is not a designated or root port it will be in blocking mode.

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/ccie­routing­switching/spanning­tree­port­states/ 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:

State Forward Frames Learn MAC Addresses Duration

Blocking No No 20 seconds

Listening No No 15 seconds

Learning No Yes 15 seconds

Forwarding Yes Yes –

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:

SW1#show spanning‐tree vlan

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

Bridge ID Priority 32769 (priority 32768 sys‐id‐ext 1)


Address 0019.569d.5700
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type


‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ ‐‐‐‐ ‐‐‐ ‐‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
‐‐
Fa0/1 Desg LIS 19 128.4 P2p

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/ccie­routing­switching/spanning­tree­port­states/ 4/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com

SW1#show spanning‐tree vlan 1

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

Bridge ID Priority 32769 (priority 32768 sys‐id‐ext 1)


Address 0019.569d.5700
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type


‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ ‐‐‐‐ ‐‐‐ ‐‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
‐‐
Fa0/1 Desg LRN 19 128.4 P2p

It has moved to the learning state and after another ~ 15 seconds it looks like this:

SW1#show spanning‐tree vlan 1

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

Bridge ID Priority 32769 (priority 32768 sys‐id‐ext 1)


Address 0019.569d.5700
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15

Interface Role Sts Cost Prio.Nbr Type


‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ ‐‐‐‐ ‐‐‐ ‐‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
‐‐
https://networklessons.com/cisco/ccie­routing­switching/spanning­tree­port­states/ 5/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com

Fa0/1 Desg FWD 19 128.4 P2p

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:

SW1#debug spanning‐tree events


Spanning Tree event debugging is on

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.

Rate this Lesson:

« 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/ccie­routing­switching/spanning­tree­port­states/ 6/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com

Viewing 14 posts - 1 through 14 (of 14 total)


Author
Posts | Subscribe
November 9, 2014 at 08:15 #11698 Reply

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?

Is the whole switch operation a漀椀ected? or the port we just connected?

Regards,
Veerender

November 9, 2014 at 11:06 #11699 Reply

Rene Molenaar
Keymaster
Hi Veerender,

It’s done per interface, not for all interfaces on the switch.

Rene

May 10, 2015 at 17:53 #11700 Reply

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/ccie­routing­switching/spanning­tree­port­states/ 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

May 11, 2015 at 13:13 #11701 Reply

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

September 2, 2015 at 14:05 #11702 Reply

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

September 2, 2015 at 15:46 #11703 Reply

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/ccie­routing­switching/spanning­tree­port­states/ 8/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com

Rene

May 6, 2016 at 10:24 #23881 Reply

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

May 6, 2016 at 14:11 #23887 Reply

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.

May 7, 2016 at 16:00 #23897 Reply

Ravi J
Participant
Hi Andrew,
Thanks for clearing concept.

-Ravi

May 8, 2016 at 15:51 #23905 Reply

Mohammad Hasanuz Z
Participant
Hlw Rene,

https://networklessons.com/cisco/ccie­routing­switching/spanning­tree­port­states/ 9/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com

Root Port , Designated port will send & Receive BPDU right ??

Alternate Port will send and receive BPDU ????

How a Alternate port know , It have to move Listening, Learning , Forwording after Root port
down as per attached Topology on switchC.

br/
zaman

May 8, 2016 at 23:45 #23916 Reply

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.

June 4, 2016 at 16:38 #24717 Reply

Gagan c
Participant
OMG,This is the easiest way to understand the stp concept and ports state.

June 11, 2016 at 20:21 #24821 Reply

sze jie k
Participant
Hi Rene,

https://networklessons.com/cisco/ccie­routing­switching/spanning­tree­port­states/ 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

June 15, 2016 at 21:02 #25668 Reply

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

Viewing 14 posts - 1 through 14 (of 14 total)


Reply To: Spanning Tree Port States
b i link b-quote del img ul ol li code close tags

https://networklessons.com/cisco/ccie­routing­switching/spanning­tree­port­states/ 11/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com

Please put code in between `backticks` or use the CODE button.


To place inline images, please use any image share service (such as TinyPic or Imgur) and use
the IMG button!

Notify me of follow-up replies via email

Maximum  ㈀le size allowed is 2048 KB.

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

Highest Rated Lessons


MPLS Layer 3 VPN Con ㈀guration
(25 votes)

VRF Lite Con ㈀guration on Cisco IOS


(23 votes)

https://networklessons.com/cisco/ccie­routing­switching/spanning­tree­port­states/ 12/13
22.06.2016 Spanning Tree Port States | NetworkLessons.com

Cisco Portfast Con ㈀guration


(20 votes)

IPv6 Address Types


(18 votes)

EIGRP Stub Explained


(17 votes)

New Lessons

Introduction to Cisco IOS XE


ERSPAN Con ㈀guration on Cisco IOS XE
IGMP Filter
IGMP Snooping without Router
Cisco Group Management Protocol (CGMP)

Disclaimer
Privacy Policy
Support

Spanning Tree Port States written by Rene Molenaar average rating 4.9/5 - 22 user ratings

https://networklessons.com/cisco/ccie­routing­switching/spanning­tree­port­states/ 13/13

You might also like