THE SCHOOL OF CISCO NETWORKING (SCN): CISCO - SPANNING TREE PROTOCOL (STP):
Contact No:   ### / ###/ ###
Welcome To The IT Knowledge Base Sharing Freeway "Study With The Zero Fees / Zero Money" Web - If We Believe, That If We Have Knowledge, Let Others Light Their Candles With It. - Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Ones Please. "Student Expectations And Satisfaction Is Always Our Highest Priority")

'Love All, Serve All, Help Ever Hurt Never'

Please Welcome To The "Zero Fees And Zero Money SCN Community Study Page"

We Like To Share Our Stuff With Everyone And Hope You Will Find Something Useful Here. Enjoy Our Collection And Come Back Again And Again, We'll Do Our Best To Make It Always Interesting For You. All Our Stuff Always Available May Be 100% Totally Freely. Use Only For Non-Commercial Purposes Only!

THE SCHOOL OF CISCO NETWORKING (SCN) Is A IT Support Community – Based, Non - Profit Volunteer Organizations, Offering Our Assistance And Support To Developmental Our Services Dedicated To All.

Because Large Section Of Our Students In This World, Especially In Villages, Who Are Under Privileged Expecting For Equal Opportunity In Terms Of Money And Education. We Feel The Sufferings Of Talented Students Losing Their Opportunity To Shine Because Of Their Poor Financial Status. So We Thought That Professional Education Will Be Providing Them Freely.

Our Web Site Is To Give An Easy Way To Understand Each And Every Student Who Are Going To Start CISCO Lab Practice Without Any Doubts And Our ARTICLES STUFF Are Always 100% Totally Free For Everyone, Which Is Belongings To THE SCHOOL OF CISCO NETWORKING (SCN).

Also This Guide Provides Technical Guidance Intended To Help All Network Students, Network Administrators And Security Officers Improve Of Their Demonstrated Ability To Achieve Specific objectives Within Set Timeframes.

Hands - On Experience Is An Invaluable Part Of Preparing For The Lab Exam And Never Pass Up An Opportunity To Configure Or Troubleshoot A Router ( If You Have Access To Lab Facilities, Take Full Advantage Of Them) There Is No Replacement For The Experience You Can Gain From Working In A Lab, Where You Can Configure Whatever You Want To Configure And Introduce Whatever Problems You Want To Introduce, Without Risk Of Disrupting A Production Network.

For Better View Of Our Web Page - Please Use Any Latest Web Browser, Such As (Mozilla Firefox, Google Chrome, Opera, Safari, Internet Explorer, Torch, Maxthon, Sea Monkey, Avant Browser, Deepnet Explorer, And Etc ), Because Some Elements Or Scripts Are Not Work In The Old Web Browser (It Might Not Be Displayed Properly Or Are Not Appearing properly!). Thank You For Your Time And Best Of Luck!

Your Sincerely – Premakumar Thevathasan.
"Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Once Please,Thank You."

CISCO - SPANNING TREE PROTOCOL (STP):

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 BID becomes 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.
 For More InFo = > http://www.cisco.com/image/gif/paws/10556/spanning_tree1.swf

This Article Written Author By: Premakumar Thevathasan.CCNA, CCNP, CCIP, MCSA, MCSE, MCSA - MSG, CIW Security Analyst, CompTIA Certified A+ .

1 comment:

Anonymous said...

This is very excellent way of teaching every one can be easy to understand this Article.