14 Spanning Tree Protocol
This chapter covers
- How layer 2 loops lead to broadcast storms
- How STP detects and prevents layer 2 loops
- The various STP port roles, states, and timers
- Using PortFast to accelerate STP convergence
This chapter is about Spanning Tree Protocol (STP), a protocol that runs on all Cisco switches by default and solves a significant problem in LANs: layer 2 loops, which result in frames looping around the network indefinitely. STP is mentioned in exam topic 2.5: Describe the need for and basic operations of Rapid PVST+ Spanning Tree Protocol and identify basic operations. Exam topic 2.5 specifically refers to the rapid version of the protocol, the topic of chapter 15. However, to understand Rapid STP, we first have to cover the original protocol, and that’s what we’ll do in this chapter.
14.1 The need for STP
In chapter 7 (IPv4 Addressing), we briefly covered the fields of the IPv4 header; one of those fields is the Time-to-Live (TTL) field, which is decremented each time a router forwards a packet. When the value in the TTL field reaches 0, the packet is dropped, preventing packets from looping around the network indefinitely as the result of a misconfiguration; this is called a routing loop or layer 3 loop.