Join Lazaro Diaz for an in-depth discussion in this video Introducing Spanning-Tree Protocol, part of CCNA Cert Prep: ICND2.
- Spanning-Tree Protocol, or STP, prevents switching loops in the layer 2 portion of our network. STP is on by default, but it only really comes alive when we have two or more switches interconnected with each other. When you connect two or more layer 2 devices, an election is run to designate the root bridge. The election decides which switch will become the root bridge, as well as the designated blocked and backup ports on switches designated as non-root bridges.
This will prevent thwarting of bridge protocol data units. This election has several criteria it uses in order to perform this decision. First, it will look at the bridge ID number, which is a combination of the bridge priority number and the MAC address of the switch. In reality, the first number the election checks is the bridge priority number. If all switches are left at default, the priority number is not enough to elect a root bridge.
The election will then look for the switch with the lowest MAC address to assign the root bridge. On the other switches, ports need to be blocked to prevent switching loops. Now that we have a root bridge, which switch will STP choose to block a port on? Again, if the priority numbers are left at default, the switch with the highest MAC address is selected, because all the bridge priority numbers are the same.
Once it locates the switch with the highest MAC address, STP must then determine which port on that switch to block. The slowest bandwidth port gets blocked. Or, if all ports are equal, then the highest port on the switch will get blocked from forwarding BPDUs. The ports that are neither highest or lowest are non-designated forwarding ports.
Once the root bridge has been elected and the correct number of ports have been blocked, the network can start forwarding BPDUs. Usually, this will take anywhere from 30 to 90 seconds depending on the type of STP you are running. This is important to know and likely something you will encounter on the CCNA exam.
Once all elections are run, the system continues to monitor the network. And as topology changes occur, STP makes adjustments to keep the network connected.
- LAN switching
- The Spanning-Tree Protocol
- Backing up and restoring Cisco devices
- IP services (FHRP, syslog, GLBP, and SNMP v2 and v3)
- Configuring EIGRP
- IP routing via OSPF
- Setting up wide area networks (WANs) with PPP and frame relay
- Understanding virtual private networks (VPNs)
Using Packet Tracer and cabling, you'll learn how to combine these protocols and technologies to create redundant switch networks that are stable and fast. Along the way, Laz provides practical examples of networking challenges that you'll encounter in the exam and in real life.