SlideShare a Scribd company logo
1 of 20
Download to read offline
SPANNING TREE
PROTOCOL (STP)
Overview
 Spanning Tree Protocol (STP) allows Ethernet LANs to have to have redundant link without
loops.
 STP is a part of 802.1D standard, overtime the STP (Spanning Tree Protocol) became legacy and
RSTP (Rapid Spanning Tree Protocol) took its place.
• Section 1 : How STP and RSTP discovers a tree with links with no loop.
• Section 2 : Different between STP and RSTP
• Section 3 : How RSTP works better than STP while reacting to a change.
LOOP AVOIDANCE
• If multiple connection between two switches are created for redundancy
puroses,network loop can occur.
• Spanning Tree Protocol ( STP ) is used to prevent from network loops while
still permitting redundancy.
SPANNING TREE PROTOCOL CONCEPT
• Spanning tree is a protocol that run on switch that help to solve the loop.
• Stp work in switch to avoid loop in switch or spanning tree protocol is a
network protocol that builds a loop- free logical topology for ethernet
network.
• Stp is open standard .
• Stp works when multi switch or used with redunnand links.
• By default stp is ennabled in all the cisco switches.
NEEDS
Without stp we have the following issues.
• Layer 2 loop
• Dublicate unicaste frames.
• Broadcaste storm
Please note that the original frame also
went via Gi0/1 towards Gi0/2
The STP Bridge ID and Hello BPDU
 We need to understand the message flowing between two switches.
 The STP/RSTP Bridge ID (BID) is an 8-byte value unique to each switch.= 2-byte is Priority field &
6 byte System ID Extension or MAC.
 STP/RSTP defines messages called Bridge Protocol Data Units (BPDU), also called Configuration
BPDU.
 Most common BPDU is Hello BPDU which carries many details including BID so switch can
understand which BPDU sent by which switch.
HOW IT WILL WORK
• Selecting the root bridge. 32768
• Selecting the root port.
• Selecting the designated port
• Blocking the unnessery port
How Spanning Tree Works
• The process used by switch is called Spanning tree algorithm.
STP/RSTP uses three criteria to choose whether to put an interface in forwarding state:
1. Elect a Root Switch : The switch having best BID (Bridge ID) becomes the root switch.
2. Elect Root Port : to a segment of switches that interface is called Designated Port. Root
port is the port with lowest cost to reach the Root switch on a Non Root switch.
3. The switch interface which is attached
All the other interfaces are placed in blocking state.
SELECTING THE ROOT BRIDGE
• The bridge with the lowest bridge id.
• Bridge id = priority + mac address of the switches
• And priority of all switches is 32768+1 = 32769.
• All switches have same priority then they will compare mac address .
• All switches exchange information that is called as bridge protocol data unit (BPDU) . Switches sends
BPDU every 2 sec .
• To check we will type command : sh spanning-tree
• From the all switches to the network 1 is elected as a root bridge.
• Every network will have only 1 root bridge and all the remaining switches will be considered as non root
bridge.
• Cost calculation in opposite side.
• Forwarding port
• It also have two type designated poet and root port.
non forwarding ports
It is also called blocking port
Different type of spanning tree
• STP --- it is IEEE 802.1D - it is legacy standard of spanning tree .it is very old when we
have use bridges . Is is a basis of other version of stp.
• CST--- it is comman spanning tree ---- assume that there is one spanning tree instance for
the entire bridged network ---- we do not use this now.
• PVST ( per VLAN Spanning tree v) it is cisco proprietary ever vlan have separate spanning
tree --- only support ISL ( it calculate a topology for each vlan ).
• PVST+ ----- is open standard --- support ISL and 802.1Q . Today we offand refer PVST+ as
PVST .
• PVST is a saying every vlan have separate stp.
• RSTP
IEEE 802.1D STP
• The original version of STP comes from the IEEE 802.1D standards.
802.1D Port States :
1.Disabled: The port is in shutdown state
2.Blocking : Port is enabled, can only receive BPDU’s but neither sending any traffic or learning
MAC address.
3.Listening: It can send and receive BPDU’s, cannot forward any traffic or learn any mac address.
4.Learning: The switch still does not forward any other network traffic, however it learns MAC address.
5.Forwarding: The switch port can forward all network traffic and can update the MAC address.
6.Broken: The switch has detected a configuration or an operational problem, and it discards the packet until issue
gets fixed.
The entire process takes around 30 seconds.
Stp port states
• Blocking 20 sec.
• Listioning 15 sec.
• Learning 15 sec.
• Forwarding no limits .
• Disable no limit.
Port States Receive BPDU Send BPDU Learn MAC Forward Frames
Blocking Yes No No No
Listening Yes Yes No No
Learning Yes Yes Yes No
Forwarding Yes Yes Yes Yes
Broken - - - -
LAB
• Connect 5 switches and find who became
Root switch and Why
• Etherchannel
• Connect a switch port to a PC and
configure the switch port with BPDU
Guard and check the result
• Connect a switch port to a switch and
configure the switch port with BPDU
Guard and check the result
INTERVIEW QUESTIONS
1. What is STP and RSTP
2. STP States ?
3. RSTP States ?
4. STP vs RSTP ?
5. Root switch election process
6. Port roles in STP and RSTP
7. Define the port roles

