SlideShare a Scribd company logo
Bridging
Bridging
 A bridge is a device that connects two or more local area
networks, or two or more segments of the same network.
 Operates at Data Link Layer.
 Uses the MAC address for packet forwarding.
 They filter information so that network traffic intended for
one portion of the network does not congest the rest of
the network.
Bridging
 The two physical types of bridges are Local and Remote
Bridges
 Local Bridges
 They are used where the network is being locally
segmented. The 2 segments are physically close
together: same building, same floor, etc. Only one
bridge is required.
 Remote Bridges
 Remote Bridges are used in pairs, and also used
where the network is remotely segmented. The two
segments are physically far apart: different buildings,
different floors, etc.
Bridge Methodologies
 Bridge Methodologies
 Transparent Bridging
 Spanning Tree Protocol
 Source Routing
Transparent Bridging
 Transparent bridging is a technology that allows a switch
to learn everything it needs to know about the location of
nodes on the network without the network administrator
having to do anything.
 Transparent bridges are so named because their
presence and operation are transparent to network hosts
Transparent Bridging
 Maintains a forwarding database containing
{address , interface}
 Address - Source address of each packet it
receives.
 Interface - Interface identifier for the interface in
which the packet was received on.
Transparent Bridging
 MAC addresses of the hosts are stored in a filtering
database in the bridge.
 Elements of each entry of the filtering database
 The destination MAC address
 The bridge port where frames for this destination
MAC address should be forwarded to
 The age of this entry
 The filtering database could be set statically.
Transparent Bridging
 Learning
 Initially, the filtering database is empty. Over time
it is filled with entries via the Learning mechanism.
 Frames arriving on any of the Bridge ports are
inspected for their destination MAC address and
put into the filtering database, together with the
Bridge port identity the frame arrived on.
 Through this knowledge, the bridge is able to
prevent traffic from crossing the bridge.
Transparent Bridging
 Aging
 The learned entries the filtering database holds,
must be aged after a certain time (aging time),
and removed from the filtering database.
 The co-operation of the learning and aging
mechanisms make the filtering database up-to-
date with the current network configuration.
Transparent Bridging
 Flooding
 If an Ethernet frame arrives, the destination MAC
address is searched for in the filtering database.
 If the destination MAC address is not found
(implying that it is not learned yet), it is learned
and forwarded to all Bridge ports, i.e. flooded,
except to the one the frame arrived on.
Transparent Bridging
 Forwarding
 If an Ethernet frame arrives with a destination
MAC address that is found in the filtering
database (implying that it is already learned
before), it is forwarded to the bridge port that is
associated with that entry.
Transparent Bridging
 Filtering
 If the destination MAC address of an arriving
Ethernet frame is found to be associated with the
same segment as it arrived on, it is filtered, i.e.
silently discarded.
Transparent Bridging:Example
Spanning Tree Protocol
Spanning Tree Protocol
 Station A sends a frame station B, but neither bridge has
Station B in its address table.
 Both Bridge 1 and Bridge 2 see that frame and populate
their respective address tables indicating that Station A
resides on Segment A on ports 1/1 and 2/1 respectively.
 The frame is forwarded by both bridges onto Segment B.
 Each bridge will see that packet again since it is being sent
by the other bridge.
Spanning Tree Protocol
 Each bridge re-learns Station A as residing on ports 1/2 and
2/2.
 The packet is then forwarded again to Segment A, which is
the segment where the frame originated.
 Since neither of the bridges are aware of each other, and
each bridge continually forwards the frame on the other
port, this loop will go on forever.
Spanning Tree Protocol
 The purpose of Spanning Tree is to avoid and eliminate
loops in the network by negotiating a loop free path.
 Avoids duplication of messages.
 It forces certain redundant paths to blocked or standby
state.
 Switches exchange special messages, called bridge
protocol data unit (BPDU) frames, that allow them to
calculate a Spanning Tree and hence the active topology.
Spanning Tree Protocol
 Using information in the BPDU frames, the switches
calculate the Spanning Tree in accordance with the
algorithm to block all of the redundant links, leaving a single
communications path.
Selection of Root Bridge
 Only one switch/ bridge can be selected as the root bridge
in a given network.
 One of the important field included in the BPDU is the
bridge ID. Each bridge has unique bridge ID. The root
bridge is the bridge with the lowest bridge ID in the
spanning tree network.
 The bridge ID include two parts, bridge priority (2 bytes)
