+ All Categories
Home > Documents > CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

Date post: 18-Jan-2016
Category:
Upload: daniel-dixon
View: 231 times
Download: 3 times
Share this document with a friend
65
CCNA3-1 Chapter 5-1 Chapter 5 Chapter 5 Spanning Tree Protocol Spanning Tree Protocol (STP) (STP) Part I Part I
Transcript
Page 1: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-1 Chapter 5-1

Chapter 5Chapter 5

Spanning Tree ProtocolSpanning Tree Protocol(STP) (STP)

Part IPart I

Page 2: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-2 Chapter 5-1

• ..

Page 3: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-3 Chapter 5-1

Spanning Tree Protocol (STP)Spanning Tree Protocol (STP)

Redundant Layer 2 TopologiesRedundant Layer 2 Topologies

Page 4: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-4 Chapter 5-1

Redundant Layer 2 TopologiesRedundant Layer 2 Topologies

• As businesses become increasingly dependent on the As businesses become increasingly dependent on the network, the availability of the network infrastructure network, the availability of the network infrastructure becomes a critical business concern. becomes a critical business concern.

• RedundancyRedundancy is the solution for achieving the necessary is the solution for achieving the necessary availability.availability.

• Layer 2 redundancy improves the availability of the Layer 2 redundancy improves the availability of the network by implementing network by implementing alternate network pathsalternate network paths by by adding equipment and cabling.adding equipment and cabling.

• Having multiple paths for data to traverse the network Having multiple paths for data to traverse the network allows for a single path to be disruptedallows for a single path to be disrupted without impacting without impacting the connectivity of devices on the network. the connectivity of devices on the network.

Page 5: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-5 Chapter 5-1

RedundancyRedundancy

Page 6: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-6 Chapter 5-1

RedundancyRedundancy

Redundant paths create Redundant paths create loops loops in the network.in the network.

Redundant paths create Redundant paths create loops loops in the network.in the network.

How are they controlled?How are they controlled?Spanning Tree ProtocolSpanning Tree Protocol

How are they controlled?How are they controlled?Spanning Tree ProtocolSpanning Tree Protocol

Page 7: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-7 Chapter 5-1

RedundancyRedundancy

• The Spanning Tree Protocol The Spanning Tree Protocol (STP)(STP) is enabled on all switches. is enabled on all switches.• STP has placed some switch ports in STP has placed some switch ports in forwardingforwarding state and state and

other switch ports in other switch ports in blockingblocking state. state.

ForwardForwardForwardForward

BlockedBlockedBlockedBlocked

Page 8: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-8 Chapter 5-1

Issues with RedundancyIssues with Redundancy

• RedundancyRedundancy is an important part of the hierarchical design. is an important part of the hierarchical design.• When multiple paths exist between two devices on the When multiple paths exist between two devices on the

network and network and STP has been disabledSTP has been disabled on those switches, a on those switches, a Layer 2 loopLayer 2 loop can occur. can occur.

• If If STP is enabledSTP is enabled on these switches, on these switches, which is the defaultwhich is the default, , a a Layer 2 loop would not occurLayer 2 loop would not occur..

Page 9: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-9 Chapter 5-1

Issues with RedundancyIssues with Redundancy

• Ethernet frames do not have a Ethernet frames do not have a Time-To-Live (TTL)Time-To-Live (TTL) parameter parameter like IP packets.like IP packets.

• As a result, if they are not terminated properly on a As a result, if they are not terminated properly on a switched network, they continue to bounce from switch to switched network, they continue to bounce from switch to switch endlessly.switch endlessly.

Page 10: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-10 Chapter 5-1

Issues with RedundancyIssues with Redundancy

• Remember that switches use the Remember that switches use the Source MAC addressSource MAC address to to learn where the devices are and learn where the devices are and enters this informationenters this information into into their MAC address tables.their MAC address tables.

• Switches will Switches will flood the frames for unknown destinationsflood the frames for unknown destinations until until they learn the MAC addresses of the devices. they learn the MAC addresses of the devices.

Page 11: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-11 Chapter 5-1

Issues with RedundancyIssues with Redundancy

• Additionally, Additionally, multicasts and broadcastsmulticasts and broadcasts are also flooded out are also flooded out all ports except the receiving port. all ports except the receiving port. (Multicasts will not be (Multicasts will not be flooded if the switch has been specifically configured to flooded if the switch has been specifically configured to handle multicasts.) handle multicasts.)

Page 12: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-12 Chapter 5-1

Issues with RedundancyIssues with Redundancy