More Related Content

What's hot

Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocol
Muuluu
 

What's hot (20)

Presentation on arp protocol
Presentation on arp protocolPresentation on arp protocol
Presentation on arp protocol
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocol
 
Overview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolOverview of Spanning Tree Protocol
Overview of Spanning Tree Protocol
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
 
Vlan
Vlan Vlan
Vlan
 
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
 
CCNA ppt Day 1
CCNA ppt Day 1CCNA ppt Day 1
CCNA ppt Day 1
 
Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)
 
STP (spanning tree protocol)
STP (spanning tree protocol)STP (spanning tree protocol)
STP (spanning tree protocol)
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
Bgp protocol
Bgp protocolBgp protocol
Bgp protocol
 
Tcp/ip model
Tcp/ip  modelTcp/ip  model
Tcp/ip model
 
VLAN Trunking Protocol
VLAN Trunking ProtocolVLAN Trunking Protocol
VLAN Trunking Protocol
 
RSTP (rapid spanning tree protocol)
RSTP (rapid spanning tree protocol)RSTP (rapid spanning tree protocol)
RSTP (rapid spanning tree protocol)
 
Ccna PPT
Ccna PPTCcna PPT
Ccna PPT
 
Ipv4 ppt
Ipv4 pptIpv4 ppt
Ipv4 ppt
 
Routing Protocols
Routing ProtocolsRouting Protocols
Routing Protocols
 
CCNA PPT
CCNA PPTCCNA PPT
CCNA PPT
 

Similar to Spanning tree protocol (stp)

Spantree
SpantreeSpantree
Spantree
1 2d
 
Spantree
SpantreeSpantree
Spantree
1 2d
 
Ccna 3 chapter 5 v4.0 answers 2011
Ccna 3 chapter 5 v4.0 answers 2011Ccna 3 chapter 5 v4.0 answers 2011
Ccna 3 chapter 5 v4.0 answers 2011
Dân Chơi
 
Spaning Tree Protocol
Spaning Tree ProtocolSpaning Tree Protocol
Spaning Tree Protocol
Atakan ATAK
 
All in one q & ans
All in one q & ansAll in one q & ans
All in one q & ans
Ravi Kodoli
 
Ch5 ccna exploration 3 lan swtching and wireless
Ch5 ccna exploration 3 lan swtching and wirelessCh5 ccna exploration 3 lan swtching and wireless
Ch5 ccna exploration 3 lan swtching and wireless
kratos2424
 

Similar to Spanning tree protocol (stp) (20)

