Spanning Tree Protocol (STP) on Catalyst Switches

بروتوكول STP اختصار لـ Spanning Tree Protocol يعمل على الطبقة الثانية من السويتشات المعيار او الـ specification لهذا البروتوكول هو IEEE 802.1D الغرض من بروتوكول STP هو منع حدوث loops عند توصيل السويتشات مع بعضها لبناء redundant paths لان الـ loops تقتل الشبكة!

مفاهيم (concepts) بروتوكول STP

STP runs on bridges and switches that are 802.1D-compliant. There are different flavors of STP, but 802.1D is the most popular and widely implemented. You implement STP on bridges and switches in order to prevent loops in the network. Use STP in situations where you want redundant links, but not loops. Redundant links are as important as backups in the case of a failover in a network. A failure of your primary activates the backup links so that users can continue to use the network. Without STP on the bridges and switches, such a failure can result in a loop. If two connected switches run different flavors of STP, they require different timings to converge. When different flavors are used in the switches, it creates timing issues between Blocking and Forwarding states. Therefore, it is recommended to use the same flavors of STP. Consider this network:
https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/5234-5.html?dtid=pseggl000183&ccid=cc000890&gclid=EAIaIQobChMI5taBnJa55QIVhEPTCh33sQoQEAAYASAAEgJ9-PD_BwE&gclsrc=aw.ds

بروتوكول STP يعمل على الـswitches (bridges) التي تتوافق مع المعيار 802.1D وعلى الرغم من وجود العديد من بروتوكولات STP إلا أن أشهرها البروتوكول المتوافق مع المعيار 802.1D ويعمل بروتوكول STP على السويتشات لمنع حصول وحدوق loops في حالات عمل الـ redundancy للسويتشات. ﻷنك إن لم تستخدم بروتوكول STP على السويتشات التي موصلة بـredundant links سيحصل loops في شبكتك وتموت الشبكة من أزدحام وتيار البانات التي تعصف داخلها بسبب حدوث loops.
Redundant links مهمة جدا بين السويتشات ﻷنها تعمل كـfailover للسويتشات في حال عطل أحد السويتشات أو أحد الروابط أيضا.

5-b.gif

In this network, a redundant link is planned between Switch A and Switch B. However, this setup creates the possibility of a bridging loop. For example, a broadcast or multicast packet that transmits from Station M and is destined for Station N simply continues to circulate between both switches.

However, when STP runs on both switches, the network logically looks like this:

5-c.gif

This informa