Copyright

Spanning Tree Protocol: Definition, Uses & Limitations

Instructor: Vignesh Sivabalan
Spanning Tree Protocol (STP) is a layer 2 protocol that prevents loops among the networking devices on various network segments. The definition, working, uses and limitations of STP are discussed in this lesson.

Spanning Tree Protocol

Spanning Tree Protocol (STP) helps in making a loop-free network by tracking and monitoring all the links and shutting down some of the redundant links. Let us consider an example to better understand the concept of loops in network switches.


stp


The network bridge is created with the help of a switch which has two links for reaching the same destination. One is the main or primary link and the other is the redundant link. The major purpose of this redundant link is to provide network availability when the main link fails. With this advantage, the redundant links also have some disadvantages. They create network loops which flood frames. The Spanning Tree Protocol prevents loops and other redundant links in a network. Spanning Tree protocols are mainly used in Switches but Switches are also referred to as multi-port bridges and thus STP uses the term bridges.

Functions of a Spanning Tree Protocol

In a LAN (Local Area Network), many computers use the shared communication paths. If many computers in the network send or receive data at the same time, the overall network performance gets affected. Sometimes, the entire network is brought to halt because of simultaneous data transmission. To prevent this condition, the LAN can be divided into two or even more network segments having a device called bridge (actually it is switch) that connects each two segments. Each data sent from a segment passes through the bridge before it gets sent to the destination. The bridge or the switch determines if the message is sent to the same segment or a different segment and forwards accordingly.

Each switch (bridge) learns which computer is located on which network segment by forwarding a message to all segments and this process is called as flooding. The bridge learns the destination of each computer by the reply received from those computers. The bridge uses this location information stored in a table for forwarding the subsequent messages. The method of allowing the bridges to determine each network through its experience is called transparent bridging.

It is possible to add a redundant bridge in each network segment for overcoming the failure of the primary bridge. Both these bridges understand the network topology though only one bridge is active at once. This is done by sending BPDU (Bridge Protocol Data Units) packets. Spanning Tree Protocol is a data link layer (layer 2) protocol which sends data back and forth finding the switches organization on network. The information collected is used to form a logical tree which defines the exact interconnection between network switches. STP sends network packets known as BPDUs or BDUs for building the information. The data in BPDUs determine the network topology of switches.

How STP Work to Prevents Loops in a Network?

STP avoids bridge loops that results in infinite looping. STP ensures that each bridge uses only the efficient path among various paths. The STP algorithm automatically recalculates the alternative path when the best path fails.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 160 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create An Account
Support