ENCOR_Capitulo 2.pptx
ENCOR_Capitulo 2.pptxENCOR_Capitulo 2.pptx
ENCOR_Capitulo 2.pptx
 
Stp defined
Stp definedStp defined
Stp defined
 
C C N A Day4
C C N A  Day4C C N A  Day4
C C N A Day4
 
CCNA PPT
CCNA PPTCCNA PPT
CCNA PPT
 
Ccna day4-140715152437-phpapp01
Ccna day4-140715152437-phpapp01Ccna day4-140715152437-phpapp01
Ccna day4-140715152437-phpapp01
 
Ccna day4
Ccna day4Ccna day4
Ccna day4
 
Ccna day4
Ccna day4Ccna day4
Ccna day4
 
Ccna day4
Ccna day4Ccna day4
Ccna day4
 
How STP works?
How STP works?How STP works?
How STP works?
 
SRWE_Module_5-STP Concepts.pptx
SRWE_Module_5-STP Concepts.pptxSRWE_Module_5-STP Concepts.pptx
SRWE_Module_5-STP Concepts.pptx
 
Day 4 LAYER 2 SWITCHING
Day 4 LAYER 2 SWITCHINGDay 4 LAYER 2 SWITCHING
Day 4 LAYER 2 SWITCHING
 
LAYER 2 SWITCHING
LAYER 2 SWITCHINGLAYER 2 SWITCHING
LAYER 2 SWITCHING
 
Spantree
SpantreeSpantree
Spantree
 
Spantree
SpantreeSpantree
Spantree
 
Quick Guide Layer 2 Switching
Quick Guide   Layer 2 SwitchingQuick Guide   Layer 2 Switching
Quick Guide Layer 2 Switching
 
ccna-day4-switching_1234567890123456.pdf
ccna-day4-switching_1234567890123456.pdfccna-day4-switching_1234567890123456.pdf
ccna-day4-switching_1234567890123456.pdf
 
Ccna 3 chapter 5 v4.0 answers 2011
Ccna 3 chapter 5 v4.0 answers 2011Ccna 3 chapter 5 v4.0 answers 2011
Ccna 3 chapter 5 v4.0 answers 2011
 
Spaning Tree Protocol
Spaning Tree ProtocolSpaning Tree Protocol
Spaning Tree Protocol
 
All in one q & ans
All in one q & ansAll in one q & ans
All in one q & ans
 
Ch5 ccna exploration 3 lan swtching and wireless
Ch5 ccna exploration 3 lan swtching and wirelessCh5 ccna exploration 3 lan swtching and wireless
Ch5 ccna exploration 3 lan swtching and wireless
 

Recently uploaded

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 

Recently uploaded (20)

S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 

