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

REMOTE LABS #28 – STP

Spanning Tree Protocol


Table of Content
SPANNING TREE PROTOCOL ............................................................................... 1
1. WHAT YOU WILL LEARN IN THIS LAB: .................................................................... 1
2. WHAT YOU WILL DO IN THIS LAB:......................................................................... 2
3. LAB TOPOLOGY: .............................................................................................. 3
4. LET’S DO THE LAB NOW: ................................................................................... 3
Step 1. Configure both routers according to the lab topology. ......................... 3
Step 2. Configure all switches according to the lab topology. .......................... 4
Step 3. Verify STP operation. ...................................................................... 6
Step 4. Lauch 5000 pings. .......................................................................... 7
Step 5. Shut down an interface belonging to the loop. ................................... 8
Step 6. Verify STP reaction. ........................................................................ 8

1. What you will LEARN in this lab:

In this lab, you will understand:

· the meaning of a Layer-2 loop


· the necessity of STP to break Layer-2 loops

· the meaning of a root switch


· the meaning of a blocking port

· the automatic recovery of STP after a link failure

Page 1 / 9
REMOTE LABS #28 – STP

2. What you will DO in this lab:

This lab will be performed within the following steps:

1. You will configure your pod.

2. Since there is a physical loop between the workgroup switch and the two core
switches, and since switch A is the root switch, you will check that STP is blocking
the port Fa1/12 connected to the core switch B:

core switch A (root) core router

ping path
Blocking port

workgroup router workgroup switch core switch B

3. You will launch 5000 pings.

4. You will shut down one of the ports belonging to the loop.

5. Since there is no loop anymore, STP will free the blocked port. This operation
needs time. You will check that for 30 seconds, the ping from your router to the
core router will be discontinued:

core switch A (root) core router

Broken link

Workgroup router workgroup switch Core switch B

new ping path

Note: Remember that each Vlan runs its own spanning tree.

Page 2 / 9
REMOTE LABS #28 – STP

3. Lab topology:

Core Router

10.0.0.254/24 fa0/0

Core Switch A Fa1/0

Fa1/1
Fa1/10

Your Fa1/10
Fa1/11
Switch
Fa1/12 Fa1/1
Fa1/0 Core Switch B
fa0/0 10.0.0.1/24

Your Router

4. Let’s do the LAB now:

Step 1. Configure both routers according to the lab topology.

1. On each router, configure the hostname.


2. On each router, configure the Ip address of interface fa0/0.
3. Activate the interface
4. Verify your configuration.

Page 3 / 9
REMOTE LABS #28 – STP

Your router:
enable
configure terminal
hostname MyRouter
interface fastethernet0/0
ip address 10.0.0.1 255.255.255.0
no shut
end

Core router:
enable
configure terminal
hostname CoreRouter
interface fastethernet0/0
ip address 10.0.0.254 255.255.255.0
no shut
end

MyRouter#show ip interface brief

Interface IP-Address OK? Method Status Protocol


FastEthernet0/0 10.0.0.1 YES manual up up

We verify that interface Fastethernet 0/0 is up/up and is assigned the correct IP address.

Core_Router #show ip interface brief

Interface IP-Address OK? Method Status Protocol


FastEthernet0/0 10.0.0.254 YES manual up up

We verify that interface Fastethernet 0/0 is up/up and is assigned the correct IP address.

Step 2. Configure all switches according to the lab topology.

1. On each switch, configure the hostname.


2. No Ip address is necessary.
3. Ensure interface fa0/0 is in VLAN 1, the default VLAN.
4. Configure trunks where necessary.
5. Verify your configuration.

Your switch:
enable
configure terminal
hostname My_Switch
interface fa1/11
switchport mode trunk
interface fa1/12
switchport mode trunk
end

Page 4 / 9
REMOTE LABS #28 – STP

Core switch A:
enable
configure terminal
hostname Core_Switch_A
interface fa1/1
switchport mode trunk
interface fa1/10
switchport mode trunk
end

Core switch B:
enable
configure terminal
hostname Core_Switch_B
interface fa1/1
switchport mode trunk
interface fa1/10
switchport mode trunk
end

My_Switch#show interfaces trunk

Port Mode Encapsulation Status Native vlan


Fa1/11 on 802.1q trunking 1
Fa1/12 on 802.1q trunking 1

Port Vlans allowed on trunk


Fa1/11 1-1005
Fa1/12 1-1005

Port Vlans allowed and active in management domain