bridge MAC address (6 bytes).
Selecting the Root Bridge
Selection of Root Bridge
 Two fields concatenated into 64-bit number
 16-bit priority and 48-bit MAC address
 Manufacturers normally select default value for
priority
 Standard recommends default of 32768
 MAC address acts as tie-breaker if all priorities
equal
Selection of Root Port and
Designated Port
 Based on the location of the root bridge, the other
switches determine which of their ports has the
lowest path cost to the root bridge.
 Path cost is the total cost of transmitting a frame on
to a LAN through that port to bridge root .
 These ports are called root ports, and each switch
(other than the current root bridge) must have one.
 The root port is normally in Forwarding State.
Selection of Root Port and
Designated Port
 Non-root bridge(s) determine lowest-cost path to
root.
 Equal-lowest-cost paths are decided by Lowest port
ID on bridge.
 A designated switch for each LAN segment is
selected which provides the lowest path cost from
that LAN to the root switch.
Selection of Root Port and
Designated Port
 Designated Ports for each individual LAN forwards
frames from the direction of the Root to the LAN and
frames from that LAN towards the Root.
 The root ports and designated ports are selected for
inclusion in STP and are placed in forwarding state.
 Ports which are not included in STP are in blocking
state and data frames will not be forwarded to or
received from the port.
Spanning-Tree
MAC=00A0C5111111
MAC = 00A0C5222222 MAC = 00A0C5333333
Spanning Tree
MAC = 00A0C5333333
MAC = 00A0C5111111
MAC = 00A0C5222222
STP Port States
 Five States
 Blocking
 Listening
 Learning
 Forwarding
 Disabled
STP Port States
 Listening
 When a port comes up, it goes into the Listening,
it remains in the Listening State for however long
a duration is specified by the Forward Delay Timer
say 15 sec.
 It listens for BDPUs and by examining the
contents of the BDPUs and figures out the
topology of the existing network.
 After the listening state, the port may decide that
it should go into a Blocking State or Learning
State.
STP Port States
 Blocking State
 The switch enters the Blocking State if a path with
higher priority is found to exist during the
Listening State.
 In the blocking state, no frames are forwarded
and just Hello BPDUs are listened to, this lasts for
20 seconds, which is the Maximum Age Time.
STP Port States
 Learning
 The switch enters the Learning State if no path
with a higher priority is found during the Listening
State.
 The switch is in this state for the time specified in
the Forward Delay Timer say 15 sec.
 Learning State the port is learning MAC
addresses and adding those entries into it's
Destination Forwarding Table
STP Port States
 Forwarding State
 After the Learning State is complete, then the port
goes into Forwarding State and can transmit data.
 Disabled
 Ports which are disabled do not adapt to solve the
problem of network loops using the Spanning
Tree Protocol.
STP Port States
STP Port States
STA Packet Format
Topology messages
Destination
Address
Source
Address
Destination
Service
Access
Point
Source
Service
Access
Point
Control Bridge Configuration Field CRC
6 bytes 6 bytes 1 byte = 42 1 byte = 42 1 byte = 03 4 bytes
Configuration of a bridge mainly relies on the Root ID, the transmitting bridge ID and the cost
Protocol
Identifier
Protocol
Version
Identifier
BPDU Type Flags
Root
Identifier
Root
Path
Cost
Bridge
Identifier
Port
Identifier
Message
Age
Max Age
Hello
Time
Forward
Delay
2 bytes 1 byte 1 byte 1 byte 8 bytes 4 bytes 8 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes
IEEE 802.3 packet
STA Packet Format
time since root sent a
message on
which this message is based
Destination
MAC address
Source MAC
address
Configuration
Message
protocol identifier
version
message type
flags
root ID
Cost
bridge ID
port ID
message age
maximum age
hello time
forward delay
Set to 0 Set to 0
Set to 0
lowest bit is "topology change bit (TC bit)
ID of root Cost of the path from the
bridge sending this
message
ID of port from which
message is sent
ID of bridge sending this message
Time between
recalculations of the
spanning tree
(default: 15 secs)
Time between
BPDUs from the root
(default: 1sec)
How STP works
 Each BPDU frame typically includes the following
information:
 the identifier of the bridge assumed to be the root (by
the bridge transmitting the BPDU),
 the root path cost to the assumed root and
 the identifier of the bridge transmitting the BPDU.
 A bridge initially assumes itself to be the root and transmits
BPDU messages on each of its ports with its ID as root .
 Upon receipt of a BPDU, its contents are examined and
compared with similar information stored by the receiving
bridge.
How STP works
 If the information from the received BPDU is “ better”
than stored information, the bridge adopts the better
information and begins transmitting it through its
ports to all bridges, except for the port on which the
“better” information was arrived.
 Eventually ,all bridges will agree on the root. A non-
root bridge designates its root port as the one on
which it is receiving BPDU's with the lowest cost to
root.
How STP works
 To identify which bridge should be the designated bridge, bridges
again compare information in received BPDUs with their stored
information.
 If the root path cost stored by a first bridge is lower than the root
path cost contained in BPDUs received from a second bridge,
then the first bridge is the designated bridge.
 If the root path cost for both the first and second bridges is the
same, the first bridge compares Bridge IDs.
 If the Bridge ID of the first bridge is less than the ID of the second
bridge, then the first bridge is the designated bridge, otherwise
the second bridge is the designated bridge.
STP Timers
 Three timers involved in STP
 Hello Timer
 Forward Delay Timer
 Maximum Age Timer
STP Timers
 Hello Timer
 Hello Timer triggers periodic “hello” messages
(actually configuration BPDU) that are sent from
root to other bridges.
 Configuration BPDUs are sent every 2 seconds,
by default.
 Values may range from 1 to 10.
 All bridges on a network use the Hello Time value
configured into the Root Bridge.
STP Timers
 Forward Delay Timer
 The forward delay is the time spent in the listening
and learning state.
 This is by default equal to 15 seconds.
 But can be tuned to be between four and 30
seconds.
STP Timers
 Maximum Age Timer
 The max age timer controls the maximum length
of time a bridge port saves its configuration BPDU
information.
 This is 20 seconds by default
 But it can be tuned to be between six and 40
seconds
STP Operation
 The root bridge generates and transmits BPDUs from its
ports every hello time which is a settable parameter.
 In response to receiving BPDUs, bridges transmit their
own BPDUs. Thus every two seconds BPDUs are
propagated through the network.
 A timer is associated with the BPDU information stored
for each port of a bridge.
 This timer is set to a value referred to as the maximum
age, which is placed into BPDU generated by the root
bridge and copied by the other bridges.
STP Operation
 As BPDUs are received, their contents are examined. If the
contents match the information already stored for that port,
the timer is reset back to zero.
 Accordingly, by receiving consistent BPDUs every hello
time, which is significantly less than the maximum age, the
current BPDU information is maintained and the accuracy
of the Spanning Tree or active topology is confirmed.
STP Recalculation
 If a designated bridge fails, or is removed from the network, or
the root port fails, a directly connected bridge in the LAN
segment detects that it is not receiving Configuration BPDUs
from that bridge.
 This is because the information from the last BPDU times out
according to the Maximum Age timer (default 20 seconds).
 It then sends a TCN BPDU to its designated bridge/switch
that is destined for the root bridge/switch.
STP Recalculation
 The designated bridge receiving this TCN BPDU sends back
a Configuration BPDU containing an acknowledgement as
well as sending another TCN BPDU on towards the root
bridge.
 The root bridge, on receipt of the TCN BPDU, sends a
modified Configuration BPDU to all bridges in the network
indicating that a topology change has occurred by setting the
Topology Change Flag.
 Any directly connected bridges on the same segment,
receiving the configuration change BPDU, create their own
BPDUs and send those out.
STP Recalculation
STP Recalculation
 They age out their forwarding tables according to the Forward
Delay timer (15 seconds) rather than use the default time of
300 seconds( five minutes). Information contained in the
filtering databases is thus quickly discarded.
 This fast aging lasts until the root bridge resets the Topology
Change Flag once enough time has elapsed for the
configuration change notification to have propagated
throughout the tree.
 Recalculation of the Spanning Tree following a network
change takes approximately fifty seconds: twenty seconds for
BPDU information to timeout, fifteen seconds in the listening
state and another fifteen seconds in the learning state.
Conclusion
 Advantages of bridges
 Prohibiting loops is one of the main functions of
bridges using Spanning Tree Protocol.
 Reduce traffic by segmentation.
 Reliability : If one segment goes down, it does not
