SlideShare a Scribd company logo
Cisco Switching and Spanning Tree Protocol (STP) Basics
Switching is the process of using the physical address of devises to perform
forwarding decisions. Switches use application specific integrated circuits(ASICs) to
perform their switching function. As a consequence, amazingly fast switching speeds
are accomplished. Today I will explain how switches learn the hardware address of
hosts attached to them and how they use this information to perform their tasks. I
will focus on the protocol designed for preventing broadcast loop existence.
For those of you that are new to this field, what I am talking about is the Spanning
Tree Protocol (STP); I will describe its operation in details and use examples when
necessary, so you can get a clear understanding of how it functions.
Switching Benefits
Switches are very important networking devices; they’re used to terminate hosts on
the LAN. They consist of multiple Ethernet/Fast Ethernet/Gigabit Ethernet interfaces
with adjustable throughput rates.
They can be seen as multi-lane highways with a lot of exit points. Each host is
assigned a separate lane on the highway, therefore collision domains are separated
per each individual switch port. No bandwidth sharing takes place and each
individual host on each port is provided with independent, dedicated bandwidth. The
benefits of all these are:
Low Latency
Thunder Speed
Low Cost
Why low cost? Well the answer is quite simple. Imagine having a LAN of fifty hosts.
All the hosts need access to the Internet; therefore they should be connected to a
router somehow. Having 50 interfaces on a router to terminate client links is
inefficient and wasteful.
By incorporating a switch in the network, the router needs only a single interface to
connect to the switch and all users reach the router’s exit point with the help of the
switch’s ASIC electronics. The diagram below shows a typical LAN connection.
Switch Operation
As already mentioned, switches operate at layer 2 (the data-link layer) of the OSI
model. They do not need special configuration to operate; they are simple plug and
play devices. You can expect a new switch out of the box to work instantly when it is
powered up. Later on we’ll take a look at just how this is accomplished.
A layer 2 switch deals with three functions:
Address learning — When a switch is first switched on, it learns the MAC
address of hosts attached to it and stores the MAC address and interface port
association into its MAC table.
Forwarding — Based on the MAC address table, the switch is able to forward
frames out the appropriate interfaces.
Loop prevention — Multiple connections between switches may exist for
redundancy purposes. However these multiple connections may lead to
network loops without the use of a sophisticated protocol to prevent their
existence. STP is the protocol running on the switch ports to eliminate data
flooding as a consequence of loops while at the same time maintaining
redundancy.
How Does the Switch Find Host MACs?
Let’s use the diagram below to help us understand how address learning process
takes place.
Let’s assume that we have just powered on the switch. It has nothing in its MAC table.
We connect the cables from the hosts on the switch interfaces as shown in the
diagram. Host A initiates a connection towards Host D, and the following takes place:
1. Host A (interface fe0/0) sends a frame to Host D (MAC
address:0000.43c5.334c).
2. The switch inspects the Source Address in the frame and notes in its table the
MAC address of Host A along with the Interface number from which the
frame originated.
3. The switch inspects the Destination Address in the frame. Since it does not
have Hosts D MAC address in its table, it constructs a broadcast frame and
forwards out all interfaces except the interface from where the original frame
arrived.
4. Host D identifies itself as the expected recipient and responds back to Host A.
The switch receives the respond frame on interface fe0/11 and places the SA
in its table along with the interface number where the frame came from.
5. From now on, further communication between the two hosts will be switched
to the appropriate interfaces based on the MAC tables entries.
This process takes place every time a new host is attached on the switch and initiates
traffic. The switch tries to keep its MAC table up-to-date, therefore if some hosts do
not initiate traffic for a certain amount of time, the switch removes them from its
table and reinserts them when they begin sending traffic.
Spanning Tree Protocol (STP) Operations
The Spanning Tree Protocol (STP) is responsible for identifying links in the network
and shutting down the redundant ones, preventing possible network loops. In order
to do so, all switches in the network exchange BPDU messages between them to
agree upon the root bridge. Once they elect the root bridge, every switch has to
determine which of its ports will communicate with the root port.
If more than one link connects to the root bridge, then one is elected as the
forwarding port (Designated Port) and the others are blocked. Let us see the
operation of STP with the use of an example. We will use the topology shown below
to help us understand how STP operates.
1. The root bridge needs to be elected. Two fields combined together identify
the root bridge:MAC address and Priority value. Without manual
configuration all switches have the same priority therefore it is up to the MAC
address to decide upon the root bridge. The switch with the lowest MAC
address value is elected as the root bridge. In the diagram above Switch C is
the elected root bridge.
2. Once the root bridge is elected, each switch needs to identify a single root
port – the port closest to the route bridge. This port will always be in the
forwarding state. By default all ports of the route bridge are in the forwarding
state. Moreover, one port per segment (called designated port) is allowed to
be in the forwarding state.
3. In our example we have 2 ports on switch A and two ports on switch B that
belong to the same segment. Therefore, two of them need to be blocked to
avoid loops. Since switch B has higher MAC address value (hence lower
priority), its designated ports need to be blocked.
4. The result of all this is that only one path from one switch to any other switch
exists. Mission accomplished!
Things to Keep in Mind about STP
The Spanning Tree Protocol is a link management protocol that is designed to
support redundant links while at the same time preventing switching loops in
the network. It is quite useful and should be enabled on the switch interfaces.
STP has high convergence time; it can take up to one minute to converge and
provide redundancy. A newer development is implemented to the STP
protocol, called the Rapid Spanning Tree Protocol (RSTP). The latter retains all
the tasks of STP whilst minimizing convergence time significantly.
More Related Topics:
How to Configure Spanning Tree Protocol (STP) on Catalyst Switches?
Switch Types and LAN Switching
Switchport Security & Configuration