Spanning tree protocol (stp)

  • 2. Overview  Spanning Tree Protocol (STP) allows Ethernet LANs to have to have redundant link without loops.  STP is a part of 802.1D standard, overtime the STP (Spanning Tree Protocol) became legacy and RSTP (Rapid Spanning Tree Protocol) took its place. • Section 1 : How STP and RSTP discovers a tree with links with no loop. • Section 2 : Different between STP and RSTP • Section 3 : How RSTP works better than STP while reacting to a change.
  • 3. LOOP AVOIDANCE • If multiple connection between two switches are created for redundancy puroses,network loop can occur. • Spanning Tree Protocol ( STP ) is used to prevent from network loops while still permitting redundancy.
  • 4. SPANNING TREE PROTOCOL CONCEPT • Spanning tree is a protocol that run on switch that help to solve the loop. • Stp work in switch to avoid loop in switch or spanning tree protocol is a network protocol that builds a loop- free logical topology for ethernet network. • Stp is open standard . • Stp works when multi switch or used with redunnand links. • By default stp is ennabled in all the cisco switches.
  • 5. NEEDS Without stp we have the following issues. • Layer 2 loop • Dublicate unicaste frames. • Broadcaste storm
  • 6. Please note that the original frame also went via Gi0/1 towards Gi0/2
  • 7. The STP Bridge ID and Hello BPDU  We need to understand the message flowing between two switches.  The STP/RSTP Bridge ID (BID) is an 8-byte value unique to each switch.= 2-byte is Priority field & 6 byte System ID Extension or MAC.  STP/RSTP defines messages called Bridge Protocol Data Units (BPDU), also called Configuration BPDU.  Most common BPDU is Hello BPDU which carries many details including BID so switch can understand which BPDU sent by which switch.
  • 8.
  • 9.
  • 10. HOW IT WILL WORK • Selecting the root bridge. 32768 • Selecting the root port. • Selecting the designated port • Blocking the unnessery port
  • 11. How Spanning Tree Works • The process used by switch is called Spanning tree algorithm. STP/RSTP uses three criteria to choose whether to put an interface in forwarding state: 1. Elect a Root Switch : The switch having best BID (Bridge ID) becomes the root switch. 2. Elect Root Port : to a segment of switches that interface is called Designated Port. Root port is the port with lowest cost to reach the Root switch on a Non Root switch. 3. The switch interface which is attached All the other interfaces are placed in blocking state.
  • 12. SELECTING THE ROOT BRIDGE • The bridge with the lowest bridge id. • Bridge id = priority + mac address of the switches • And priority of all switches is 32768+1 = 32769. • All switches have same priority then they will compare mac address . • All switches exchange information that is called as bridge protocol data unit (BPDU) . Switches sends BPDU every 2 sec . • To check we will type command : sh spanning-tree • From the all switches to the network 1 is elected as a root bridge. • Every network will have only 1 root bridge and all the remaining switches will be considered as non root bridge.
  • 13. • Cost calculation in opposite side.
  • 14. • Forwarding port • It also have two type designated poet and root port. non forwarding ports It is also called blocking port
  • 15. Different type of spanning tree • STP --- it is IEEE 802.1D - it is legacy standard of spanning tree .it is very old when we have use bridges . Is is a basis of other version of stp. • CST--- it is comman spanning tree ---- assume that there is one spanning tree instance for the entire bridged network ---- we do not use this now. • PVST ( per VLAN Spanning tree v) it is cisco proprietary ever vlan have separate spanning tree --- only support ISL ( it calculate a topology for each vlan ). • PVST+ ----- is open standard --- support ISL and 802.1Q . Today we offand refer PVST+ as PVST . • PVST is a saying every vlan have separate stp. • RSTP
  • 16.
  • 17. IEEE 802.1D STP • The original version of STP comes from the IEEE 802.1D standards. 802.1D Port States : 1.Disabled: The port is in shutdown state 2.Blocking : Port is enabled, can only receive BPDU’s but neither sending any traffic or learning MAC address. 3.Listening: It can send and receive BPDU’s, cannot forward any traffic or learn any mac address. 4.Learning: The switch still does not forward any other network traffic, however it learns MAC address. 5.Forwarding: The switch port can forward all network traffic and can update the MAC address. 6.Broken: The switch has detected a configuration or an operational problem, and it discards the packet until issue gets fixed. The entire process takes around 30 seconds.
  • 18. Stp port states • Blocking 20 sec. • Listioning 15 sec. • Learning 15 sec. • Forwarding no limits . • Disable no limit.
  • 19. Port States Receive BPDU Send BPDU Learn MAC Forward Frames Blocking Yes No No No Listening Yes Yes No No Learning Yes Yes Yes No Forwarding Yes Yes Yes Yes Broken - - - -
  • 20. LAB • Connect 5 switches and find who became Root switch and Why • Etherchannel • Connect a switch port to a PC and configure the switch port with BPDU Guard and check the result • Connect a switch port to a switch and configure the switch port with BPDU Guard and check the result INTERVIEW QUESTIONS 1. What is STP and RSTP 2. STP States ? 3. RSTP States ? 4. STP vs RSTP ? 5. Root switch election process 6. Port roles in STP and RSTP 7. Define the port roles