PC1 sends a PC1 sends a broadcast.broadcast.

PC1 sends a PC1 sends a broadcast.broadcast.

S2 receives the S2 receives the frame and updates frame and updates

the MAC table.the MAC table.

S2 receives the S2 receives the frame and updates frame and updates

the MAC table.the MAC table.

S2 floods the S2 floods the broadcast out all broadcast out all ports except the ports except the receiving port.receiving port.

S2 floods the S2 floods the broadcast out all broadcast out all ports except the ports except the receiving port.receiving port.

S3 and S1 update S3 and S1 update their MAC tablestheir MAC tables

S3 and S1 update S3 and S1 update their MAC tablestheir MAC tables

S3 and S1 now S3 and S1 now flood the broadcast.flood the broadcast.

S3 and S1 now S3 and S1 now flood the broadcast.flood the broadcast.

S3 and S1 update S3 and S1 update their MAC tables their MAC tables with the wrong with the wrong

informationinformation

S3 and S1 update S3 and S1 update their MAC tables their MAC tables with the wrong with the wrong

informationinformation

S3 and S1 forward S3 and S1 forward the broadcast back the broadcast back

to S2.to S2.

S3 and S1 forward S3 and S1 forward the broadcast back the broadcast back

to S2.to S2.

S2 updates its S2 updates its MAC table with the MAC table with the wrong informationwrong information

S2 updates its S2 updates its MAC table with the MAC table with the wrong informationwrong information

S2 S2 floodsfloods the the broadcast againbroadcast again

S2 S2 floodsfloods the the broadcast againbroadcast againS3 and S1 update their S3 and S1 update their MAC tables again with MAC tables again with the the wrong informationwrong information

S3 and S1 update their S3 and S1 update their MAC tables again with MAC tables again with the the wrong informationwrong information

Page 13: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-13 Chapter 5-1

Issues with RedundancyIssues with Redundancy

• Broadcast Storms:Broadcast Storms:

PC1 sends a PC1 sends a broadcastbroadcast

PC1 sends a PC1 sends a broadcastbroadcast

No STPNo STP so a so aloop is createdloop is createdNo STPNo STP so a so a

loop is createdloop is createdPC4 sends a PC4 sends a

broadcastbroadcastPC4 sends a PC4 sends a

broadcastbroadcastAnother loopAnother loopAnother loopAnother loopPC3 sends a broadcast and PC3 sends a broadcast and creates yet another loopcreates yet another loop

PC3 sends a broadcast and PC3 sends a broadcast and creates yet another loopcreates yet another loop

PC2 sends a PC2 sends a broadcastbroadcast

PC2 sends a PC2 sends a broadcastbroadcast

Because of the high Because of the high level of traffic, it level of traffic, it

cannot be processed.cannot be processed.

Because of the high Because of the high level of traffic, it level of traffic, it

cannot be processed.cannot be processed.

In fact, the entire network can In fact, the entire network can no longer process new traffic no longer process new traffic

and comes to a screeching halt.and comes to a screeching halt.

In fact, the entire network can In fact, the entire network can no longer process new traffic no longer process new traffic

and comes to a screeching halt.and comes to a screeching halt.

Page 14: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-14 Chapter 5-1

Issues with RedundancyIssues with Redundancy

• Duplicate Unicast Frames:Duplicate Unicast Frames:

PC1 sends a PC1 sends a unicastunicast frame frame

to PC4to PC4

PC1 sends a PC1 sends a unicastunicast frame frame

to PC4to PC4

S2 has no entry for S2 has no entry for PC4 so the frame PC4 so the frame is flooded out the is flooded out the remaining portsremaining ports

S2 has no entry for S2 has no entry for PC4 so the frame PC4 so the frame is flooded out the is flooded out the remaining portsremaining ports

Both S3 and S1 have Both S3 and S1 have entries for PC4 so the entries for PC4 so the

frame is forwardedframe is forwarded

Both S3 and S1 have Both S3 and S1 have entries for PC4 so the entries for PC4 so the

frame is forwardedframe is forwarded

S1 also forwards S1 also forwards the frame it the frame it

received from S3received from S3

S1 also forwards S1 also forwards the frame it the frame it

received from S3received from S3

End result….End result….PC4 receives two copies of the same PC4 receives two copies of the same frame. One from S1 and one from S3.frame. One from S1 and one from S3.

End result….End result….PC4 receives two copies of the same PC4 receives two copies of the same frame. One from S1 and one from S3.frame. One from S1 and one from S3.