More Related Content

PPTX
Spanning tree protocol
PDF
Overview of Spanning Tree Protocol
DOC
Ccna 3 chapter 5 v4.0 answers 2011
PPTX
PPTX
Spanning tree protocol
PDF
LiveAction Spanning Tree Protocol (STP) Application Note
PDF
Spaning Tree Protocol
PDF
Resource reservation protocol
Spanning tree protocol
Overview of Spanning Tree Protocol
Ccna 3 chapter 5 v4.0 answers 2011
Spanning tree protocol
LiveAction Spanning Tree Protocol (STP) Application Note
Spaning Tree Protocol
Resource reservation protocol

What's hot (20)

PDF
RSTP (rapid spanning tree protocol)
PPTX
Layer 2 switching loop
PDF
Spanning tree protocol (stp)
PDF
Label distribution protocol
PPTX
Layer 2 switching
PDF
Open Shortest Path First
PPT
Spannig tree
PPTX
PDF
Difference b/w STP RSTP PVST & MSTP
PPT
Protocolo Spanning Tree
PPT
C C N A Day4
PPT
Spanning Tree Protocol
PPTX
Lan switching technologies
PDF
Network switching
PPT
Alp Stp
PDF
Lan Switching[1]
PDF
Understanding stp-rstp-convergence
PPTX
Proper spanning tree.pptx
PPT
Layer 2 switching fundamentals(networking)
PDF
STP Protection
RSTP (rapid spanning tree protocol)
Layer 2 switching loop
Spanning tree protocol (stp)
Label distribution protocol
Layer 2 switching
Open Shortest Path First
Spannig tree
Difference b/w STP RSTP PVST & MSTP
Protocolo Spanning Tree
C C N A Day4
Spanning Tree Protocol
Lan switching technologies
Network switching
Alp Stp
Lan Switching[1]
Understanding stp-rstp-convergence
Proper spanning tree.pptx
Layer 2 switching fundamentals(networking)
STP Protection
Ad

Similar to Cisco switching and spanning tree protocol (stp) basics (20)

PDF
ccna-day4-switching_1234567890123456.pdf
PPTX
LECTURE 02 (b).pptxnnnnnnnnnnnnnnnnnnnnn
PDF
Day 4 LAYER 2 SWITCHING
PPTX
LAYER 2 SWITCHING
PDF
Lec11 on Computer Networks by Tarun Mangla.pdf
PPT
PPT
PPT
CCNA PPT
PDF
Ccna day4-140715152437-phpapp01
PPT
Ccna day4
PDF
Spanning Tree Protocol, from a future CCNA´s perspective.
PPT
PDF
Quick Guide Layer 2 Switching
PPT
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
PPTX
9-STP-Collision Domain, Broadcast Domain.pptx
PDF
CCNA R&S-12-Spanning Tree Protocol Concepts
PPTX
Switching seminar ppt
PPT
11 switches
PDF
Spantree
ccna-day4-switching_1234567890123456.pdf
LECTURE 02 (b).pptxnnnnnnnnnnnnnnnnnnnnn
Day 4 LAYER 2 SWITCHING
LAYER 2 SWITCHING
Lec11 on Computer Networks by Tarun Mangla.pdf
CCNA PPT
Ccna day4-140715152437-phpapp01
Ccna day4
Spanning Tree Protocol, from a future CCNA´s perspective.
Quick Guide Layer 2 Switching
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
9-STP-Collision Domain, Broadcast Domain.pptx
CCNA R&S-12-Spanning Tree Protocol Concepts
Switching seminar ppt
11 switches
Spantree
Ad

