The Spanning Tree Protocol was created by DEC (Digital Equipment Corporation) now Compaq. This is not compatible with the IEEE 802.1d version which Cisco use.
The Spanning Tree Protocol:
* Prevents loops, loops cause broadcast storms
* Allows redundant links
* Resilient to topology changes
* STA (Spanning Tree Algorithm) - Used to calculate loop-free path
* BPDUs (Bridge Protocol Data Units) are sent and received by switches in the network every 2 seconds (default) to determine spanning tree topology.
Bridge Priority - Numerical value held by switches. All Catalyst switches are 32768
Bridge ID = MAC Address
Spanning Tree States
Blocking No frames forwarded, BPDUs heard
Listening No frames forwarded, listening for frames
Learning No frames forwarded, learning addresses
Forwarding Frames forwarded, learning addresses
Disabled No frames forwarded, no BPDUs heard
STA - Spanning Tree Algorithm
Spanning Tree Algorithm is used to calculate a loop-free path.
All switch ports are in blocking mode to begin with. It takes approx 30 seconds until packets can be forwarded.
Step 1 : Elect Root Bridge - Lowest bridge priority, if there is a tie then switch with lowest bridge ID
Step 2 : Elect Root Ports - Locate redundant paths to root bridge; block all but on root. Root Path Cost is cumulative cost of path to root bridge. Ports directly connected to Root Bridge will be root ports, otherwise lowest root path cost used.
Step 3 : Elect Designated Ports - Single port that sends and receives traffic from a switch to and from Root Bridge - Lowest cost path to Root Bridge.
Spanning Tree Overview
* There can only be one Root Bridge.
* Root-Bridge ports are called 'Designated' and are set to send and receive traffic (forwarding state). All other redundant links to the root bridge are shutdown.
* Blocked ports still receive BPDUs.
* Convergence occurs when switches have transitioned to either forwarding or blocking states. No other data is forwarded during this time.
* Forward delay - Time taken for a switch to go from Listening to Learning (50 seconds default).
* IEEE default priority = 32,768, this is true for all devices running STP IEEE version.
* Port Fast Mode - Immediately brings a port from blocking to forwarding state by eliminating forward delays.
* Bridges can only have one spanning tree instance compared to switches which can have many.
* Bridge Protocol Data Units send confirmation messages using multicast frames
STP selection Processes:-
A Spanning Tree Algorithm examines the switched network, and, through a series of decisions (discussed below) places each port in the loop into either Forwarding or Blocking state, therefore breaking the loop.
Types of port in STP:
1. Designated Port (DP) Closest to Root i.e. All Ports on the Root Switch.
2. Route Port (RP) One Per Switch.
3. Blocking Port. The process the switches go through to decide which port they place in blocking or forwarding state is governed by the position of a 'Root Switch' (also known as 'Root Bridge'):
# To decide which switch is the root switch, each switch begins by claiming to be the Root Switch they all send out an STP messages called BPDU's (Bridge Protocol Data Unit).
A fight-off happens to determine the final root based on a unique BID (Bridge Identifier) contained within the BPDU, the BID is made up of two components; a priority value and the switch MAC address. By default each switch begins off with a priority of 32,768. The switch with the lowest BID wins the honor of being the Root Bridge.
Then all ports on the root switch are placed into forwarding state. These ports are known as 'Designated Ports' (DP). You can NOT have a Root Port or Blocking Port on the root switch.
All the remaining non-root switches determine which port is closest to the root switch and places the port with the least cost (based on hops and/or bandwidth) into forwarding state. These are known as 'Root Ports' (RP).
There can only ever be one RP per segment, and so if there are more than one paths with the same cost the decision is made based on the BID of the neighboring switches, the port connecting to the switch with the lowest BIDbecomes a RP.
All ports are placed in blocking state and the loops stopped. Once the switches have all assigned ports then the switched network is said to be "Converged". As discussed above the BID is made up of:
A Priority Value
MAC Address The Priority Value of the BID can be manually changed by an administrator, this is useful of you want to force a switch in the middle of a network to be a Root Switch.
During the STP selection process ports can be in one of the following statuses:
Disabled
Blocked
Listening
Learning
Forwarding
Ports in Listening & Learning state can take upto 30 seconds, during which no traffic will pass through the port.
This may disrupt services such as DHCP and Network Neighborhood. Switching on 'portfast' by using the "spanning-tree portfast" command will skip the Listening and Learning stage.
Do not set portfast on inter switch ports or branch ports, however you could set portfast on a leaf port (ports connected to hosts).
To Know More Understand About STP selection Processes:-
STP (Spanning Tree Protocol)
Layer 2 Redundancies.
Loop Avoidance.
IEEE 802.1D
STP - > Built the tree
First -
o It will elect on Reference point that called as root Switch.
o Then From this Reference point it will find the entire redundancy path to neighbor switch.
o Then From this path it will keep one in forwarding stage and other in Blocking State.
In STP Protocol:-
o Each switch exchange BPDU (Bridge Protocol Data Unit) Message for Every 2 Second.
o Each Enabling switch Identified by Bridge-ID.
o Bridge-ID is 8bytes, it is combination of Priority + Mac Address.
# By Default Priority is 32768 for all switches.
Information Content in the BPDU message:-
• Root ID (Root Switch Bridge ID)
• Sender Bridge ID
• STP Timer
• Root Path Cost
When Booting: -
Election for Root Switch:-
• 1st switch will see the lowest priority value.
• Then Lowest Base Ethernet Mac address
STP RUN SPANNING TREE ALGORATAM:-
One VLAN they can be consider as a one ROOT Switch and other can be consider as a NON ROOT Switch.
Then Election for Root Port in Non Root Switch:-
1st check -
Lowest cost of reached Root Switch.
Lowest Sender Bridge-Id
Lowest Port Priority(By Default 128)
Lowest Port ID
Please Note:-
All the Port is by default designated port.
Root Port and Designated Port always in Forwarding State.
For Election of Designation Port:-
1st Check
• Lowest Path cost.
• Lowest Sender Bridge-Id.
• Lowest Priority 128.
• Lowest Port Id.
Plz Note:-Non Designate port is always in Blocking State.
STP States:-
• Disable – when the port is a shut down stage.
• Listing – On Election from Root Port.
Designated port, blocking port will be
Happen. Then switch will listing BPDU Message receives from neighbor switch.
• After listing enter into learning stage
Switch will lean the Mac address .But it not forward data frames.
• Forwarding - It will be forward the data frames.
• Blocking Stage – In this stage it can only received BPDU Message.
No comments:
Post a Comment