Lab 2 STP

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Lab 2 STP

Topology:

VLAN ID VLAN Name


VLAN 10 10 Staff
VLAN 20 20 Students
VLAN 30 30 Management
VLAN 100 100 Native

Step 1: Basic Configuration of ASW1, ASW2 and DSW1

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

Step 2: Configure ASW2

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

Step 3: Configure DSW1

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

Step 5: Configure VTP on ASW1

ASW1(config)# vtp mode server


ASW1(config)# vtp domain aibt.com
ASW1(config)# vtp password aibt

Step 6: Configure Trunking on ASW1

ASW1(config)# interface fastEthernet 0/1


ASW1(config-if)#description Connects to ASW2
ASW1(config-if)#switchport mode trunk
ASW1(config-if)#switchport trunk native vlan 100

ASW1(config)# interface fastEthernet 0/2


ASW1(config-if)#description Connects to DSW1
ASW1(config-if)#switchport mode trunk
ASW1(config-if)#switchport trunk native vlan 100

Step 7: Configure Trunking on ASW2

ASW2(config)# interface fastEthernet 0/1


ASW2(config-if)#description Connects to ASW1
ASW2(config-if)#switchport mode trunk
ASW2(config-if)#switchport trunk native vlan 100
ASW2(config)# interface fastEthernet 0/3
ASW2(config-if)#description Connects to DSW1
ASW2(config-if)#switchport mode trunk
ASW2(config-if)#switchport trunk native vlan 100

Step 8: Configure Trunking on DSW1

DSW1(config)# interface fastEthernet 0/1


3
DSW1(config-if)#description Connects to ASW1
DSW1(config-if)#switchport mode trunk
DSW1(config-if)#switchport trunk native vlan 100
DSW1(config)# interface fastEthernet 0/3
DSW1(config-if)#description Connects to ASW2
DSW1(config-if)#switchport mode trunk
DSW1(config-if)#switchport trunk native vlan 100

Step 9: Configure VTP on ASW2 and DSW! in client mode.

ASW2(config)# vtp mode client


ASW2(config)# vtp domain aibt.com
ASW2(config)# vtp password aibt

DSW1(config)# vtp mode client


DSW1(config)# vtp domain aibt.com
DSW1(config)# vtp password aibt

ASW2#show vtp status

DSW2#show vtp status

Step 10: Determine Root Bridge

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

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0001.428E.924A
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p - All ports are in Forwarding State
Fa0/2 Desg FWD 19 128.2 P2p

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

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)


Address 0001.428E.924A
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p

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

Bridge ID Priority 32788 (priority 32768 sys-id-ext 20)


Address 0001.428E.924A
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p

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

Bridge ID Priority 32798 (priority 32768 sys-id-ext 30)


Address 0001.428E.924A
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p

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

Bridge ID Priority 32868 (priority 32768 sys-id-ext 100)


Address 0001.428E.924A
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p

Is ASW1 Root bridge for all VLAN instances?

Let’s check on DSW1 Spanning Tree for VLAN 10

DSW1#show spanning-tree vlan 10


VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Address 0001.428E.924A
Cost 19 cost to reach Root Bridge
Port 2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)


Address 0010.116B.B7B9
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/2 Root FWD 19 128.2 P2p we can see that this is root port
Fa0/3 Desg FWD 19 128.3 P2p this is designated port
6
Let’s check on ASW1 Spanning Tree for VLAN 10

ASW2#show spanning-tree vlan 10


VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Address 0001.428E.924A
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)


Address 00E0.F77E.2880
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/3 Altn BLK 19 128.3 P2p This port is blocked

ASW1 BID is 32778 0001.428E.924A


ASW2 BID is 32778 00E0.F77E.2880
DSW1 BID is 32778 0010.116B.B7B9

ASW1 has lowest BID so he is Root Bridge


DSW1 has lower BID compared to ASW2 so he won and ASW2 blocked his port

Step 11: Change STP to Rapid PVST+ on all switches.

ASW1(config)#spanning-tree mode rapid-pvst


ASW2(config)#spanning-tree mode rapid-pvst
DSW1(config)#spanning-tree mode rapid-pvst

Verification:

DSW1#show spanning-tree vlan 10


VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 32778
Address 0001.428E.924A
Cost 19
Port 2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)


7
Address 0010.116B.B7B9
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/2 Root LSN 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p

Step 15: Configure DSW1 to be Root Bridge for VLANs 10 and 20

DSW1(config)#spanning-tree vlan 10,20 root primary

DSW1#show spanning-tree vlan 10,20


VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 24586
Address 0010.116B.B7B9
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 24586 (priority 24576 sys-id-ext 10)


Address 0010.116B.B7B9
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p

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

Bridge ID Priority 24596 (priority 24576 sys-id-ext 20)


Address 0010.116B.B7B9
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/2 Desg FWD 19 128.2 P2p

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

ASW2(config)#spanning-tree vlan 30,100 root primary


ASW2(config)#spanning-tree vlan 10,20 root secondary

ASW2#show spanning-tree vlan 30,100


VLAN0030
Spanning tree enabled protocol rstp
Root ID Priority 4126
Address 00E0.F77E.2880
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 4126 (priority 4096 sys-id-ext 30)


Address 00E0.F77E.2880
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/3 Desg FWD 19 128.3 P2p

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

Bridge ID Priority 24676 (priority 24576 sys-id-ext 100)


Address 00E0.F77E.2880
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/3 Desg FWD 19 128.3 P2p

Step 13: On ASW1 Let’s see what is going on with VLAN1

ASW1#show spanning-tree vlan 1

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

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0001.428E.924A
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p

ASW1#

Step 14: We have created different topologies for different VLANs.

For VLAN1 topology looks like:

ASW1 is Root Bridge so he will have 2 Designated ports in forwarding state as we can see from
above output:

DSW1#sh spanning-tree vlan 1


VLAN0001

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/2 Root FWD 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p

DSW1 will have one root port and one designated port as we can see

ASW2#show spanning-tree vlan 1


VLAN0001

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/3 Altn BLK 19 128.3 P2p

ASW2 will have one root port and one Alternate Blocked port

10
RP DP

Blocked
DP
Root Bridge
DP RP

For VLAN20 topology looks like:

DSW1#show spanning-tree vlan 20


VLAN0020
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p

ASW1#show spanning-tree vlan 20


VLAN0020
Fa0/1 Altn BLK 19 128.1 P2p
Fa0/2 Root FWD 19 128.2 P2p

ASW2#show spanning-tree vlan 20


VLAN0020
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/3 Root FWD 19 128.3 P2p

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.

Step 15: Save Configuration on all switches

ASW1# copy running-config startup-config


ASW2# copy running-config startup-config
DSW1# copy running-config startup-config

Step 20: Save Packet Tracer Activity File

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

Keep this file!!!!

Final Solution for each Router:

ASW1 ASW2 DSW1


ASW1#show running-config ASW2#show running-config DSW1#show running-config
Building configuration... Building configuration... Building configuration...

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

You might also like