More from IT Tech (20)

DOCX
Cisco ip phone key expansion module setup
DOCX
Cisco catalyst 9200 series platform spec, licenses, transition guide
DOCX
Cisco isr 900 series highlights, platform specs, licenses, transition guide
DOCX
Hpe pro liant gen9 to gen10 server transition guide
DOCX
The new cisco isr 4461 faq
DOCX
New nexus 400 gigabit ethernet (400 g) switches
DOCX
Tested cisco isr 1100 delivers the richest set of wi-fi features
DOCX
Aruba campus and branch switching solution
DOCX
Cisco transceiver module for compatible catalyst switches
DOCX
Cisco ios on cisco catalyst switches
DOCX
Cisco's wireless solutions deployment modes
DOCX
Competitive switching comparison cisco vs. hpe aruba vs. huawei vs. dell
DOCX
Four reasons to consider the all in-one isr 1000
DOCX
The difference between yellow and white labeled ports on a nexus 2300 series fex
DOCX
Cisco transceiver modules for compatible cisco switches series
DOCX
Guide to the new cisco firepower 2100 series
DOCX
892 f sfp configuration example
DOCX
Cisco nexus 7000 and nexus 7700
DOCX
Cisco firepower ngips series migration options
DOCX
Eol transceiver to replacement model
Cisco ip phone key expansion module setup
Cisco catalyst 9200 series platform spec, licenses, transition guide
Cisco isr 900 series highlights, platform specs, licenses, transition guide
Hpe pro liant gen9 to gen10 server transition guide
The new cisco isr 4461 faq
New nexus 400 gigabit ethernet (400 g) switches
Tested cisco isr 1100 delivers the richest set of wi-fi features
Aruba campus and branch switching solution
Cisco transceiver module for compatible catalyst switches
Cisco ios on cisco catalyst switches
Cisco's wireless solutions deployment modes
Competitive switching comparison cisco vs. hpe aruba vs. huawei vs. dell
Four reasons to consider the all in-one isr 1000
The difference between yellow and white labeled ports on a nexus 2300 series fex
Cisco transceiver modules for compatible cisco switches series
Guide to the new cisco firepower 2100 series
892 f sfp configuration example
Cisco nexus 7000 and nexus 7700
Cisco firepower ngips series migration options
Eol transceiver to replacement model

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
“AI and Expert System Decision Support & Business Intelligence Systems”
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
Chapter 3 Spatial Domain Image Processing.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Programs and apps: productivity, graphics, security and other tools
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Cisco switching and spanning tree protocol (stp) basics

  • 1. Cisco Switching and Spanning Tree Protocol (STP) Basics Switching is the process of using the physical address of devises to perform forwarding decisions. Switches use application specific integrated circuits(ASICs) to perform their switching function. As a consequence, amazingly fast switching speeds are accomplished. Today I will explain how switches learn the hardware address of hosts attached to them and how they use this information to perform their tasks. I will focus on the protocol designed for preventing broadcast loop existence. For those of you that are new to this field, what I am talking about is the Spanning Tree Protocol (STP); I will describe its operation in details and use examples when necessary, so you can get a clear understanding of how it functions. Switching Benefits Switches are very important networking devices; they’re used to terminate hosts on the LAN. They consist of multiple Ethernet/Fast Ethernet/Gigabit Ethernet interfaces with adjustable throughput rates. They can be seen as multi-lane highways with a lot of exit points. Each host is assigned a separate lane on the highway, therefore collision domains are separated per each individual switch port. No bandwidth sharing takes place and each individual host on each port is provided with independent, dedicated bandwidth. The benefits of all these are: Low Latency Thunder Speed Low Cost Why low cost? Well the answer is quite simple. Imagine having a LAN of fifty hosts. All the hosts need access to the Internet; therefore they should be connected to a router somehow. Having 50 interfaces on a router to terminate client links is inefficient and wasteful. By incorporating a switch in the network, the router needs only a single interface to connect to the switch and all users reach the router’s exit point with the help of the switch’s ASIC electronics. The diagram below shows a typical LAN connection.
  • 2. Switch Operation As already mentioned, switches operate at layer 2 (the data-link layer) of the OSI model. They do not need special configuration to operate; they are simple plug and play devices. You can expect a new switch out of the box to work instantly when it is powered up. Later on we’ll take a look at just how this is accomplished. A layer 2 switch deals with three functions: Address learning — When a switch is first switched on, it learns the MAC address of hosts attached to it and stores the MAC address and interface port association into its MAC table. Forwarding — Based on the MAC address table, the switch is able to forward frames out the appropriate interfaces. Loop prevention — Multiple connections between switches may exist for redundancy purposes. However these multiple connections may lead to network loops without the use of a sophisticated protocol to prevent their existence. STP is the protocol running on the switch ports to eliminate data flooding as a consequence of loops while at the same time maintaining redundancy.
  • 3. How Does the Switch Find Host MACs? Let’s use the diagram below to help us understand how address learning process takes place. Let’s assume that we have just powered on the switch. It has nothing in its MAC table. We connect the cables from the hosts on the switch interfaces as shown in the diagram. Host A initiates a connection towards Host D, and the following takes place: 1. Host A (interface fe0/0) sends a frame to Host D (MAC address:0000.43c5.334c). 2. The switch inspects the Source Address in the frame and notes in its table the MAC address of Host A along with the Interface number from which the frame originated. 3. The switch inspects the Destination Address in the frame. Since it does not have Hosts D MAC address in its table, it constructs a broadcast frame and forwards out all interfaces except the interface from where the original frame arrived. 4. Host D identifies itself as the expected recipient and responds back to Host A. The switch receives the respond frame on interface fe0/11 and places the SA in its table along with the interface number where the frame came from.
  • 4. 5. From now on, further communication between the two hosts will be switched to the appropriate interfaces based on the MAC tables entries. This process takes place every time a new host is attached on the switch and initiates traffic. The switch tries to keep its MAC table up-to-date, therefore if some hosts do not initiate traffic for a certain amount of time, the switch removes them from its table and reinserts them when they begin sending traffic. Spanning Tree Protocol (STP) Operations The Spanning Tree Protocol (STP) is responsible for identifying links in the network and shutting down the redundant ones, preventing possible network loops. In order to do so, all switches in the network exchange BPDU messages between them to agree upon the root bridge. Once they elect the root bridge, every switch has to determine which of its ports will communicate with the root port. If more than one link connects to the root bridge, then one is elected as the forwarding port (Designated Port) and the others are blocked. Let us see the operation of STP with the use of an example. We will use the topology shown below to help us understand how STP operates. 1. The root bridge needs to be elected. Two fields combined together identify the root bridge:MAC address and Priority value. Without manual configuration all switches have the same priority therefore it is up to the MAC address to decide upon the root bridge. The switch with the lowest MAC address value is elected as the root bridge. In the diagram above Switch C is the elected root bridge. 2. Once the root bridge is elected, each switch needs to identify a single root port – the port closest to the route bridge. This port will always be in the forwarding state. By default all ports of the route bridge are in the forwarding state. Moreover, one port per segment (called designated port) is allowed to be in the forwarding state. 3. In our example we have 2 ports on switch A and two ports on switch B that
  • 5. belong to the same segment. Therefore, two of them need to be blocked to avoid loops. Since switch B has higher MAC address value (hence lower priority), its designated ports need to be blocked. 4. The result of all this is that only one path from one switch to any other switch exists. Mission accomplished! Things to Keep in Mind about STP The Spanning Tree Protocol is a link management protocol that is designed to support redundant links while at the same time preventing switching loops in the network. It is quite useful and should be enabled on the switch interfaces. STP has high convergence time; it can take up to one minute to converge and provide redundancy. A newer development is implemented to the STP protocol, called the Rapid Spanning Tree Protocol (RSTP). The latter retains all the tasks of STP whilst minimizing convergence time significantly. More Related Topics: How to Configure Spanning Tree Protocol (STP) on Catalyst Switches? Switch Types and LAN Switching Switchport Security & Configuration