Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco Press CCNA ICND 2004 - Cisco Press.pdf
Скачиваний:
122
Добавлен:
24.05.2014
Размер:
13.19 Mб
Скачать

36 Chapter 2: Spanning Tree Protocol

Foundation Topics

Spanning Tree Protocol

Without 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 both good and bad. Frames do not loop infinitely, which makes the LAN usable, which is good. However, the network does not actively take advantage of some of the redundant links, because they are blocked to prevent frames from looping. Some users’ traffic travels a seemingly longer path through the network, because a shorter physical path is blocked, which is bad. However, the net result (yep, I wrote that on purpose!) is good. If frames looped indefinitely, the LAN would be unusable. So, STP has some minor unfortunate side effects compared to the major benefit of letting you build redundant LANs.

For the INTRO exam, you need to know why STP is necessary, and a few details about how it works. For the ICND exam, you need to know the details of STP, as defined in IEEE 802.1d, in more detail. This chapter includes a more-detailed explanation of how 802.1d STP works, including root election and how ports are placed in the forwarding and blocking states. This chapter also covers the newer Rapid Spanning Tree Protocol (RSTP), as defined in IEEE 802.1w.

What IEEE 802.1d Spanning Tree Does

The spanning tree algorithm places each bridge/switch port in either a forwarding state or a blocking state. All the ports in forwarding state are considered to be in the current spanning tree. The collective set of forwarding ports creates a single path over which frames are sent between Ethernet segments. Switches can forward frames out ports and receive frames in ports that are in forwarding state; switches do not forward frames out ports and receive frames in ports that are in blocking state.

Figure 2-1 shows a simple STP tree with one port on SW3 in blocking state.

Spanning Tree Protocol 37

Figure 2-1 Network with Redundant Links and STP

 

Larry

Archie

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0/26

0/26

 

 

 

 

 

SW1

 

 

SW2

 

0/27

 

0/27

Blocking

0/27

0/26

SW3

Bob

When Larry sends a broadcast frame, the frame does not loop. SW1 sends a copy to SW3, but SW3 cannot forward it to SW2 out its port 0/27 because it is blocking. SW1 sends the broadcast to SW2, who forwards it to SW3, but SW3 ignores frames that enter port 0/27. However, STP causes some frames to use a longer physical path for the sake of preventing loops. For instance, if Archie wants to send a frame to Bob, the frame has to go from SW2 to SW1 and then to SW3—a longer path than is physically required. STP prevents the loops, but you then have to live with a less-efficient path for some traffic. Of course, at LAN speeds, a user typically wouldn’t notice any difference in performance unless the network was also badly congested as a result of the traffic patterns.

If the link between SW1 and SW3 fails, STP converges so that SW3 no longer blocks on its 0/27 interface. For instance, in Figure 2-2, that link has failed, and STP has converged.