The Need for Spanning Tree

Without the Spanning Tree Protocol (STP), frames would loop for an indefinite period of time in networks with physically redundant links. To prevent looping frames, STP blocks some ports from forwarding frames so that only one active path exists between any pair of LAN segments (collision domains). The result of STP is good: Frames do not loop infinitely, which makes the LAN usable. However, the network uses some redundant links in case of a failure, but not for balancing traffic.

To avoid loops, all bridging devices, including switches, use STP. STP causes each interface on a bridging device to settle into a blocking state or a forwarding state. Blocking means that the interface cannot forward or receive data frames. Forwarding means that the interface can send and receive data frames. By having a correct subset of the interfaces blocked, a single currently active logical path will exist between each pair of LANs.

STP behaves identically for a transparent bridge and a switch. So, the terms bridge, switch, and bridging device all are used interchangeably when discussing STP.

A simple example makes the need for STP more obvious. Remember, switches forward frames sent to both unknown unicast MAC addresses and the broadcast address, out all interfaces (except the incoming interface). Figure 9-10 shows that a single frame, sent by Larry, loops forever because the network has redundancy but no STP.

Figure 9-10 Network with Redundant Links but Without STP: Frame Loops Forever

_ Archie

Figure 9-10 Network with Redundant Links but Without STP: Frame Loops Forever

Powered Off!

_ Archie

Larry

Larry sends a single unicast frame to Bob's MAC address, but Bob is powered off, so none of the switches has learned Bob's MAC address yet. Bob's MAC address would be an unknown unicast address at this point in time. Therefore, frames addressed to Bob's MAC address will be forwarded by each switch out every port. These frames will loop forever—or at least until time is no more! Because the switches never learn Bob's MAC address (remember, he's powered off and can send no frames), they keep forwarding the frame out all ports, and copies of the frame go around and around.

Similarly, bridges and switches forward broadcasts on all interfaces, so if any of the PCs sent a broadcast, the broadcast would loop indefinitely as well.

One way to solve this problem is to design the LAN with no redundant links. However, most network engineers will not design a multiswitch campus LAN without physical redundancy between the switches, similar to the network in Figure 9-10. Eventually, a switch or a link will fail, and you want the network to still be available. The right solution includes bridged/ switched networks with physical redundancy, using STP to dynamically block some interface(s) so that only one active path exists between two endpoints at any instant in time.

Was this article helpful?

0 0

Post a comment