Page 15: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-15 Chapter 5-1

Real-World Redundancy IssuesReal-World Redundancy Issues

• Loops in the Wiring Closet:Loops in the Wiring Closet:• Usually caused by an error in cabling.Usually caused by an error in cabling.

Page 16: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-16 Chapter 5-1

Real-World Redundancy IssuesReal-World Redundancy Issues

• Loops in Cubicles:Loops in Cubicles:• Some users have a personal switch or hub.Some users have a personal switch or hub.

Affects all of the Affects all of the traffic on S1traffic on S1

Affects all of the Affects all of the traffic on S1traffic on S1

Page 17: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-17 Chapter 5-1

Spanning Tree Protocol (STP)Spanning Tree Protocol (STP)

Introduction to STPIntroduction to STP

Page 18: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-18 Chapter 5-1

Introduction to STPIntroduction to STP

• Redundancy:Redundancy:• Increases the availability of the network topology by Increases the availability of the network topology by

protecting the network from a single point of failure.protecting the network from a single point of failure.• In a Layer 2 design, loops and duplicate frames can In a Layer 2 design, loops and duplicate frames can

occur, having severe consequences.occur, having severe consequences.• The The Spanning Tree Protocol (STP)Spanning Tree Protocol (STP) was developed to address was developed to address

these issues.these issues.• STP ensures that there is only one logical path between STP ensures that there is only one logical path between

all destinations on the network all destinations on the network by intentionally blocking by intentionally blocking redundant pathsredundant paths that could cause a loop. that could cause a loop.

• The switches running STP are able to compensate for The switches running STP are able to compensate for failures byfailures by dynamically unblocking the previously blocked dynamically unblocking the previously blocked portsports and permitting traffic to traverse the alternate paths. and permitting traffic to traverse the alternate paths.

Page 19: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-19 Chapter 5-1

Spanning-Tree Algorithm (STA)Spanning-Tree Algorithm (STA)

• STP Topology – STP Topology – Avoiding a loopAvoiding a loop::

STP is in use and S3 STP is in use and S3 has placed port F0/2 has placed port F0/2 in in blocking stateblocking state to to

avoid a loop.avoid a loop.

STP is in use and S3 STP is in use and S3 has placed port F0/2 has placed port F0/2 in in blocking stateblocking state to to

avoid a loop.avoid a loop.

PC1 sends a PC1 sends a broadcast.broadcast.

PC1 sends a PC1 sends a broadcast.broadcast.

S2 forwards the S2 forwards the broadcast – broadcast – but but

not to S3not to S3..

S2 forwards the S2 forwards the broadcast – broadcast – but but

not to S3not to S3..

S1 forwards the S1 forwards the broadcast.broadcast.

S1 forwards the S1 forwards the broadcast.broadcast.

Because F0/2 is in Because F0/2 is in blocking stateblocking state, the , the broadcast is not broadcast is not

forwardedforwarded back to back to S2. – NO LOOP!S2. – NO LOOP!

Because F0/2 is in Because F0/2 is in blocking stateblocking state, the , the broadcast is not broadcast is not

forwardedforwarded back to back to S2. – NO LOOP!S2. – NO LOOP!

Page 20: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-20 Chapter 5-1

Spanning-Tree Algorithm (STA)Spanning-Tree Algorithm (STA)

• STP Topology – STP Topology – Network FailureNetwork Failure::

Trunk 1 Trunk 1 FailureFailureTrunk 1 Trunk 1 FailureFailure

S3 port S3 port activatedactivatedS3 port S3 port

activatedactivated

PC1 Sends a PC1 Sends a broadcast.broadcast.

PC1 Sends a PC1 Sends a broadcast.broadcast.

S2 forwards the S2 forwards the broadcast.broadcast.

S2 forwards the S2 forwards the broadcast.broadcast.

S3 and S1 forward S3 and S1 forward the broadcast.the broadcast.

S3 and S1 forward S3 and S1 forward the broadcast.the broadcast.

Trunk 1 comes Trunk 1 comes back up.back up.

Trunk 1 comes Trunk 1 comes back up.back up.

S3 port back to S3 port back to blocking modeblocking mode..S3 port back to S3 port back to blocking modeblocking mode..

Page 21: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-21 Chapter 5-1

Spanning-Tree Algorithm (STA)Spanning-Tree Algorithm (STA)

• Terminology:Terminology:• Root Bridge:Root Bridge:

• A single switch used as the A single switch used as the reference pointreference point for all for all calculations.calculations.

