How to work STP, what are the requirement need for STP, How to configure Spanning Tree Protocol (STP), What is CST, PVST, PVST+, explanation about RSTP.
(STP) SPANNING TREE PROTOCOL
• Spanning Tree Protocol (STP) uses Spanning Tree Algorithm to avoid the Switching loops in layer-2 devices (bridges or switches).
• STP works when multiple switches are used with redundant links avoiding Broadcast Storms, Multiple Frame Copies & Database instability.
• First Developed By DEC (Digital Equipment Corporation in 1985)
• STP is a open standard (IEEE 802.1D)
• STP is enabled by default on all Cisco Catalyst switches
STP Process undergoes in three steps:
1) Selecting the Root bridge
2) Selecting the Root port
3) Selecting designated and Non-designated ports
1) Selecting the Root bridge
Root Bridge
The bridge with the Best (Lowest) Bridge ID.
• Each switch has a unique identifier called a Bridge or Switch ID
• Bridge ID = Priority + MAC address of the switch
• When a switch advertises a BPDU, they place their switch id in these BPDUs.
Out of all the switches in the network, one is elected as a root bridge that becomes the focal point in the network.
• Every LAN will have only one Root Bridge and all the remaining switches will be considered as Non- root Bridges.
• Non-Root bridge All Switches other than the Root Bridge are Non-Root Bridges
2) Selecting the Root Port:
. Root port
• The link directly connected to the root bridge, or the Shortest path to the Root bridge
• Every Non-root Bridge looks the best way to go Root-bridge
• For every non-root bridge there is only one root port.
Root port will be decided based on the following Conditions
1. least cost (Speed)
2. The bridge with the Best (Lowest) Switch ID.
3. Lowest Physical Port Number.
3) Selecting Designated port & Non-Designated port
Designated port
• A designated port will always in Forward Mode
Non-Designated port
• All the Port or ports which are blocked by STP to avoid switching loop.
• A Non Designated port Will Always in Blocked Mode.
. BPDU
• All switches exchange information through what is called as Bridge Protocol Data Units (BPDUs)
• BPDUs contain a lot of information to help the switches determine the topology and any loops that result from that topology.
• BPDUs are sent every 2 sec
STP port states
• Blocking 20 Sec or No Limits.
• Listening 15 Sec.
• Learning 15 Sec.
• Forwarding No Limits.
• Disable No Limits.
Switch Port States
• Blocking: Won't forward frames; listens to BPDUs. All ports are in blocking state by default when the switch is powered up.
• Listening: Listens to BPDUs to make sure no loops occur on the network before passing data frames.
• Learning: Learns MAC addresses and builds a MAC table but does not forward frames.
• Forwarding: Sends and receives all data on the bridged port.
Typical Costs of Different Ethernet Network
Ethernet 10 mbps cost 100
Fast Ethernet 100 mbps cost 19
Gigabit Ethernet 1000 mb cost 4
10 gigabit Ethernet 10000 mb cost 2