Lab 2 STP
Lab 2 STP
Lab 2 STP
Topology:
ASW1:
Switch> enable
Switch# configure terminal
Switch(config)#hostname ASW1
ASW1(config)# no ip domain lookup
ASW1(config)#enable secret class
ASW1(config)#line console 0
ASW1(config-line)#password cisco
ASW1(config-line)#login
ASW1(config-line)#logging synchronous
ASW1(config-line)#exit
ASW1(config)#line vty 0 15
1
ASW1(config-line)#password cisco
ASW1(config-line)#login
ASW1(config-line)# logging synchronous
ASW1(config-line)# exec-timeout 0 0
ASW1(config-line)#exit
ASW1(config)#banner login #Welcome to CISCO network#
ASW1(config)#exit
ASW1#copy running-config startup-config
Switch> enable
Switch# configure terminal
Switch(config)#hostname ASW2
ASW2(config)# no ip domain lookup
ASW2(config)#enable secret class
ASW2(config)#line console 0
ASW2(config-line)#password cisco
ASW2(config-line)#login
ASW2(config-line)#logging synchronous
ASW2(config-line)#exit
ASW2(config)#line vty 0 15
ASW2(config-line)#password cisco
ASW2(config-line)#login
ASW2(config-line)# logging synchronous
ASW2(config-line)# exec-timeout 0 0
ASW2(config-line)#exit
ASW2(config)#banner login #Welcome to CISCO network#
ASW2(config)#exit
ASW2#copy running-config startup-config
Switch> enable
Switch# configure terminal
Switch(config)#hostname ASW2
DSW1(config)# no ip domain lookup
DSW1(config)#enable secret class
DSW1(config)#line console 0
DSW1(config-line)#password cisco
DSW1(config-line)#login
DSW1(config-line)#logging synchronous
DSW1(config-line)#exit
DSW1(config)#line vty 0 15
DSW1(config-line)#password cisco
DSW1(config-line)#login
DSW1(config-line)# logging synchronous
DSW1(config-line)# exec-timeout 0 0
DSW1(config-line)#exit
DSW1(config)#banner login #Welcome to CISCO network#
DSW1(config)#exit
DSW1#copy running-config startup-config
2
Step 4: Create VLANs according to topology on ASW1
ASW1(config)# Vlan 10
ASW1(config-vlan)#name Staff
ASW1(config-vlan)#exit
ASW1(config)# Vlan 20
ASW1(config-vlan)#name Students
ASW1(config-vlan)#exit
ASW1(config)# Vlan 30
ASW1(config-vlan)#name Management
ASW1(config-vlan)#exit
ASW1(config)# Vlan 100
ASW1(config-vlan)#name Native
ASW1(config-vlan)#exit
ASW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.428E.924A
This bridge is the root
4
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Address 0001.428E.924A
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN0020
Spanning tree enabled protocol ieee
Root ID Priority 32788
Address 0001.428E.924A
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN0030
Spanning tree enabled protocol ieee
Root ID Priority 32798
Address 0001.428E.924A
This bridge is the root
5
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN0100
Spanning tree enabled protocol ieee
Root ID Priority 32868
Address 0001.428E.924A
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Verification:
VLAN0020
Spanning tree enabled protocol rstp
Root ID Priority 24596
Address 0010.116B.B7B9
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
8
Fa0/3 Desg FWD 19 128.3 P2p
Step 12:Configure ASW2 to be Root Bridge for VLANs 30 and 100 and secondary root for
VLANs 10 and 20
VLAN0100
Spanning tree enabled protocol rstp
Root ID Priority 24676
Address 00E0.F77E.2880
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
9
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.428E.924A
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
ASW1#
ASW1 is Root Bridge so he will have 2 Designated ports in forwarding state as we can see from
above output:
DSW1 will have one root port and one designated port as we can see
ASW2 will have one root port and one Alternate Blocked port
10
RP DP
Blocked
DP
Root Bridge
DP RP
Root Bridge
DP
DP
RP RP
DP
Blocked
11
Why is this important?
With RPVST+ we can alter paths and as you saw different VLANs will take different paths and
we can use all links.
In STP and RSTP we can’t do this all VLANS will follow same path. We will have only one
topology for all VLANs like in Step 13 when ASW1 was Root Bridge for all VLANs ant topology
looked like this.
RP DP
Blocked
DP
Root Bridge
DP RP
This way link between ASW2 and DSW1 was never used.
Go to File >> Save as >> name file your First Name_Last Name_Lab_2_STP_Final and save.
John_Doe_Lab_1_STP_Final.pkt
12
Current configuration : 1512 bytes Current configuration : 1632 bytes Current configuration : 1558 bytes
! ! !
version 12.2 version 12.2 version 12.2
no service timestamps log datetime msec no service timestamps log datetime msec no service timestamps log datetime
no service timestamps debug datetime no service timestamps debug datetime msec
msec msec no service timestamps debug datetime
no service password-encryption no service password-encryption msec
! ! no service password-encryption
hostname ASW1 hostname ASW2 !
! ! hostname DSW1
enable secret 5 enable secret 5 !
$1$mERr$9cTjUIEqNGurQiFU.ZeCi1 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1 enable secret 5
! ! $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
! ! !
! ! !
no ip domain-lookup no ip domain-lookup !
! ! no ip domain-lookup
! ! !
spanning-tree mode pvst spanning-tree mode rapid-pvst !
spanning-tree extend system-id spanning-tree extend system-id spanning-tree mode rapid-pvst
! spanning-tree vlan 30 priority 4096 spanning-tree extend system-id
interface FastEthernet0/1 spanning-tree vlan 100 priority 24576 spanning-tree vlan 10,20 priority 24576
description Connects to ASW2 spanning-tree vlan 10,20 priority 28672 !
switchport trunk native vlan 100 ! interface FastEthernet0/1
switchport mode trunk interface FastEthernet0/1 !
! description Connects to ASW1 interface FastEthernet0/2
interface FastEthernet0/2 switchport trunk native vlan 100 description Connects to ASW1
description Connects to DSW1 switchport mode trunk switchport trunk native vlan 100
switchport trunk native vlan 100 ! switchport mode trunk
switchport mode trunk interface FastEthernet0/2 !
! ! interface FastEthernet0/3
interface FastEthernet0/3 interface FastEthernet0/3 description Connects to ASW2
! description Connects to DSW1 switchport trunk native vlan 100
interface FastEthernet0/4 switchport trunk native vlan 100 switchport mode trunk
! switchport mode trunk !
interface FastEthernet0/5 ! interface FastEthernet0/4
! interface FastEthernet0/4 !
interface FastEthernet0/6 ! interface FastEthernet0/5
! interface FastEthernet0/5 !
interface FastEthernet0/7 ! interface FastEthernet0/6
! interface FastEthernet0/6 !
interface FastEthernet0/8 ! interface FastEthernet0/7
! interface FastEthernet0/7 !
interface FastEthernet0/9 ! interface FastEthernet0/8
! interface FastEthernet0/8 !
interface FastEthernet0/10 ! interface FastEthernet0/9
! interface FastEthernet0/9 !
interface FastEthernet0/11 ! interface FastEthernet0/10
! interface FastEthernet0/10 !
interface FastEthernet0/12 ! interface FastEthernet0/11
! interface FastEthernet0/11 !
interface FastEthernet0/13 ! interface FastEthernet0/12
! interface FastEthernet0/12 !
interface FastEthernet0/14 ! interface FastEthernet0/13
! interface FastEthernet0/13 !
interface FastEthernet0/15 ! interface FastEthernet0/14
! interface FastEthernet0/14 !
interface FastEthernet0/16 ! interface FastEthernet0/15
! interface FastEthernet0/15 !
interface FastEthernet0/17 ! interface FastEthernet0/16
! interface FastEthernet0/16 !
interface FastEthernet0/18 ! interface FastEthernet0/17
! interface FastEthernet0/17 !
interface FastEthernet0/19 ! interface FastEthernet0/18
! interface FastEthernet0/18 !
interface FastEthernet0/20 ! interface FastEthernet0/19
! interface FastEthernet0/19 !
13
interface FastEthernet0/21 ! interface FastEthernet0/20
! interface FastEthernet0/20 !
interface FastEthernet0/22 ! interface FastEthernet0/21
! interface FastEthernet0/21 !
interface FastEthernet0/23 ! interface FastEthernet0/22
! interface FastEthernet0/22 !
interface FastEthernet0/24 ! interface FastEthernet0/23
! interface FastEthernet0/23 !
interface GigabitEthernet0/1 ! interface FastEthernet0/24
! interface FastEthernet0/24 !
interface GigabitEthernet0/2 ! interface GigabitEthernet0/1
! interface GigabitEthernet0/1 !
interface Vlan1 ! interface GigabitEthernet0/2
no ip address interface GigabitEthernet0/2 !
shutdown ! interface Vlan1
! interface Vlan1 no ip address
banner motd ^CWelcome to CISCO no ip address shutdown
network^C shutdown !
! ! banner motd ^CWelcome to CISCO
! banner motd ^CWelcome to CISCO network^C
! network^C !
line con 0 ! !
password cisco ! !
logging synchronous ! line con 0
login line con 0 password cisco
! password cisco logging synchronous
line vty 0 4 logging synchronous login
exec-timeout 0 0 login !
password cisco ! line vty 0 4
logging synchronous line vty 0 4 exec-timeout 0 0
login exec-timeout 0 0 password cisco
line vty 5 15 password cisco logging synchronous
exec-timeout 0 0 logging synchronous login
password cisco login line vty 5 15
logging synchronous line vty 5 15 exec-timeout 0 0
login exec-timeout 0 0 password cisco
! password cisco logging synchronous
! logging synchronous login
! login !
! ! !
end ! !
! !
! end
ASW1# end
DSW1#
ASW2#
14