• Root Ports:Root Ports:• The switch port closest to the root bridge.The switch port closest to the root bridge.

• Designated Port:Designated Port:• All non-root ports that are still permitted to forward All non-root ports that are still permitted to forward

traffic on the network.traffic on the network.• Non-designated Ports:Non-designated Ports:

• All ports configured to be in a blocking state to prevent All ports configured to be in a blocking state to prevent loops.loops.

Page 22: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-22 Chapter 5-1

Spanning-Tree Algorithm (STA)Spanning-Tree Algorithm (STA)

• STP uses the STP uses the Spanning Tree Algorithm Spanning Tree Algorithm (STA) to determine (STA) to determine which switch ports on a network need to be configured for which switch ports on a network need to be configured for blocking to prevent loops. blocking to prevent loops.

• Through an election process, the algorithm designates a Through an election process, the algorithm designates a single switch as the root bridgesingle switch as the root bridge and uses it as the and uses it as the reference point for all calculations.reference point for all calculations.

• The election process is controlled by the The election process is controlled by the Bridge-ID (BID)Bridge-ID (BID). .

BridgePriority

MACMACAddressAddress

2222 6666

Page 23: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-23 Chapter 5-1

Root BridgeRoot Bridge

• Election Process:Election Process:• All switches in the broadcast domain participate.All switches in the broadcast domain participate.• After a switch boots, it sends out Bridge Protocol Data After a switch boots, it sends out Bridge Protocol Data

Units Units (BPDU)(BPDU) frames containing the frames containing the switch BIDswitch BID and the and the root IDroot ID every 2 seconds. every 2 seconds.• TheThe root ID root ID identifies the root bridge on the network. identifies the root bridge on the network.

• By defaultBy default, the , the root ID matches the local BIDroot ID matches the local BID for all for all switches on the network. switches on the network. • In other words, each switch considers itself as the root In other words, each switch considers itself as the root

bridge when it bootsbridge when it boots..

Page 24: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-24 Chapter 5-1

Root BridgeRoot Bridge

• Election Process:Election Process:• As the switches forward their BPDU frames, switches in As the switches forward their BPDU frames, switches in

the broadcast domain the broadcast domain read the root ID informationread the root ID information from from the BPDU frame.the BPDU frame.

• If the root ID from the BPDUIf the root ID from the BPDU received is lower than the received is lower than the root ID on the receiving switchroot ID on the receiving switch, the receiving switch , the receiving switch updates its root ID identifying the adjacent switch as the updates its root ID identifying the adjacent switch as the root bridge.root bridge.

• The switch then forwards The switch then forwards new BPDU frames with the new BPDU frames with the lower root IDlower root ID to the other adjacent switches. to the other adjacent switches.

• Eventually, Eventually, the switch with the the switch with the lowest BIDlowest BID ends up being ends up being identified as the root bridgeidentified as the root bridge for the spanning-tree for the spanning-tree instance.instance.

Page 25: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-25 Chapter 5-1

Best PathBest Path

• Now that the root bridge has been elected, the STA starts the Now that the root bridge has been elected, the STA starts the process of determining the process of determining the best paths to the root bridge from best paths to the root bridge from all destinationsall destinations in the broadcast domain. in the broadcast domain.

• The path information is determined by The path information is determined by summing up the summing up the individual port costsindividual port costs along the path from the destination to the along the path from the destination to the root bridge.root bridge.

• The The default port costsdefault port costs are specified by the IEEE and defined are specified by the IEEE and defined by the speed at which the port operates.by the speed at which the port operates.

Link SpeedLink Speed CostCost

10Gbps 2

1Gbps 4

100Mbps 19

10Mbps 100

Page 26: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-26 Chapter 5-1

Best PathBest Path

• You are not restricted to the defaultsYou are not restricted to the defaults..• The cost of a path The cost of a path can be manually configuredcan be manually configured to specify to specify

that a specific path is the preferred path instead of that a specific path is the preferred path instead of allowing the STA to choose the best path.allowing the STA to choose the best path.

• Realize, however, that changing the cost of a particular Realize, however, that changing the cost of a particular path will affect the results of the STA.path will affect the results of the STA.

• The The ‘no’ ‘no’ form of the following command will return the form of the following command will return the cost to its default value.cost to its default value.

switch(config)#interface fa0/1switch(config)#interface fa0/1

switch(config-if)#spanning-tree cost switch(config-if)#spanning-tree cost [value][value]

switch(config-if)#endswitch(config-if)#end

Page 27: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-27 Chapter 5-1

Best PathBest Path

