James C. answered 12d
Computers, Network and basic tutoring.
1. Port states in STP:
STP uses five port states. Disabled, Blocking, Listening, Learning, and Forwarding. Blocking is where the port is basically waiting and not passing traffic. Listening and Learning are the two stages it goes through before it can actually forward anything.
2. How STP calculates cost:
STP uses the bandwidth of the link to figure out the cost. Faster links have lower cost. For example, a 1‑gig port has a cost of 4, and a 100‑meg port has a cost of 19. If a gig port connects to a 100‑meg port, the whole link runs at 100 meg, so the cost is 19 on both sides.
3. How long it takes to go from blocking to forwarding:
Classic STP takes time because it goes through Listening and Learning. Each one is 15 seconds. So that’s 30 seconds total before it can forward traffic. If the switch has to wait out the Max Age timer first, that adds another 20 seconds, which is where the “50 seconds” number comes from.
4. Types of STP:
The main versions you’ll see are the original 802.1D STP, RSTP (802.1w), PVST+, Rapid‑PVST+, and MSTP. RSTP and Rapid‑PVST+ are the faster ones. MSTP lets you group VLANs together so you don’t have a separate STP instance for every single VLAN.