본문 바로가기
NETWORK

Spanning Tree - Operating Principles & Calculation Methods

by networker 2024. 3. 20.
728x90
반응형

This time, we're going to talk about the Spanning Tree Protocol.

 

Before doing STP, you need to know exactly why Looping occurs so that you can easily understand why this STP is used.

 

If you don't know about Looping, I recommend you study Looping first and watch STP.

 

 

1.  Spanning Tree Protocol

 

 

: Maintaining a loop-free network (which logically blocks a particular port and does not forward frames to that link, providing a Redundant free from loops)

 

 

※ Terminology Summary for STP

 

1) BPDU

: In order to prevent a loop phenomenon by detecting a loop situation and blocking an appropriate port, there must be a way to inform the switch's own configuration information and network changes, and this information is exchanged by the BPDU.

 

- Communicate information between the switch and the switch every 2 seconds - monitoring spanning tree status

 

 

2) Bridge ID

: Bridge Priority + Bridge MAC Address

 

 

3) Path Cost

: Cost of getting from Hanswitch to another switch

 

 

4) Root Bridge

: Bridge as the basis for doing STP

 

 

5) Root Port

: Fastest port to go to Root Bridge (nearest port)

 

 

6) Designated Port

: Link to each other between bridge or switch

 

 

7) Non Designnated

: Root Port, the rest of the port that is not Designated Port

 

 

8) Hello Time

: Hello BPDUs that the Root Bridge sends every two seconds to the switch connected to it.

 

 

 

 

1. Select root bridge: nominate one bridge as root bridge in a given broadcast domain

 

 

2. Designated port / Root port select

: The Spanning Tree algorithm used by STP is as follows.

 

- Select the root switch from all switches.

- Select one root port on all non-root switches.

- Select one Designated port per switch segment.

- A port that is neither the root port nor the designated port is called an alternate port and an alternate port is always blocked.

 

 

 

2. STP Port Status Changes

 

 

 

 

1. Disable

: Port is broken and cannot be used or shut down [data not sent, MAC Address not learned, BPDU not received]

 

 

2. Blocking

: When the first switch is turned on or disabled port is revived, the port is in a blocking state [data not sent, MAC Address not learned, BPDU received]

 

 

3. Listening

: When a switch port that was in the blocking state is selected as the root or designated port, the port is immediately in the listening state [data not transmitted, MAC Address not learned, BPDU transmission]

 

 

4. Learning

: If the switch port in the listening state remains in that state for 15 seconds, which is the default forwarding delay time, the listening state transitions to the learning state [data not transmitted, MAC Address learning starts, BPDU transmission and reception]

 

 

5. Forwading

: Send/receive user frames [data transmission, start learning MAC Address, send/receive BPDUs]: All ports start in blocking state (to prevent bridge loops) and then the port is ready to transmit, but if you wait a little longer in Listening state to avoid loops, you can fill the MAC address table with MAC addresses received in the port and forwarding state.

 

 

★★★★★ (It's important, so make sure! Make sure! Memorize it.)

 

Blocking ==20 seconds == > listening ==15 seconds ==> Learning ==15 seconds ==> Forwarding

 

 

So if the topology changes and you go to another path, the communication loses 30 seconds by default.

 

Exactly 30 seconds! Remember exactly 30 seconds, instead of saying, "If you change your topology roughly, you'll lose a few seconds."

 

 

 

3. STP Type

 

 

: There are many types of STP. Let's look at the different types of stp.

 

1. RSTP (Rapid Spanning tree Protocol)

: Normal STP is normal communication after 30 seconds of topology change.

 

However, sometimes the changing 30 seconds cause the session to break and cause problems. In this case, RSTP enables normal communication after 2 seconds when the topology changes.

 

 

2. MSTP (Multiple Spanning tree Potocol)

: Service that provides STP per MST group by forming VLANs into an MST group Brings multiple VLANs to operate spanning tree per group

 

- Advantage

: Less switch load due to increased number of VLANs Less VLAN load can be distributed

 

- Disadvantages

: MST related establishment must be performed on all switches. All switches must have the same configuration, but STP is one of the more complicated contents in the network.

 

Why does Loop occur when you study spanning tree? When you look at the composition diagram, you should be able to block the section you want after studying the principle of STP operation to distinguish whether it is a loop structure or not.

 

If you can check the port state change and how long it takes to really operate, and RSTP, you can just say that you've done all the important parts of STP.

 

 

 

저의 글을 읽어 주셔서 감사합니다. 오늘도 즐거운 하루 보내세요.

반응형