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

Spanning Tree

Assignment Number - XI
Date:
Subject : Networking Lab (Lab 202)
MCA SEM II

Written By : ___________________________________________________________

Checked By : _____________

0
Spanning Tree

Objective: In this assignment you will


: become familiar with concept of Spanning Tree.

Introduction:
Spanning Tree Protocol’s main task is to stop network loops from occurring
on your layer 2 networks. It alertly monitors the networks to find all links,
making sure that no loops occur by shutting down any redundant links. STP
uses the spanning-tree algorithm (STA) to first create a topology database and
then search out and disable redundant links. With STP running, frames will be
forwarded only on the premium, STP-picked links.

STP is a layer 2 protocol that is used to maintain a loop-free switched


network.

In figure a switched network with a redundant topology, i.e. switching loops.


Without some types of layer 2 mechanism to stop the network loop, would
have the problem discussed previously: broadcast storms, multiple frame
copies, and thrashing of the MAC table.

Spanning Tree Terms


 Rood Bridge: bridge with the best bridge ID.
 BPDU: switch compares the parameters in the Bridge Protocol Data Unit
(BPDU)
 Bridge ID: determined by combination of bridge priority.

Networking Lab MCA SEM II 1


Spanning Tree

Spanning Tree Operations:

STP’s job is to find all links in the network and shut down any redundant ones,
thereby preventing network loops from occurring.

STP accomplish this by first electing a root bridge that will forward through
all ports and act as a point of reference for all other devices in the STP domain.

Once all switches agree on who the rood bridge is , every bridge must find its
one and only allotted root port. Each and every link between two switches
must have one, and only one, designated port- the port on that link that
provides the highest bandwidth toward the root.

Selecting the root bridge:

The bridge ID is used to elect the root bridge in the STP domain and to
determine the root port for each of the remaining devices in the STP when
there are multiple candidate root ports available and path costs are equal.

This ID is 8 bytes long and includes both the priority and the MAC address of
the device. The default priority on all devices running the IEEE STP version is
32768.

Lab Work
Design following topology to study spanning tree concept.

Devices Required: Switches


Configurations of the Devices: select mode trunk for all interfaces
Steps for Question:
I. Design the above topology

Networking Lab MCA SEM II 2


Spanning Tree

II. And try following commands on Switch B for configuring


switch and identify the default spanning tree protocol
information.

Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with
CNTL/Z.
Switch(config)#interface FastEthernet0/1
Switch(config-if)#speed 100
Switch(config-if)#exit
Switch(config)#interface FastEthernet0/2
Switch(config-if)#speed 100
Switch(config-if)#exit

Switch(config)#vlan 11
Switch(config-vlan)#name A
Switch(config-vlan)#exit
Switch(config)#vlan 22
Switch(config-vlan)#name B
Switch(config-vlan)#exit

Switch(config)#interface FastEthernet0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface FastEthernet0/2
Switch(config-if)#switchport mode trunk

Switch(config)#do show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.17E5.6514
Cost 19
Port 1(FastEthernet0/1)
Networking Lab MCA SEM II 3
Spanning Tree

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

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


Address 00D0.D389.427B
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/2 Altn BLK 19 128.2 P2p

VLAN0011
Spanning tree enabled protocol ieee
Root ID Priority 32779
Address 0002.17E5.6514
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32779 (priority 32768 sys-id-ext 11)


Address 00D0.D389.427B
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/2 Altn BLK 19 128.2 P2p

VLAN0022
Spanning tree enabled protocol ieee
Root ID Priority 32790
Address 0002.17E5.6514
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32790 (priority 32768 sys-id-ext 22)


Address 00D0.D389.427B
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/2 Altn BLK 19 128.2 P2p
Networking Lab MCA SEM II 4
Spanning Tree

III. Changing the priority to force a switch to become the root of


STP network use following commands.

Switch(config)#spanning-tree ?
mode Spanning tree operating mode
portfast Spanning tree portfast options
vlan VLAN Switch Spanning Tree
Switch(config)#spanning-tree vlan ?
WORD vlan range, example: 1,3-5,7,9-11
Switch(config)#spanning-tree vlan 1 ?
priority Set the bridge priority for the spanning tree
root Configure switch as root
<cr>
Switch(config)#spanning-tree vlan 1 priority ?
<0-61440> bridge priority in increments of 4096
Switch(config)#spanning-tree vlan 1 priority 4096
Switch(config)#do show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 00D0.D389.427B
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)


Address 00D0.D389.427B
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

Networking Lab MCA SEM II 5


Spanning Tree

Generated CLI Code:


(Write here generated CLI code for above task ie Equivalent IOS
Commands)
Snapshot of Topology:
(Take a print of topology for above task)
Verification, Testing and Result:
(Note the output of command do show spanning-tree)

Networking Lab MCA SEM II 6

You might also like