Spanning-Tree UplinkFast

Hello florian.

To answer your first question:

But this is only the case if uplink-fast is configured, right?
If it is not configured the port would stay in block state for 20 sec and then move through the other states!?

Yes, my description in the above post is for situations where uplinkfast is not implemented. In case uplinkfast is configured, this is reduced from 30 seconds to almost 0 seconds. Cisco explains it like so:

The UplinkFast feature is based on the definition of an uplink group. On a given switch, the uplink group consists of the root port and all the ports that provide an alternate connection to the root bridge. If the root port fails, which means if the primary uplink fails, a port with next lowest cost from the uplink group is selected to immediately replace it.

This is found at http://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/10575-51.html#uplink_fast_theory

Concerning your second question:
When does a port actually stay in blocking state before it moves to listening and so on?
If the root port is down the blocking interface goes directly to listening?
And Uplink-fast just helps to move the port directly to forwarding, right?

A port remains in blocking state as long as there is another active path to the root bridge. To say it another way, a port remains in blocking state when STP has converged. If there is a topology change, ports do not remain in a blocked state for any period of time before moving to listening and learning. So yes, “if the root port is down, the blocking interface goes directly to listening” in normal STP operation. If you use uplinkfast, the listening and learning states are skipped.

It is only during root bridge elections that a port remains in a blocking state for 20 seconds. If a topology change occurs but the root bridge does not change, then this extra blocking state for 20 seconds is skipped.

A very clear step by step explanation can be found here:

Uplink failure without uplinkfast enabled: http://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/10575-51.html#uplink_fail

Uplink failure with uplinkfast enabled: http://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/10575-51.html#uplink_fast_fail

I hope this has been helpful!

Laz