Spanning-Tree Protocol (STP)


Back before it was purchased and renamed Compaq, a company called Digital Equipment Corporation (DEC) created the original version of the Spanning-Tree Protocol (STP). The IEEE later created its own version of STP called 802.1d. All Cisco switches run the IEEE 802.1d version of STP, which isn’t compatible with the DEC version.

STP’s main task is to stop network loops from occurring on your Layer 2 network (bridges or switches). It vigilantly monitors the network to find all links, making sure that no loops occur by shutting down any redundant ones. The Spanning-Tree Protocol (STP) uses the spanning-tree algorithm (STA) to first create a topology database, and then search out and destroy redundant links. With STP running, frames are only forwarded on the premium, STP-picked links.

Before describing the details of how STP works in the network, you need to understand some basic ideas and terms and how they relate within the Layer 2 switched network:

Spanning-Tree Protocol A bridge protocol that uses the STA to find redundant links dynamically and create a spanning-tree topology database. Bridges exchange Bridge Protocol Data Unit (Bpdu) messages with other bridges to detect loops and then remove them by shutting down selected bridge interfaces.

Root bridge This is the bridge with the best bridge ID. With STP, the key is for all the switches in the network to elect a root bridge that becomes the focal point in the network. All other decisions in the network—like which port is to be blocked and which port is to be put in forwarding mode—are made from the perspective of this root bridge.

Bridge Protocol Data Unit (Bpdu) All the switches exchange information to use in the selection of the root switch, as well as for subsequent configuration of the network. Each switch compares the parameters in the Bpdu that they send to one neighbor with the one that they receive from another neighbor.

Bridge ID This is how STP keeps track of all the switches in the network. The bridge ID is determined by a combination of the bridge priority (32768 by default on all switches) and the base MAC address. The lowest bridge ID becomes the root bridge in the network.

Non-root bridge All bridges that are not the root bridge. These exchange Bpdu with all bridges and update the STP topology database on all switches, preventing loops and providing a measure of defense against link failures. A non-root bridge designates its root port as the one on which it is receiving Bpdus with the lowest cost to root, breaking ties in favor of the lowest port ID. A non-root bridge forwards the Bpdus received on its root port out its designated ports (defined later) after incrementing the Bpdu cost. A bridge will forward the Bpdu that caused it to become a non-root bridge on all ports (except the incoming port).

Root port Always the link directly connected to the root bridge, or the shortest path to the root bridge. If more than one link connects to the root bridge, then a port cost is determined by checking the bandwidth of each link. The lowest cost port becomes the root port.

Designated port Either a root port or a port that has been determined as having the best cost—it is designated as a forwarding port.

Port cost Determined when multiple links are used between two switches and none are root ports. The cost of a link is determined by the bandwidth of a link.

Non-designated port A port with a lower cost than the designated port that is put in blocking mode.

Forwarding port A port that forwards frames.

Blocked port A port that does not forward frames in order to prevent loops.

start sidebar
Real World Scenario—When to Worry about Spanning-Tree Protocol

If you have less than six switches in your internetwork, then depending on the amount of users in your network, you typically would just let the STP do its job and not worry about it.

However, if you have dozens of switches and hundreds of users in your network, then it’s time to consider how the STP is running. If you do not set the root switch in this larger switched network, your STP may never converge between switches, which could bring your network down.

Setting the timers and root switch are covered in the Sybex CCNP: Switching Study Guide.

end sidebar




CCDA. Cisco Certified Design Associate Study Guide
CCDA: Cisco Certified Design Associate Study Guide, 2nd Edition (640-861)
ISBN: 0782142001
EAN: 2147483647
Year: 2002
Pages: 201

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net