Fa1/11 1
Fa1/12 1

Port Vlans in spanning tree forwarding state and not pruned


Fa1/11 1
Fa1/12 1

Fa1/11 and Fa1/12 on MySwitch are trunking.

Core_Switch_B#show interfaces trunk

Port Mode Encapsulation Status Native vlan


Fa1/1 on 802.1q trunking 1
Fa1/10 on 802.1q trunking 1

Port Vlans allowed on trunk


Fa1/1 1-1005
Fa1/10 1-1005

Port Vlans allowed and active in management domain


Fa1/1 1
Fa1/10 1

Port Vlans in spanning tree forwarding state and not pruned


Fa1/1 1
Page 5 / 9
REMOTE LABS #28 – STP

Fa1/10 1

Fa1/1 and Fa1/10 on Core Switch B are trunking.

We now are sure that all three links between all three switch
are trunking.

My_Switch#show vlan-switch

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/1, Fa1/2, Fa1/3
Fa1/4, Fa1/5, Fa1/6, Fa1/7
Fa1/8, Fa1/9, Fa1/10, Fa1/13
Fa1/14, Fa1/15
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0

Fa1/0 is working in ACCESS mode and belongs to vlan 1, the


DEFAULT Vlan.

Step 3. Verify STP operation.

1. Verify which port of your switch is in a blocking / forwarding mode.

You may have a different result, depending on the MAC address


of each switch.

In our case, Core Switch B is the ROOT switch.

My_Switch#show spanning-tree brief

VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address cc00.0dd4.0000
Cost 19
Port 13 (FastEthernet0/12)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768


Address cc01.0dd4.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/0 128.1 128 19 FWD 19 32768 cc01.0dd4.0000 128.1
Page 6 / 9
REMOTE LABS #28 – STP

FastEthernet0/11 128.12 128 19 FWD 19 32768 cc01.0dd4.0000 128.12


FastEthernet0/12 128.13 128 19 FWD 0 32768 cc00.0dd4.0000 128.2

Core_Switch_B#show spanning-tree brief

VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address cc00.0dd4.0000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768


Address cc00.0dd4.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1 128.2 128 19 FWD 0 32768 cc00.0dd4.0000 128.2
FastEthernet0/10 128.11 128 19 FWD 0 32768 cc00.0dd4.0000 128.11

QUESTION 1. : Which port of YOUR SWITCH is connected to the Root switch?


What is its name?

QUESTION 2. : What is the role and the state of each interface of YOUR switch in
the following table?

Interface This interface is Role : State :


of YOUR connected to:
switch
Fa1/0 …your router
Fa1/11 … core switch a
Fa1/12 … core switch b

Step 4. Lauch 5000 pings.

1. Launch an extended ping from your router to the core router.

Note : If you need to stop an extended ping, press : control+shift+6 two times.

My_Router#ping 10.0.0.254 repeat 5000

Or

My_Router#ping
Protocol [ip]:
Target IP address: 10.0.0.254
Repeat count [5]: 5000
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Page 7 / 9
REMOTE LABS #28 – STP

Sweep range of sizes [n]:


Type escape sequence to abort.
show interface trunk

Step 5. Shut down an interface belonging to the loop.

1. Shut down the forwarding port of your switch

Your switch:
configure terminal
Interface Fa1/12
shut
end

Step 6. Verify STP reaction.

1. On your router, analyze the impact on the ping.

Sending 5000, 100-byte ICMP Echos to 10.0.0.254, timeout is 2 seconds:


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!! ........................ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

QUESTION 3. : For X seconds, the ping was not reaching the destination
address. How long should be X? Why? How long is it actually?

Note : We expected the ping not working for :


Max age : 20 s (detection of the failure which is immediate here because of disabling a
connected interface.
Listening : 15 s (Listening of the BPDU to elect Root and decide for port’s roles)
Learning : 15 s (Learning of neighbours mac address, to avoid initial flooding)

Verify which port of your switch is now the root port :

My_Switch#show spanning-tree brief

VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address cc00.0dd4.0000

Page 8 / 9
REMOTE LABS #28 – STP

Cost 38
Port 12 (FastEthernet0/11)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768


Address cc01.0dd4.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/0 128.1 128 19 FWD 38 32768 cc01.0dd4.0000 128.1
FastEthernet0/11 128.12 128 19 FWD 19 32768 cc03.0dd4.0000 128.2

QUESTION 4. : Which port is now the new root port?

Page 9 / 9

You might also like