• Verifying the port and path costVerifying the port and path cost..

Port CostPort CostPort CostPort Cost

Path CostPath CostPath CostPath Cost

Page 28: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-28 Chapter 5-1

STP Bridge Protocol Data UnitSTP Bridge Protocol Data Unit

• STP determines a root bridge for the spanning-tree instance STP determines a root bridge for the spanning-tree instance by exchanging Bridge Protocol Data Units by exchanging Bridge Protocol Data Units (BPDU)(BPDU)..

Identifies the root Identifies the root bridge and the bridge and the

cost of the path to cost of the path to the root bridge.the root bridge.

Identifies the root Identifies the root bridge and the bridge and the

cost of the path to cost of the path to the root bridge.the root bridge.

Page 29: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-29 Chapter 5-1

STP Bridge Protocol Data UnitSTP Bridge Protocol Data Unit

• STP determines a root bridge for the spanning-tree instance STP determines a root bridge for the spanning-tree instance by exchanging Bridge Protocol Data Units by exchanging Bridge Protocol Data Units (BPDU)(BPDU)..

Page 30: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-30 Chapter 5-1

BPDU ProcessBPDU Process

• Root Bridge Election Process:Root Bridge Election Process:

S3 believes S2 is the root bridge.S3 believes S2 is the root bridge.S1 still thinks it is the root bridge.S1 still thinks it is the root bridge.S3 believes S2 is the root bridge.S3 believes S2 is the root bridge.S1 still thinks it is the root bridge.S1 still thinks it is the root bridge.

Page 31: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-31 Chapter 5-1

BPDU ProcessBPDU Process

• Root Bridge Election Process:Root Bridge Election Process:

S2 and S1 both think that theyS2 and S1 both think that theyare the root bridge.are the root bridge.

S2 and S1 both think that theyS2 and S1 both think that theyare the root bridge.are the root bridge.

Page 32: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-32 Chapter 5-1

BPDU ProcessBPDU Process

• Root Bridge Election Process:Root Bridge Election Process:

S3 recognizes S1 as the root.S3 recognizes S1 as the root.S2 recognizes S1 as the root.S2 recognizes S1 as the root.S3 recognizes S1 as the root.S3 recognizes S1 as the root.S2 recognizes S1 as the root.S2 recognizes S1 as the root.

Page 33: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-33 Chapter 5-1

BPDU ProcessBPDU Process

• Root Bridge Election Process:Root Bridge Election Process:

If the root bridge fails, the election If the root bridge fails, the election process begins again.process begins again.

If the root bridge fails, the election If the root bridge fails, the election process begins again.process begins again.

Page 34: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-34 Chapter 5-1

Bridge IDBridge ID

Early STP implementation – no VLANs.Early STP implementation – no VLANs.Early STP implementation – no VLANs.Early STP implementation – no VLANs.

Changed to include VLAN ID.Changed to include VLAN ID.Changed to include VLAN ID.Changed to include VLAN ID.

That means that there is That means that there is a separate a separate instance of STPinstance of STP for each VLAN. for each VLAN.

That means that there is That means that there is a separate a separate instance of STPinstance of STP for each VLAN. for each VLAN.

Page 35: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-35 Chapter 5-1

Bridge IDBridge ID

Page 36: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-36 Chapter 5-1

Bridge IDBridge ID

• Bridge Priority:Bridge Priority:• A customizable value that you can use to A customizable value that you can use to influence which influence which

switch becomes the root bridgeswitch becomes the root bridge.. (Another rigged election!) (Another rigged election!)

• The switch with the The switch with the lowest prioritylowest priority, which means lowest , which means lowest BID, BID, becomes the root bridgebecomes the root bridge..• TheThe lower lower the priority the priority valuevalue, the , the higherhigher the the prioritypriority. .

Page 37: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-37 Chapter 5-1

Bridge IDBridge ID

• Bridge Priority:Bridge Priority:• Notice that the addition of the VLAN ID Notice that the addition of the VLAN ID leaves fewer bitsleaves fewer bits

available for the bridge priority (4 instead of 16).available for the bridge priority (4 instead of 16).• As a result, the bridge priority is assigned in As a result, the bridge priority is assigned in multiples of multiples of

40964096..• The The priority is added to the extended system valuepriority is added to the extended system value (VLAN (VLAN

ID) to uniquely identify the priority and VLAN of the BPDU ID) to uniquely identify the priority and VLAN of the BPDU frame.frame.

++++

Page 38: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-38 Chapter 5-1

