STP Spanning Tree Protocol
STP Spanning Tree Protocol
Spanning Tree Protocol (STP) enables switches to become aware of other switches through the advertisement and receipt of bridge protocol data units (BPDUs). STP builds a Layer 2 loop-free topology in an environment by temporarily blocking traffic on redundant ports.
STP operates by selecting a specific switch as the master switch and running a tree-based algorithm to identify which redundant ports should not forward traffic.
Catalyst switches now operate in PVST+, RSTP, and MST modes. All three of these modes are backward compatible with 802.1D.
=========================================================================
STP Port States:
In the 802.1D STP protocol, every port transitions through the following states:
Disabled: The port is in an administratively off position (that is, shut down).
Blocking: The switch port is enabled, but the port is not forwarding any traffic to ensure that a loop is not created. The switch does not modify the MAC address table. It can only receive BPDUs from other switches.
Listening: The switch port has transitioned from a blocking state and can now send or receive BPDUs. It cannot forward any other network traffic. The duration of the state correlates to the STP forwarding time. The next port state is learning.
Learning: The switch port can now modify the MAC address table with any network traffic that it receives. The switch still does not forward any other network traffic besides BPDUs. The duration of the state correlates to the STP forwarding time.The next port state is forwarding.
Forwarding: The switch port can forward all network traffic and can update the MAC address table as expected. This is the final state for a switch port to forward network traffic.
Broken: The switch has detected a configuration or an operational problem on a port that can have major effects. The port discards packets as long as the problem continues to exist.
-----------------------------------------------------------------------------------------------------------------------------
Bridge protocol data unit (BPDU): This network packet is used for network switches to identify a hierarchy and notify of changes in the topology. A BPDU uses the destination MAC address 01:80:c2:00:00:00. There are two types of BPDUs:
Configuration BPDU: This type of BPDU is used to identify the root bridge, root ports, designated ports, and blocking ports. The configuration BPDU consists of the following fields: STP type, root path cost, root bridge identifier, local bridge identifier, max age, hello time, and forward delay.
Topology change notification (TCN) BPDU: This type of BPDU is used to communicate changes in the Layer 2 topology to other switches. This is explained in greater detail later in the chapter.
Root Bridge:
The Root Bridge ID is used to determine which switch becomes the root bridge. The Bridge ID is an 8-byte value. It consists of two main parts:
Bridge Priority: A configurable value. Lower values have higher priority.
MAC Address: The switch's unique Media Access Control address.
- Switches exchange Bridge Protocol Data Units (BPDUs) to compare Bridge IDs.
- The switch with the lowest Bridge ID is elected as the root bridge.
- If multiple switches have the same bridge priority, the switch with the lowest MAC address becomes the root bridge.
STP Timers
- 10 Mbps link path cost is 100
- 100 Mbps link path cost is 19
- 1 Gbps link path cost is 4
- 10 Gbps link path cost is 2
- 20 Gbps link path cost is 1
- 100 Gbps link path cost is 1
- 1 Tbps link path cost is 1
- 10 Tbps link path cost is 1
It is simple and straightforward.
ReplyDelete