Documente Academic
Documente Profesional
Documente Cultură
(Instructor Version)
Instructor Note: Red font color or Gray highlights indicate text that appears in the instructor copy only.
Topology
Addressing Table
Device
Interface
IP Address
Subnet Mask
S1
VLAN 1
192.168.1.1
255.255.255.0
S2
VLAN 1
192.168.1.2
255.255.255.0
S3
VLAN 1
192.168.1.3
255.255.255.0
Objectives
Part 1: Build the Network and Configure Basic Device Settings
Part 2: Determine the Root Bridge
Part 3: Observe STP Port Selection Based on Port Cost
Part 4: Observe STP Port Selection Based on Port Priority
Background / Scenario
Redundancy increases the availability of devices in the network topology by protecting the network from a
single point of failure. Redundancy in a switched network is accomplished through the use of multiple
switches or multiple links between switches. When physical redundancy is introduced into a network design,
loops and duplicate frames can occur.
The Spanning Tree Protocol (STP) was developed as a Layer 2 loop-avoidance mechanism for redundant
links in a switched network. 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.
In this lab, you will use the show spanning-tree command to observe the STP election process of the root
bridge. You will also observe the port selection process based on cost and priority.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 1 of 18
Required Resources
3 Switches (Cisco 2960 with Cisco IOS Release 15.0(2) lanbasek9 image or comparable)
Console cables to configure the Cisco IOS devices via the console ports
d. Assign cisco as the console and vty passwords and enable login for console and vty lines.
e. Configure logging synchronous for the console line.
f.
Configure a message of the day (MOTD) banner to warn users that unauthorized access is prohibited.
g. Configure the IP address listed in the Addressing Table for VLAN 1 on all switches.
h. Copy the running configuration to the startup configuration.
_________ Yes
_________ Yes
_________ Yes
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 2 of 18
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 3 of 18
Priority
Address
Hello Time
Aging Time
Interface
------------------Fa0/2
Fa0/4
Role
---Root
Altn
Cost
--------19
19
Prio.Nbr
-------128.2
128.4
Type
-------------------------------P2p
P2p
Priority
Address
Hello Time
Aging Time
Interface
------------------Fa0/2
Fa0/4
Role
---Desg
Desg
Cost
--------19
19
Prio.Nbr
-------128.2
128.4
Type
-------------------------------P2p
P2p
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 4 of 18
Priority
Address
Hello Time
Aging Time
Interface
------------------Fa0/2
Fa0/4
Role
---Root
Desg
Cost
--------19
19
Prio.Nbr
-------128.2
128.4
Type
-------------------------------P2p
P2p
Note: The default STP mode on the 2960 switch is Per VLAN Spanning Tree (PVST).
In the diagram below, record the Role and Status (Sts) of the active ports on each switch in the Topology.
Based on the output from your switches, answer the following questions.
Which switch is the root bridge? ____________ Answers will vary, the above output shows S2 as the root
bridge.
Why did spanning tree select this switch as the root bridge?
_______________________________________________________________________________________
The root bridge was chosen because it had the lowest bridge ID (Priority value + extended system ID (VLAN)
+ MAC address of switch).
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 5 of 18
Priority
Address
Hello Time
Aging Time
Interface
------------------Fa0/2
Fa0/4
Role
---Root
Altn
Cost
--------19
19
Prio.Nbr
-------128.2
128.4
Type
-------------------------------P2p
P2p
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 6 of 18
Priority
Address
Hello Time
Aging Time
Interface
------------------Fa0/2
Fa0/4
Role
---Root
Desg
Cost
--------19
19
Prio.Nbr
-------128.2
128.4
Type
-------------------------------P2p
P2p
Note: Root bridge and port selection may differ in your topology.
Priority
Address
Hello Time
Aging Time
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 7 of 18
Role
---Root
Desg
Sts
--FWD
FWD
Cost
--------18
19
Prio.Nbr
-------128.2
128.4
Type
-------------------------------P2p
P2p
Priority
Address
Hello Time
Aging Time
Interface
------------------Fa0/2
Fa0/4
Role
---Root
Altn
Cost
--------19
19
Prio.Nbr
-------128.2
128.4
Type
-------------------------------P2p
P2p
Why did spanning tree change the previously blocked port to a designated port, and block the port that was a
designated port on the other switch?
_______________________________________________________________________________________
STP looks at path cost first. The port with the lower path cost will always be preferred over a port with a
higher path cost.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 8 of 18
Priority
Address
Hello Time
Aging Time
Interface
------------------Fa0/1
Fa0/2
Fa0/3
Fa0/4
Role
---Root
Altn
Altn
Altn
Cost
--------19
19
19
19
Prio.Nbr
-------128.1
128.2
128.3
128.4
Type
-------------------------------P2p
P2p
P2p
P2p
Priority
Address
Hello Time
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 9 of 18
Role
---Root
Altn
Desg
Desg
15
sec
Sts
--FWD
BLK
FWD
FWD
Cost
--------19
19
19
19
Prio.Nbr
-------128.1
128.2
128.3
128.4
Type
-------------------------------P2p
P2p
P2p
P2p
What port did STP select as the root port on each non-root switch? _________________________________
Answers will vary, but in the example above S1 F0/1, and S3 F0/1.
Why did STP select these ports as the root port on these switches?
_______________________________________________________________________________________
_______________________________________________________________________________________
The default port value of the ports is 128; therefore, STP used the port number to break the tie. It selected the
lower port number as the root port, and blocked the higher-numbered port with the redundant path to the root
bridge.
Reflection
1. After a root bridge has been selected, what is the first value STP uses to determine port selection?
_______________________________________________________________________________________
Path cost. It selects the path with the lower accumulated cost.
2. If the first value is equal on the two ports, what is the next value that STP uses to determine port selection?
_______________________________________________________________________________________
BID by selecting the lower value.
3. If both values are equal on the two ports, what is the next value that STP uses to determine port selection?
_______________________________________________________________________________________
An aggregation of the port priority and the port number, the lower value is preferred.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 10 of 18
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 11 of 18
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 12 of 18
Switch S2
S2# show run
Building configuration...
Current configuration : 1827 bytes
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname S2
!
boot-start-marker
boot-end-marker
!
enable secret 4 06YFDUHH61wAE/kLkDq9BGho1QM5EnRtoyr8cHAUg.2
!
no aaa new-model
system mtu routing 1500
!
no ip domain-lookup
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface FastEthernet0/1
switchport mode trunk
!
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 13 of 18
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 14 of 18
Switch S3
S3# show run
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 15 of 18
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 16 of 18
FastEthernet0/8
FastEthernet0/9
FastEthernet0/10
FastEthernet0/11
FastEthernet0/12
FastEthernet0/13
FastEthernet0/14
FastEthernet0/15
FastEthernet0/16
FastEthernet0/17
FastEthernet0/18
FastEthernet0/19
FastEthernet0/20
FastEthernet0/21
FastEthernet0/22
FastEthernet0/23
FastEthernet0/24
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 17 of 18
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 18 of 18