Bridge IDBridge ID

• Bridge Priority:Bridge Priority:• For example:For example:

• The The default default bridge priority is bridge priority is 32,76932,769..• (4096 * 8) + VLAN 1 ( native VLAN)(4096 * 8) + VLAN 1 ( native VLAN)

• If I assign bridge priority 24,576 for VLAN 1 (4096 *6), If I assign bridge priority 24,576 for VLAN 1 (4096 *6), the bridge priority becomes the bridge priority becomes 24,56724,567..• This switch will become the root bridge.This switch will become the root bridge.

++++

Page 39: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-39 Chapter 5-1

Bridge IDBridge ID

• Bridge Priority:Bridge Priority:

Default Priority:Default Priority:Election based on Election based on

MAC AddressMAC Address

Default Priority:Default Priority:Election based on Election based on

MAC AddressMAC Address

Page 40: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-40 Chapter 5-1

Bridge IDBridge ID

• Bridge Priority:Bridge Priority:

Modified Priority:Modified Priority:Election based on Election based on

priority.priority.

Modified Priority:Modified Priority:Election based on Election based on

priority.priority.

Page 41: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-41 Chapter 5-1

Configure and Verify the Bridge IDConfigure and Verify the Bridge ID

• Two Methods to configure the Bridge ID:Two Methods to configure the Bridge ID:• Method 1:Method 1: Ensures that the switch has the Ensures that the switch has the

lowest priority valuelowest priority value after determining after determining the lowest value on the network.the lowest value on the network.

Ensures that the switch has the Ensures that the switch has the lowest priority valuelowest priority value after determining after determining

the lowest value on the network.the lowest value on the network.

Ensures that the switch will become the root bridge Ensures that the switch will become the root bridge if the primary fails. if the primary fails. This one assumes that all other This one assumes that all other

switches have the default valueswitches have the default value..

Ensures that the switch will become the root bridge Ensures that the switch will become the root bridge if the primary fails. if the primary fails. This one assumes that all other This one assumes that all other

switches have the default valueswitches have the default value..

Page 42: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-42 Chapter 5-1

Configure and Verify the Bridge IDConfigure and Verify the Bridge ID

• Two Methods to configure the Bridge ID:Two Methods to configure the Bridge ID:• Method 2:Method 2:

VLAN ID NumberVLAN ID NumberVLAN ID NumberVLAN ID Number Priority valuePriority valuePriority valuePriority value

Page 43: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-43 Chapter 5-1

Configure and Verify the Bridge IDConfigure and Verify the Bridge ID

Page 44: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-44 Chapter 5-1

Port RolesPort Roles

• The The root bridgeroot bridge is elected for the spanning-tree instance. is elected for the spanning-tree instance.• The location of the root bridgeThe location of the root bridge in the network topology in the network topology

determines how port roles are calculated.determines how port roles are calculated.• Root Port:Root Port:

• The switch port with the best path to forward traffic to The switch port with the best path to forward traffic to the root bridge.the root bridge.

• Designated Port:Designated Port:• The switch port that receives and forwards frames The switch port that receives and forwards frames

toward the root bridgetoward the root bridge as needed. Only as needed. Only oneone designated port is allowed per designated port is allowed per segmentsegment..

• Non-designated Port:Non-designated Port:• A switch port that is blocked, so it is not forwarding A switch port that is blocked, so it is not forwarding

data frames. data frames.

Page 45: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-45 Chapter 5-1

Port RolesPort Roles

• The STA determines which port role is assigned to each The STA determines which port role is assigned to each switch port. switch port.

• To determine the To determine the root portroot port on a switch: on a switch:• The The switch compares the path costs on all switch portsswitch compares the path costs on all switch ports

participating in the spanning tree.participating in the spanning tree.• When there are two switch ports that have the same path When there are two switch ports that have the same path

cost to the root bridge:cost to the root bridge:• The switch uses the The switch uses the customizable port priority value, customizable port priority value,

or the lowest port IDor the lowest port ID to break the tie. to break the tie.• The port ID is the number of the connected port. The port ID is the number of the connected port.

Page 46: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-46 Chapter 5-1

Port Roles – Root PortPort Roles – Root Port

• For Example:For Example: Default Port Priority = 128Default Port Priority = 128Default Port Priority = 128Default Port Priority = 128

F0/1 Priority = 128,1F0/1 Priority = 128,1F0/1 Priority = 128,1F0/1 Priority = 128,1

Page 47: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-47 Chapter 5-1

Port Roles – Root PortPort Roles – Root Port

• You can specify the root port:You can specify the root port:• Configure Port Priority:Configure Port Priority:

• Priority values Priority values 0 - 2400 - 240, in , in increments of 16increments of 16. . • DefaultDefault port priority value is port priority value is 128128..• The The lowerlower the port priority the port priority valuevalue, the , the higherhigher the the

prioritypriority..

Page 48: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-48 Chapter 5-1

Port Roles – Root PortPort Roles – Root Port

• Verifying the Port Priority:Verifying the Port Priority:

Page 49: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-49 Chapter 5-1

STP Port States and BPDU TimersSTP Port States and BPDU Timers

• Port States:Port States:• The spanning tree is determined by the exchange of the The spanning tree is determined by the exchange of the

BPDU frames between the interconnected switches.BPDU frames between the interconnected switches.• Each switch port:Each switch port:

• FiveFive possible port states. possible port states.• ThreeThree BPDU timers. BPDU timers.

• WHY?WHY?• The spanning tree is determined The spanning tree is determined immediately afterimmediately after the the

switch has finished booting.switch has finished booting.• Going directly from a blocking state to a forwarding Going directly from a blocking state to a forwarding

state could create a temporary loop.state could create a temporary loop.• The five states and the timers address this issue.The five states and the timers address this issue.

Page 50: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-50 Chapter 5-1

STP Port States and BPDU TimersSTP Port States and BPDU Timers

• Port States:Port States:• Blocking:Blocking:

• The port is a The port is a non-designatednon-designated port and does not port and does not participate in frame forwarding.participate in frame forwarding.

• Listening:Listening:• STP has determined that the port STP has determined that the port can participate in can participate in

frame forwardingframe forwarding according to the BPDU frames that according to the BPDU frames that the switch has received thus far.the switch has received thus far.

• Learning:Learning:• The port The port prepares to participate in frame forwardingprepares to participate in frame forwarding

and begins to populate the MAC address table.and begins to populate the MAC address table.

Page 51: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-51 Chapter 5-1

STP Port States and BPDU TimersSTP Port States and BPDU Timers

• Port States:Port States:• Forwarding:Forwarding:

• The port is considered The port is considered part of the active topologypart of the active topology and and forwards frames and also sends and receives BPDU forwards frames and also sends and receives BPDU frames.frames.

• Disabled:Disabled:• The Layer 2 port The Layer 2 port does not participatedoes not participate in STP and does in STP and does

not forward frames.not forward frames.

Page 52: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-52 Chapter 5-1

STP Port States and BPDU TimersSTP Port States and BPDU Timers

• BPDU Timers:BPDU Timers:• The amount of time that a port stays in the various port The amount of time that a port stays in the various port

states depends on the BPDU timers.states depends on the BPDU timers.• Only the switch in the role of root bridgeOnly the switch in the role of root bridge may send may send

information through the tree to adjust the timers.information through the tree to adjust the timers.

Page 53: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-53 Chapter 5-1

STP Port States and BPDU TimersSTP Port States and BPDU Timers

• BPDU Timers:BPDU Timers:• At power up:At power up:

• Every switch port goes through the Every switch port goes through the blocking, listening blocking, listening and learningand learning states. states.• The ports then stabilize to the The ports then stabilize to the forwarding or forwarding or

blockingblocking state. state.• During a topology change:During a topology change:

• A port temporarily implements the A port temporarily implements the listening and listening and learninglearning states for a specified period. states for a specified period.

Power up DelayPower up DelayMaximum ofMaximum of

15 + 15 = 30 Seconds15 + 15 = 30 Seconds

Power up DelayPower up DelayMaximum ofMaximum of

15 + 15 = 30 Seconds15 + 15 = 30 Seconds

Page 54: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-54 Chapter 5-1

STP Port States and BPDU TimersSTP Port States and BPDU Timers

• BPDU Timers:BPDU Timers:• There is a race There is a race

between operatingbetween operatingsystems and CPUsystems and CPUmanufacturers. manufacturers.

• CPU manufacturers keepCPU manufacturers keepmaking the chips faster, while, at the same time, making the chips faster, while, at the same time, operating systems keep slowing down.operating systems keep slowing down.

• As a result the BPDU timer delays can affect DHCP.As a result the BPDU timer delays can affect DHCP.• A network device is often booted and ready to use the A network device is often booted and ready to use the

network before the switch port becomes active.network before the switch port becomes active.• This can prevent the device from immediately obtaining a This can prevent the device from immediately obtaining a

