07-27-2017 03:56 PM - edited 03-08-2019 11:30 AM
Hello
When switch will bootup. it will goes to the blocking state or Listening state?
07-28-2017 03:12 AM
Hello,
STP is a industry standard. So every OME has to follow the standard rules.
STP switch port states:
https://en.wikipedia.org/wiki/Spanning_Tree_Protocol
If a suggestion helps you mark it answered.It will help others too....
Regards,
Moses.
07-28-2017 04:30 AM
Hello
Thanks for your reply.
I know about STP Port States. But my question is.... When switch will bootup. it will goes to the blocking state or Listening state?
07-30-2017 08:02 AM
Hi,
Good question - The ports will be originally in a BLK state to prevent loops in the network as upon bring up we have no idea of the topology. Here's an example output that demonstrates this behavior immediately after reloading a switch:
Switch# show system uptime
System start time: Sun Jul 30 14:53:59 2017 << Shows bring up time
System uptime: 0 days, 0 hours, 2 minutes, 27 seconds
Kernel uptime: 0 days, 0 hours, 3 minutes, 37 seconds
Looking at VLAN 2374 for this example:
Switch# sh spanning-tree internal event-history tree 2374 int e1/1
VDC01 VLAN2374 <Ethernet1/1>
0) Transition at 345652 usecs after Sun Jul 30 14:54:38 2017
State: DIS Role: Unkw Age: 0 Inc: no [STP_PORT_EV_UP]
1) Transition at 346253 usecs after Sun Jul 30 14:54:38 2017
State: DIS Role: Desg Age: 0 Inc: no [STP_PORT_ROLE_CHANGE]
2) Transition at 346704 usecs after Sun Jul 30 14:54:38 2017
State: BLK Role: Desg Age: 0 Inc: no [STP_PORT_STATE_CHANGE]
3) Transition at 163463 usecs after Sun Jul 30 14:54:53 2017
State: LRN Role: Desg Age: 0 Inc: no [STP_PORT_STATE_CHANGE]
4) Transition at 670740 usecs after Sun Jul 30 14:55:07 2017
State: FWD Role: Desg Age: 0 Inc: no [STP_PORT_STATE_CHANGE]
Final State:
Switch# show span vlan 2374
VLAN2374
Spanning tree enabled protocol rstp
Root ID Priority 35142
Address 00fe.c80e.2715
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 35142 (priority 32768 sys-id-ext 2374)
Address 00fe.c80e.2715
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth1/1 Desg FWD 2 128.1 P2p <<<
Hope this helps.
- Andrea
07-30-2017 08:33 AM
Hello
I heard in some video lectures, when we attach computer with switch port then. It will skip blocking state and it will take 30 seconds.
In some videos i heard when we bootup the switch then all port will goes to blocking port first.
I am confuse .
Regards
07-30-2017 11:09 AM
Hi,
On boot up or when you attach a computer to a switchport, the port will be Disabled and then Blocking - Once the Forward Delay timer expires, the port enters the learning state. When the Forward Delay timer expires a second time, the port is transitioned to the forwarding or blocking state. This is where the 30 seconds comes from.
When you enable PortFast on a switch or trunk port, the port is immediately transitioned to the spanning tree forwarding state making the transition much faster - This is only for host ports where you are certain a switch will not be connected.
Here's an example when I connect my laptop to a switchport:
+ Connecting my laptop to Eth4/1 - I have the port shutdown to illustrate the entire process:
Switch# sh int e4/1
Ethernet4/1 is down (Administratively down)
+ Immediately as I "no shut" this port to simulate a linkup:
Switch# sh span int e4/1
Vlan Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
VLAN0012 Desg BLK 2000 128.513 P2p
+ 15 seconds later:
Switch# sh span int e4/1
Vlan Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
VLAN0012 Desg LRN 2000 128.513 P2p
+ 15 seconds later:
Switch# sh span int e4/1
Vlan Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
VLAN0012 Desg FWD 2000 128.513 P2p
+ Verification:
Switch# show spanning-tree internal event-history tree 12 interface e4/1
VDC02 VLAN0012 <Ethernet4/1>
0) Transition at 52998 usecs after Sun Jul 30 13:49:11 2017
State: DIS Role: Unkw Age: 0 Inc: no [STP_PORT_EV_UP]
1) Transition at 53998 usecs after Sun Jul 30 13:49:11 2017
State: DIS Role: Desg Age: 0 Inc: no [STP_PORT_ROLE_CHANGE]
2) Transition at 54998 usecs after Sun Jul 30 13:49:11 2017
State: BLK Role: Desg Age: 0 Inc: no [STP_PORT_STATE_CHANGE]
3) Transition at 819998 usecs after Sun Jul 30 13:49:25 2017
State: LRN Role: Desg Age: 0 Inc: no [STP_PORT_STATE_CHANGE]
4) Transition at 820998 usecs after Sun Jul 30 13:49:40 2017
State: FWD Role: Desg Age: 0 Inc: no [STP_PORT_STATE_CHANGE]
Hope that clarifies it a bit better.
- Andrea
07-30-2017 04:44 PM
hi
Why listen state skipped ?
if first state is blocking state then total delay time should be 50 Sec.
04-30-2018 07:26 AM
Hi there,
That would be because Listening state is not part of Rapid-STP which is the STP mode my switch is running.
There are only three port states left in RSTP that correspond to the three possible operational states. The 802.1D disabled, blocking, and listening states are merged into a unique 802.1w discarding state.
https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html#anc3
Thanks!
06-04-2019 06:09 AM
Hi,
Please can a port from learning state go to blocking state ?
06-04-2019 06:28 AM
Hello gmati,
yes in traditional STP ( not rapid) the port can go from learning to blocking state.
In traditional STP listening and learning states are transitory states each one has duration of Forward Delay timer (default 15 seconds)
Rapid STP introduces roles and states and also the handshake of proposed role with the neighbor switch.
In point to point inter switch links with Rapid STP the negotiation is performed via handshake and ports can move to forwarding state (Designated port or root port) or to Alternate Blocking or other without the need to wait for Forward Delay timer to expire two times.
Hope to help
Giuseppe
06-04-2019 07:29 AM
06-04-2019 08:08 AM
Hi,
Another question why in RSTP they moved listening state not both listening and learning state ?
thank you
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide