Port RolesPort Role Decisions Học viện mạng Bách Khoa - Website: www.bkacad.com 44... Port RolesPort Role Decisions Học viện mạng Bách Khoa - Website: www.bkacad.com 45... Port RolesPort
Trang 1Chapter 5 - Spanning Tree Protocol
CCNA Exploration 4.0
Trang 2network
network.
converge on a loop-free topology.
between redundant switches.
Học viện mạng Bách Khoa - Website: www.bkacad.com 2
Trang 3Layer 2 redundancy
Học viện mạng Bách Khoa - Website: www.bkacad.com 3
Trang 4Redundancy in a hierarchical network
• Layer 2 redundancy improves the availability of the network by
implementing alternate network paths by adding equipment and
cabling
Học viện mạng Bách Khoa - Website: www.bkacad.com 4
Trang 5Examine a redundant design
• In a hierarchical design, redundancy is achieved at the distribution and core layers through additional hardware and alternate paths through the additional hardware
the additional hardware
Học viện mạng Bách Khoa - Website: www.bkacad.com 5
Trang 6Examine a redundant design
Học viện mạng Bách Khoa - Website: www.bkacad.com 6
Trang 7Examine a redundant design
Học viện mạng Bách Khoa - Website: www.bkacad.com 7
Trang 8Examine a redundant design
Học viện mạng Bách Khoa - Website: www.bkacad.com 8
Trang 9Examine a redundant design
Học viện mạng Bách Khoa - Website: www.bkacad.com 9
Trang 10• Known Unicast: Destination addresses are in Switch Tables
• Unknown Unicast: Destination addresses are not in Switch Tables
• Multicast: Traffic sent to a group of addresses
Học viện mạng Bách Khoa - Website: www.bkacad.com 10
• Broadcast: Traffic forwarded out all interfaces except incoming
interface
Trang 11Issues with Redundancy
Học viện mạng Bách Khoa - Website: www.bkacad.com 11
Trang 12Issues with Redundancy
A redundant switched topology (STP disabled) may cause:
Học viện mạng Bách Khoa - Website: www.bkacad.com 12
Trang 13Layer 2 Loops
• When multiple paths exist between two devices on the network and
STP has been disabled on those switches, a Layer 2 loop can occur
Học viện mạng Bách Khoa - Website: www.bkacad.com 13
Trang 15Duplicate Unicast Frames
• Unicast frames sent onto a looped network can result in duplicate
frames arriving at the destination device
Học viện mạng Bách Khoa - Website: www.bkacad.com 15
Trang 16Issues with Redundancy
Học viện mạng Bách Khoa - Website: www.bkacad.com 16
Trang 17Real-world Redundancy Issues
Loops in the Wiring Closet
• If the network cables are not properly labeled when they are terminated
in the patch panel in the wiring closet Network loops that are a result
of accidental duplicate connections in the wiring closets are a common occurrence
Học viện mạng Bách Khoa - Website: www.bkacad.com 17
Trang 18Real-world Redundancy Issues
Loops in the Cubicles
Học viện mạng Bách Khoa - Website: www.bkacad.com 18
Trang 19Prevent loop, storm bordcast…?
• Block redundant link and auto unblock redundant link when primary link down.
Học viện mạng Bách Khoa - Website: www.bkacad.com 19
Trang 20Spanning Tree Protocol p g
Học viện mạng Bách Khoa - Website: www.bkacad.com 20
Trang 21The Spanning Tree Algorthm
• STP ensures that there is only one logical path between all destinations on the network by intentionally blocking redundant paths that could cause a loop This
disabled to prevent the loops from occurring.
• If the path is ever needed to compensate for a network cable or switch failure, STP recalculates the paths and unblocks the necessary ports to allow the
redundant path to become active
redundant path to become active.
Học viện mạng Bách Khoa - Website: www.bkacad.com 21
Trang 22Spanning-Tree Protocol
• Layer 2 protocol
• STP executes an algorithm called Spanning Tree Algorithm (STA)
• STP executes an algorithm called Spanning Tree Algorithm (STA)
• STA chooses a reference point, called a root bridge, and then
determines the available paths to that reference point
– If more than two paths exists, STA picks the best path and blocks o e t a t o pat s e sts, S p c s t e best pat a d b oc s
Trang 23STP Algorithm
• STP uses the Spanning Tree Algorithm (STA) to determine which
switch ports on a network need to be configured for blocking to prevent loops from occurring
• Root Bridge – The lowest BID
• Root Ports - Switch ports closest to the root bridge.
• Designated ports - All non-root ports that are still permitted to forward traffic
Trang 24The Root Bridge
• Every spanning-tree instance (switched LAN or broadcast domain) has
a switch designated as the root bridge The root bridge serves as a
reference point for all spanning tree calculations to determine which
reference point for all spanning-tree calculations to determine which redundant paths to block
Học viện mạng Bách Khoa - Website: www.bkacad.com 24
Trang 25Bridge ID (BID)
• For each Network, the switch with the highest switch priority (the
lowest numerical priority value) is elected as the root switch
• Th d t il f h BID fi ld di d l t b t it i f l t
• The details of each BID field are discussed later, but it is useful to
know now that the BID is made up of a priority value, an extended
system ID, and the MAC address of the switch
Học viện mạng Bách Khoa - Website: www.bkacad.com 25
Trang 26Bridge ID (BID)
Priority-based decision
Học viện mạng Bách Khoa - Website: www.bkacad.com 26
Trang 27Bridge ID (BID)
Priority-based decision
Học viện mạng Bách Khoa - Website: www.bkacad.com 27
Trang 28Bridge ID (BID)
Configure and Verify the BID
Học viện mạng Bách Khoa - Website: www.bkacad.com 28
Trang 29Best Paths to the Root Bridge
• When the root bridge has been designated for the spanning-tree
instance, the STA starts the process of determining the best paths to the root bridge from all destinations in the broadcast domain
the root bridge from all destinations in the broadcast domain
Học viện mạng Bách Khoa - Website: www.bkacad.com 29
Trang 30Best Paths to the Root Bridge
Example
Học viện mạng Bách Khoa - Website: www.bkacad.com 30
Trang 31STP BPDU
• The BPDU Fields
Học viện mạng Bách Khoa - Website: www.bkacad.com 31
Trang 32STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 32
Trang 33STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 33
Trang 34STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 34
Trang 35STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 35
Trang 36STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 36
Trang 37STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 37
Trang 38STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 38
Trang 39STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 39
Trang 40STP BPDU
The BPDU Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 40
Trang 41Port Roles
• There are four distinct port roles that switch ports are automatically configured for during the spanning-tree process.
Root Port
• The root port exists on non-root bridges and is the switch port with the best
path to the root bridge.
Designated Port
• The designated port exists on root and non-root bridges.
• For root bridges , all switch ports are designated ports.
• For non-root bridges For non root bridges , a designated port is the switch port that receives and , a designated port is the switch port that receives and
forwards frames toward the root bridge as needed.
• Only one designated port is allowed per segment
Non-designated Port g
• The non-designated port is a switch port that is blocked , so it is not forwarding
data frames and not populating the MAC address table with source addresses.
• A non-designated port is not a root port or a designated port
Học viện mạng Bách Khoa - Website: www.bkacad.com 41
Trang 42Port Roles
Disabled Port
• The disabled port is a switch port that is administratively shut down A
disabled port does not function in the spanning-tree process
Học viện mạng Bách Khoa - Website: www.bkacad.com 42
Trang 43Port Roles
Configure Port Priority
• The port priority values range from 0 - 240, in increments of 16 The
d f lt t i it l i 128
default port priority value is 128
Học viện mạng Bách Khoa - Website: www.bkacad.com 43
Trang 44Port Roles
Port Role Decisions
Học viện mạng Bách Khoa - Website: www.bkacad.com 44
Trang 45Port Roles
Port Role Decisions
Học viện mạng Bách Khoa - Website: www.bkacad.com 45
Trang 46Port Roles
Port Role Decisions
Học viện mạng Bách Khoa - Website: www.bkacad.com 46
Trang 47Port Roles
Port Role Decisions
Học viện mạng Bách Khoa - Website: www.bkacad.com 47
Trang 48Port Roles
Port Role Decisions
Học viện mạng Bách Khoa - Website: www.bkacad.com 48
Trang 49Port Roles
Port Role Decisions
Học viện mạng Bách Khoa - Website: www.bkacad.com 49
Trang 50Port Roles
Port Role Decisions
Học viện mạng Bách Khoa - Website: www.bkacad.com 50
Trang 51Port Roles - Summary
• One Root bridge per network
• One Root port on nonroot bridge p g
• One Designated port on segment
• Nondesignated ports are blocked
Học viện mạng Bách Khoa - Website: www.bkacad.com 51
Trang 52STP Port States and BPDU Timers
Port States
• Blocking - The port is a non-designated port and does not participate in frame forwarding The port receives BPDU frames to determine the location and root
forwarding The port receives BPDU frames to determine the location and root
ID of the root bridge switch and what port roles each switch port should
assume in the final active STP topology.
• Listening g - STP has determined that the port can participate in frame p p p
forwarding according to the BPDU frames that the switch has received thus far
At this point, the switch port is not only receiving BPDU frames, it is also
transmitting its own BPDU frames and informing adjacent switches that the
switch port is preparing to participate in the active topology
switch port is preparing to participate in the active topology.
• Learning - The port prepares to participate in frame forwarding and begins to populate the MAC address table
• Forwarding Forwarding - The port is considered part of the active topology and forwards - The port is considered part of the active topology and forwards frames and also sends and receives BPDU frames
• Disabled - The Layer 2 port does not participate in spanning tree and does not forward frames The disabled state is set when the switch port is
Học viện mạng Bách Khoa - Website: www.bkacad.com 52
p administratively disabled.
Trang 53STP Port States and BPDU Timers
Học viện mạng Bách Khoa - Website: www.bkacad.com 53
Trang 54STP Port States and BPDU Timers
BPDU Timers
Học viện mạng Bách Khoa - Website: www.bkacad.com 54
Trang 55STP Port States and BPDU Timers
Cisco PortFast Technology
• PortFast is a Cisco technology When a switch port configured with PortFast is configured as an access port that port transitions from blocking to forwarding configured as an access port, that port transitions from blocking to forwarding state immediately, bypassing the typical STP listening and learning states.
Học viện mạng Bách Khoa - Website: www.bkacad.com 55
Trang 56Step 1 Elect one Root Bridge
Step 2 Elect Root Ports p
Step 3 Elect Designated Ports
• All STP decisions are based on a the following predetermined
sequence:
Four
Four Step decision Sequence Step decision Sequence
Step 1 - Lowest BID
Step 2 - Lowest Path Cost to Root Bridge
Step 3 - Lowest Sender BID
Step 4 - Lowest Port ID
Học viện mạng Bách Khoa - Website: www.bkacad.com 56
Trang 57STP Convergence
STP Convergence
Step 1 Elect one Root Bridge
Step 2 Elect Root Ports
Step 3 Elect Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 57
Trang 58STP Convergence
Step 1 Elect one Root Bridge
Học viện mạng Bách Khoa - Website: www.bkacad.com 58
Trang 59Step 1 Elect one Root Bridge
Học viện mạng Bách Khoa - Website: www.bkacad.com 59
Trang 60Step 1 Elect one Root Bridge
Học viện mạng Bách Khoa - Website: www.bkacad.com 60
Trang 61STP Convergence
STP Convergence
Step 1 Elect one Root Bridge
Step 2 Elect Root Ports
Step 3 Elect Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 61
Trang 62Step 2 Elect Root Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 62
Trang 63Step 2 Elect Root Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 63
Trang 64Step 2 Elect Root Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 64
Trang 65Step 2 Elect Root Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 65
Trang 66Step 2 Elect Root Ports
Verify the Root Port
Học viện mạng Bách Khoa - Website: www.bkacad.com 66
Trang 67STP Convergence
STP Convergence
Step 1 Elect one Root Bridge
Step 2 Elect Root Ports
Step 3 Elect Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 67
Trang 68Step 3 Electing Designated Ports and
Non-Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 68
Trang 69Step 3 Electing Designated Ports and
Non-Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 69
Trang 70Step 3 Electing Designated Ports and
Non-Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 70
Trang 71Step 3 Electing Designated Ports and
Non-Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 71
Trang 72Step 3 Electing Designated Ports and
Non-Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 72
Trang 73Step 3 Electing Designated Ports and
Non-Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 73
Trang 74Step 3 Electing Designated Ports and
Non-Designated Ports
Học viện mạng Bách Khoa - Website: www.bkacad.com 74
Trang 75Step 3 Electing Designated Ports and
Non-Designated Ports
Verify DP and Non-DP
Học viện mạng Bách Khoa - Website: www.bkacad.com 75
Trang 76STP Topology Change
STP Topology Change Notification Process
Học viện mạng Bách Khoa - Website: www.bkacad.com 76
Trang 77STP (802.1D) Enhancements
• UplinkFast is an access-layer STP solution that provides fast failover when the root port or root switch fails.
• BackboneFast is a distribution and access-layer STP
solution that provides fast convergence in the network for indirect link failures
indirect link failures.
• PortFast is an access-layer STP solution that causes a
port to enter the spanning tree forwarding state
immediately, bypassing the listening and learning states.
Học viện mạng Bách Khoa - Website: www.bkacad.com 77
Trang 78Cisco and STP Variants
Học viện mạng Bách Khoa - Website: www.bkacad.com 78
Trang 79• Cisco developed PVST+ so that a network can run an STP instance for each VLAN in the network And Creating different STP root switches
per VLAN creates a more redundant network
• With PVST+, more than one trunk can block for a VLAN and load
sharing can be implemented
Học viện mạng Bách Khoa - Website: www.bkacad.com 79
Trang 80• PVST+ Bridge ID
• The following provides more details on the PVST+ fields:
– Bridge priority - A 4-bit field carries the bridge priority
– Extended system ID - A 12-bit field carrying the VID for PVST+
– MAC address - A 6-byte field with the MAC address of a single y g
switch
Học viện mạng Bách Khoa - Website: www.bkacad.com 80
Trang 81Học viện mạng Bách Khoa - Website: www.bkacad.com 81
Trang 82Học viện mạng Bách Khoa - Website: www.bkacad.com 82
Trang 83Học viện mạng Bách Khoa - Website: www.bkacad.com 83
Trang 84What is RSTP?
• RSTP (IEEE 802.1w) is an evolution of the 802.1D standard RSTP
can achieve much faster convergence in a properly configured
network, sometimes in as little as a few hundred milliseconds
Học viện mạng Bách Khoa - Website: www.bkacad.com 84
Trang 85New Features
• New Port States and Port Roles
• Rapid Transition to Forwarding State
• Proposal/Agreement Handshake Sequence
Học viện mạng Bách Khoa - Website: www.bkacad.com 85
Trang 86RSTP Port States and Port Roles
RSTP Port States
• RSTP provides rapid convergence following a failure or during
re-establishment of a switch switch port or link
establishment of a switch, switch port, or link
• An RSTP topology change causes a transition in the appropriate switch ports to the forwarding state through either explicit handshakes or a
proposal and agreement process and synchronization
proposal and agreement process and synchronization
Học viện mạng Bách Khoa - Website: www.bkacad.com 86