useable IP configuration from DHCP.useable IP configuration from DHCP.

Page 55: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-55 Chapter 5-1

Cisco PortFastCisco PortFast

• Cisco has addressed this issue with their Cisco has addressed this issue with their PortFastPortFast technology.technology.

• The port is configured as an access port.The port is configured as an access port.• The port transitions from The port transitions from blocking to forwarding state blocking to forwarding state

immediatelyimmediately, bypassing the listening and learning states., bypassing the listening and learning states.

• PortFast is disabled by default.PortFast is disabled by default.• It should be used It should be used only on access portsonly on access ports..• If you enable PortFast on a port connecting to another If you enable PortFast on a port connecting to another

switch, you risk creating a spanning-tree loopswitch, you risk creating a spanning-tree loop..

Page 56: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-56 Chapter 5-1

Putting It All TogetherPutting It All Together

• STP Convergence:• Convergence is the time it takes for the network to:

• Determine which switch is going to assume the role of the root bridge.

• Set switch ports to their final spanning-tree port roles where all potential loops are eliminated.

• Three Steps:

1. Elect a root bridge.

2. Elect the root ports.

3. Elect the Designated and Non-designated ports.

Page 57: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-57 Chapter 5-1

Putting It All Together - Step 1Putting It All Together - Step 1

• Elect a Root Bridge:Elect a Root Bridge:

RootRootRootRoot

RootRootRootRoot

RootRootRootRootRoot ID Root ID 32769.00A22232769.00A222Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 32769.00A22232769.00A222Bridge ID Bridge ID 3279.00A2223279.00A222

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111

Page 58: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-58 Chapter 5-1

Putting It All Together – Step 1Putting It All Together – Step 1

• Elect a Root Bridge:Elect a Root Bridge:

RootRootRootRoot

RootRootRootRootRoot ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222

Page 59: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-59 Chapter 5-1

Putting It All Together – Step 1Putting It All Together – Step 1

• Elect a Root Bridge:Elect a Root Bridge:

RootRootRootRoot

RootRootRootRootRoot ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A2223279.00A222

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111

Page 60: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-60 Chapter 5-1

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222

Putting It All Together – Step 2Putting It All Together – Step 2

• Root Ports:Root Ports:

RootRootRootRoot

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111

Throughout the root bridge election, the Throughout the root bridge election, the path costpath cost has also been updated. has also been updated.All links are 100Mbps. All links are 100Mbps. Cost = 19Cost = 19

Throughout the root bridge election, the Throughout the root bridge election, the path costpath cost has also been updated. has also been updated.All links are 100Mbps. All links are 100Mbps. Cost = 19Cost = 19

38383838

19191919

38383838

RR

RR

Page 61: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-61 Chapter 5-1

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222

Putting It All Together – Step 3Putting It All Together – Step 3

• Designated and Non-designated Ports:Designated and Non-designated Ports:

RootRootRootRoot

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333

RR

RR

DD

DD

S1 is the S1 is the root bridgeroot bridge so so both ports become both ports become designateddesignated ports. ports.

S1 is the S1 is the root bridgeroot bridge so so both ports become both ports become designateddesignated ports. ports.

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111

DD

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222

Page 62: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-62 Chapter 5-1

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222

Putting It All Together – Step 3Putting It All Together – Step 3

• Designated and Non-designated Ports:Designated and Non-designated Ports:

RootRootRootRoot

Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 32769.00A11132769.00A111Bridge ID Bridge ID 3279.00A1113279.00A111

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 24577.00A33324577.00A333

RR

RR

DD

DD

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111

DD

NDNDXX

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A2223279.00A222

Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111Root ID Root ID 24577.00A33324577.00A333Bridge ID Bridge ID 3279.00A1113279.00A111

Page 63: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-63 Chapter 5-1

Putting It All TogetherPutting It All Together

• Verifying STP Configuration:Verifying STP Configuration:

RR

RR

DD

DD

DD

NDNDXX

RootRootRootRoot

Page 64: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-64 Chapter 5-1

Putting It All TogetherPutting It All Together

• Verifying STP Configuration:Verifying STP Configuration:

RR

RR

DD

DD

DD

NDNDXX

RootRootRootRoot

Page 65: CCNA3-1 Chapter 5-1 Chapter 5 Spanning Tree Protocol (STP) Part I.

CCNA3-65 Chapter 5-1

Putting It All TogetherPutting It All Together

• Verifying STP Configuration:Verifying STP Configuration:

RR

RR

DD

DD

DD

NDNDXX

RootRootRootRoot


Recommended