take down the complete LAN.
Reference
 For further study refer
 RFC 2878 – PPP Bridge Control Protocol
 http://www.hojmark.net/spane_an.pdf
 http://www.pt.com/articles/article_spanningtree_0303
.pdf
 http://www.cisco.com/univercd/cc/td/doc/product/lan/t
rsrb/frames.htm#29643
Thank You

More Related Content

PPTX
Networking basics and basic cisco commands
PPTX
Routing Protocols.pptx
PPTX
Ch 18 intro to network layer - section 3
PPTX
Network layer - design Issues
PPTX
Ch 18 intro to network layer - section 2
PPT
Subnetting
PPTX
Ch 18 intro to network layer - section 4
PPTX
Networking basics and basic cisco commands
Routing Protocols.pptx
Ch 18 intro to network layer - section 3
Network layer - design Issues
Ch 18 intro to network layer - section 2
Subnetting
Ch 18 intro to network layer - section 4

What's hot (20)

PPT
CCNA PPT
PPT
Routing
PPT
Spanning tree protocol
PPTX
The medium access sublayer
PDF
Chapter6 network layer
PPTX
Channel Allocation.pptx
PDF
2.3 access control random access methods - part 1
PDF
issues in desigining routing protocols
PDF
Luận văn: Nghiên Cứu Công Nghệ Truyền Dẫn SDH, HAY
PPTX
Network Layer
PPTX
Virtual LAN and Vlan Trunking Protocol.pptx
PPT
PPTX
Computer Network - Network Layer
PPT
Fundamental of Quality of Service(QoS)
PDF
3 Basic Principal Of Fo Installation
PDF
CCNA Routing Fundamentals - EIGRP, OSPF and RIP
PPT
Networking Basics
PPT
PPTX
Schedule and Contention based MAC protocols
CCNA PPT
Routing
Spanning tree protocol
The medium access sublayer
Chapter6 network layer
Channel Allocation.pptx
2.3 access control random access methods - part 1
issues in desigining routing protocols
Luận văn: Nghiên Cứu Công Nghệ Truyền Dẫn SDH, HAY
Network Layer
Virtual LAN and Vlan Trunking Protocol.pptx
Computer Network - Network Layer
Fundamental of Quality of Service(QoS)
3 Basic Principal Of Fo Installation
CCNA Routing Fundamentals - EIGRP, OSPF and RIP
Networking Basics
Schedule and Contention based MAC protocols
Ad

Similar to Bridging.ppt (20)

PDF
Networking interview questions and answers
PPT
C C N A Day4
PDF
Day 4 LAYER 2 SWITCHING
PPTX
LAYER 2 SWITCHING
PPTX
LECTURE 02 (b).pptxnnnnnnnnnnnnnnnnnnnnn
PPT
Ccna day4
PDF
Ccna day4-140715152437-phpapp01
PPT
PPT
PPT
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
PDF
Ccna free chapter
PDF
Spaning Tree Protocol
PPTX
Bridging ppt
PPT
Lec1 lan switching
PPT
F06_Lecture7_etherne..
PPTX
9-STP-Collision Domain, Broadcast Domain.pptx
DOC
Ccna 3 chapter 5 v4.0 answers 2011
PDF
ccna-day4-switching_1234567890123456.pdf
PPTX
PPT
Alp Stp
Networking interview questions and answers
C C N A Day4
Day 4 LAYER 2 SWITCHING
LAYER 2 SWITCHING
LECTURE 02 (b).pptxnnnnnnnnnnnnnnnnnnnnn
Ccna day4
Ccna day4-140715152437-phpapp01
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
Ccna free chapter
Spaning Tree Protocol
Bridging ppt
Lec1 lan switching
F06_Lecture7_etherne..
9-STP-Collision Domain, Broadcast Domain.pptx
Ccna 3 chapter 5 v4.0 answers 2011
ccna-day4-switching_1234567890123456.pdf
Alp Stp
Ad

Recently uploaded (20)

PDF
86236642-Electric-Loco-Shed.pdf jfkduklg
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Soil Improvement Techniques Note - Rabbi
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PPTX
Current and future trends in Computer Vision.pptx
PDF
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPT
introduction to datamining and warehousing
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PPTX
Fundamentals of Mechanical Engineering.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
86236642-Electric-Loco-Shed.pdf jfkduklg
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Soil Improvement Techniques Note - Rabbi
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
Current and future trends in Computer Vision.pptx
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
III.4.1.2_The_Space_Environment.p pdffdf
Nature of X-rays, X- Ray Equipment, Fluoroscopy
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
introduction to datamining and warehousing
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Fundamentals of Mechanical Engineering.pptx
R24 SURVEYING LAB MANUAL for civil enggi
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS

Bridging.ppt

  • 2. Bridging  A bridge is a device that connects two or more local area networks, or two or more segments of the same network.  Operates at Data Link Layer.  Uses the MAC address for packet forwarding.  They filter information so that network traffic intended for one portion of the network does not congest the rest of the network.
  • 3. Bridging  The two physical types of bridges are Local and Remote Bridges  Local Bridges  They are used where the network is being locally segmented. The 2 segments are physically close together: same building, same floor, etc. Only one bridge is required.  Remote Bridges  Remote Bridges are used in pairs, and also used where the network is remotely segmented. The two segments are physically far apart: different buildings, different floors, etc.
  • 4. Bridge Methodologies  Bridge Methodologies  Transparent Bridging  Spanning Tree Protocol  Source Routing
  • 5. Transparent Bridging  Transparent bridging is a technology that allows a switch to learn everything it needs to know about the location of nodes on the network without the network administrator having to do anything.  Transparent bridges are so named because their presence and operation are transparent to network hosts
  • 6. Transparent Bridging  Maintains a forwarding database containing {address , interface}  Address - Source address of each packet it receives.  Interface - Interface identifier for the interface in which the packet was received on.
  • 7. Transparent Bridging  MAC addresses of the hosts are stored in a filtering database in the bridge.  Elements of each entry of the filtering database  The destination MAC address  The bridge port where frames for this destination MAC address should be forwarded to  The age of this entry  The filtering database could be set statically.
  • 8. Transparent Bridging  Learning  Initially, the filtering database is empty. Over time it is filled with entries via the Learning mechanism.  Frames arriving on any of the Bridge ports are inspected for their destination MAC address and put into the filtering database, together with the Bridge port identity the frame arrived on.  Through this knowledge, the bridge is able to prevent traffic from crossing the bridge.
  • 9. Transparent Bridging  Aging  The learned entries the filtering database holds, must be aged after a certain time (aging time), and removed from the filtering database.  The co-operation of the learning and aging mechanisms make the filtering database up-to- date with the current network configuration.
  • 10. Transparent Bridging  Flooding  If an Ethernet frame arrives, the destination MAC address is searched for in the filtering database.  If the destination MAC address is not found (implying that it is not learned yet), it is learned and forwarded to all Bridge ports, i.e. flooded, except to the one the frame arrived on.
  • 11. Transparent Bridging  Forwarding  If an Ethernet frame arrives with a destination MAC address that is found in the filtering database (implying that it is already learned before), it is forwarded to the bridge port that is associated with that entry.
  • 12. Transparent Bridging  Filtering  If the destination MAC address of an arriving Ethernet frame is found to be associated with the same segment as it arrived on, it is filtered, i.e. silently discarded.
  • 15. Spanning Tree Protocol  Station A sends a frame station B, but neither bridge has Station B in its address table.  Both Bridge 1 and Bridge 2 see that frame and populate their respective address tables indicating that Station A resides on Segment A on ports 1/1 and 2/1 respectively.  The frame is forwarded by both bridges onto Segment B.  Each bridge will see that packet again since it is being sent by the other bridge.
  • 16. Spanning Tree Protocol  Each bridge re-learns Station A as residing on ports 1/2 and 2/2.  The packet is then forwarded again to Segment A, which is the segment where the frame originated.  Since neither of the bridges are aware of each other, and each bridge continually forwards the frame on the other port, this loop will go on forever.
  • 17. Spanning Tree Protocol  The purpose of Spanning Tree is to avoid and eliminate loops in the network by negotiating a loop free path.  Avoids duplication of messages.  It forces certain redundant paths to blocked or standby state.  Switches exchange special messages, called bridge protocol data unit (BPDU) frames, that allow them to calculate a Spanning Tree and hence the active topology.
  • 18. Spanning Tree Protocol  Using information in the BPDU frames, the switches calculate the Spanning Tree in accordance with the algorithm to block all of the redundant links, leaving a single communications path.
  • 19. Selection of Root Bridge  Only one switch/ bridge can be selected as the root bridge in a given network.  One of the important field included in the BPDU is the bridge ID. Each bridge has unique bridge ID. The root bridge is the bridge with the lowest bridge ID in the spanning tree network.  The bridge ID include two parts, bridge priority (2 bytes) bridge MAC address (6 bytes).
  • 21. Selection of Root Bridge  Two fields concatenated into 64-bit number  16-bit priority and 48-bit MAC address  Manufacturers normally select default value for priority  Standard recommends default of 32768  MAC address acts as tie-breaker if all priorities equal
  • 22. Selection of Root Port and Designated Port  Based on the location of the root bridge, the other switches determine which of their ports has the lowest path cost to the root bridge.  Path cost is the total cost of transmitting a frame on to a LAN through that port to bridge root .  These ports are called root ports, and each switch (other than the current root bridge) must have one.  The root port is normally in Forwarding State.
  • 23. Selection of Root Port and Designated Port  Non-root bridge(s) determine lowest-cost path to root.  Equal-lowest-cost paths are decided by Lowest port ID on bridge.  A designated switch for each LAN segment is selected which provides the lowest path cost from that LAN to the root switch.
  • 24. Selection of Root Port and Designated Port  Designated Ports for each individual LAN forwards frames from the direction of the Root to the LAN and frames from that LAN towards the Root.  The root ports and designated ports are selected for inclusion in STP and are placed in forwarding state.  Ports which are not included in STP are in blocking state and data frames will not be forwarded to or received from the port.
  • 26. Spanning Tree MAC = 00A0C5333333 MAC = 00A0C5111111 MAC = 00A0C5222222
  • 27. STP Port States  Five States  Blocking  Listening  Learning  Forwarding  Disabled
  • 28. STP Port States  Listening  When a port comes up, it goes into the Listening, it remains in the Listening State for however long a duration is specified by the Forward Delay Timer say 15 sec.  It listens for BDPUs and by examining the contents of the BDPUs and figures out the topology of the existing network.  After the listening state, the port may decide that it should go into a Blocking State or Learning State.
  • 29. STP Port States  Blocking State  The switch enters the Blocking State if a path with higher priority is found to exist during the Listening State.  In the blocking state, no frames are forwarded and just Hello BPDUs are listened to, this lasts for 20 seconds, which is the Maximum Age Time.
  • 30. STP Port States  Learning  The switch enters the Learning State if no path with a higher priority is found during the Listening State.  The switch is in this state for the time specified in the Forward Delay Timer say 15 sec.  Learning State the port is learning MAC addresses and adding those entries into it's Destination Forwarding Table
  • 31. STP Port States  Forwarding State  After the Learning State is complete, then the port goes into Forwarding State and can transmit data.  Disabled  Ports which are disabled do not adapt to solve the problem of network loops using the Spanning Tree Protocol.
  • 34. STA Packet Format Topology messages Destination Address Source Address Destination Service Access Point Source Service Access Point Control Bridge Configuration Field CRC 6 bytes 6 bytes 1 byte = 42 1 byte = 42 1 byte = 03 4 bytes Configuration of a bridge mainly relies on the Root ID, the transmitting bridge ID and the cost Protocol Identifier Protocol Version Identifier BPDU Type Flags Root Identifier Root Path Cost Bridge Identifier Port Identifier Message Age Max Age Hello Time Forward Delay 2 bytes 1 byte 1 byte 1 byte 8 bytes 4 bytes 8 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes IEEE 802.3 packet
  • 35. STA Packet Format time since root sent a message on which this message is based Destination MAC address Source MAC address Configuration Message protocol identifier version message type flags root ID Cost bridge ID port ID message age maximum age hello time forward delay Set to 0 Set to 0 Set to 0 lowest bit is "topology change bit (TC bit) ID of root Cost of the path from the bridge sending this message ID of port from which message is sent ID of bridge sending this message Time between recalculations of the spanning tree (default: 15 secs) Time between BPDUs from the root (default: 1sec)
  • 36. How STP works  Each BPDU frame typically includes the following information:  the identifier of the bridge assumed to be the root (by the bridge transmitting the BPDU),  the root path cost to the assumed root and  the identifier of the bridge transmitting the BPDU.  A bridge initially assumes itself to be the root and transmits BPDU messages on each of its ports with its ID as root .  Upon receipt of a BPDU, its contents are examined and compared with similar information stored by the receiving bridge.
  • 37. How STP works  If the information from the received BPDU is “ better” than stored information, the bridge adopts the better information and begins transmitting it through its ports to all bridges, except for the port on which the “better” information was arrived.  Eventually ,all bridges will agree on the root. A non- root bridge designates its root port as the one on which it is receiving BPDU's with the lowest cost to root.
  • 38. How STP works  To identify which bridge should be the designated bridge, bridges again compare information in received BPDUs with their stored information.  If the root path cost stored by a first bridge is lower than the root path cost contained in BPDUs received from a second bridge, then the first bridge is the designated bridge.  If the root path cost for both the first and second bridges is the same, the first bridge compares Bridge IDs.  If the Bridge ID of the first bridge is less than the ID of the second bridge, then the first bridge is the designated bridge, otherwise the second bridge is the designated bridge.
  • 39. STP Timers  Three timers involved in STP  Hello Timer  Forward Delay Timer  Maximum Age Timer
  • 40. STP Timers  Hello Timer  Hello Timer triggers periodic “hello” messages (actually configuration BPDU) that are sent from root to other bridges.  Configuration BPDUs are sent every 2 seconds, by default.  Values may range from 1 to 10.  All bridges on a network use the Hello Time value configured into the Root Bridge.
  • 41. STP Timers  Forward Delay Timer  The forward delay is the time spent in the listening and learning state.  This is by default equal to 15 seconds.  But can be tuned to be between four and 30 seconds.
  • 42. STP Timers  Maximum Age Timer  The max age timer controls the maximum length of time a bridge port saves its configuration BPDU information.  This is 20 seconds by default  But it can be tuned to be between six and 40 seconds
  • 43. STP Operation  The root bridge generates and transmits BPDUs from its ports every hello time which is a settable parameter.  In response to receiving BPDUs, bridges transmit their own BPDUs. Thus every two seconds BPDUs are propagated through the network.  A timer is associated with the BPDU information stored for each port of a bridge.  This timer is set to a value referred to as the maximum age, which is placed into BPDU generated by the root bridge and copied by the other bridges.
  • 44. STP Operation  As BPDUs are received, their contents are examined. If the contents match the information already stored for that port, the timer is reset back to zero.  Accordingly, by receiving consistent BPDUs every hello time, which is significantly less than the maximum age, the current BPDU information is maintained and the accuracy of the Spanning Tree or active topology is confirmed.
  • 45. STP Recalculation  If a designated bridge fails, or is removed from the network, or the root port fails, a directly connected bridge in the LAN segment detects that it is not receiving Configuration BPDUs from that bridge.  This is because the information from the last BPDU times out according to the Maximum Age timer (default 20 seconds).  It then sends a TCN BPDU to its designated bridge/switch that is destined for the root bridge/switch.
  • 46. STP Recalculation  The designated bridge receiving this TCN BPDU sends back a Configuration BPDU containing an acknowledgement as well as sending another TCN BPDU on towards the root bridge.  The root bridge, on receipt of the TCN BPDU, sends a modified Configuration BPDU to all bridges in the network indicating that a topology change has occurred by setting the Topology Change Flag.  Any directly connected bridges on the same segment, receiving the configuration change BPDU, create their own BPDUs and send those out.
  • 48. STP Recalculation  They age out their forwarding tables according to the Forward Delay timer (15 seconds) rather than use the default time of 300 seconds( five minutes). Information contained in the filtering databases is thus quickly discarded.  This fast aging lasts until the root bridge resets the Topology Change Flag once enough time has elapsed for the configuration change notification to have propagated throughout the tree.  Recalculation of the Spanning Tree following a network change takes approximately fifty seconds: twenty seconds for BPDU information to timeout, fifteen seconds in the listening state and another fifteen seconds in the learning state.
  • 49. Conclusion  Advantages of bridges  Prohibiting loops is one of the main functions of bridges using Spanning Tree Protocol.  Reduce traffic by segmentation.  Reliability : If one segment goes down, it does not take down the complete LAN.
  • 50. Reference  For further study refer  RFC 2878 – PPP Bridge Control Protocol  http://www.hojmark.net/spane_an.pdf  http://www.pt.com/articles/article_spanningtree_0303 .pdf  http://www.cisco.com/univercd/cc/td/doc/product/lan/t rsrb/frames.htm#29643