Performance Analysis of A Spanning Tree Protocol: Harsha Natarajan, Karthik Ram,, Abhishek Challa
Performance Analysis of A Spanning Tree Protocol: Harsha Natarajan, Karthik Ram,, Abhishek Challa
Performance Analysis of A Spanning Tree Protocol: Harsha Natarajan, Karthik Ram,, Abhishek Challa
Abstract
This paper mainly focuses on the design of STP, packet - Root bridge election- this serves as the
analysis of STP and the different scenarios of STP centralized point of the topology.
deployment and working. Spanning tree protocols is used - Identification of the root ports – these are the
basically to avoid loops in Local Area Networks; a loop in ports on the switches that has the lowest path cost
networks can get the entire network down. In order to to the elected root bridge.
prevent these loops we use the spanning tree protocol. The - Identification of the designated ports- if there is a
802.1D spanning tree protocol was designed at a time when loop a port is put to a blocked state, which is
the quick recovery of connectivity after a network outage activated again once the loop is removed.
was considered as crucial.
STP Port States-
I Introduction
There are different states in a Spanning Tree Protocol
The increased deployment of the Layer 2 switches in which is explained in the table 1
almost all network designs used today has made the
Spanning Tree Protocol to be a very reliable protocol to the
network managers. Spanning tree protocol is an 802.1d
States working
IEEE standard which creates redundant links between
source and the destination so that loops are not created in a Blocking Default state of STP port i.e whenever a
network, as loops in a network would create broadcast switch is turned on or when a port is closed
storms and cause a network outage. to avoid a loop.
Listening When there is no loop the port will not be
closed, this is when the port continues to
II IEEE 802.1D
move to the listening state from the
blocking state.
The 802.1D Spanning tree protocol is a layer 2 protocol
Learning A port will be selected as a root port or
which runs on bridges and switches which are 802.1D designated port which listens for BPDU’s
compliant. The main purpose of this protocol is to ensure and fetches the MAC address.
that the loops are not created in a network in presence of Forwarding Here Ports can send and receive all data
redundant paths in a network. STP is mainly used to create frames and continue to build MAC address
redundant links in a network which acts as a backup in case table
of network failure, so that if there a break in the primary Disabled A port in disabled state will not take part in
the STP process and will not forward any
link then the redundant links comes into picture thereby
frames.
preventing the network outage. In the absence of STP in
switches and bridges, such a failure results in loops. There
are different flavors of STP’s that can be configured in Below are some of the STP configurations that can be
switches. performed.
- Common Spanning Tree (CST) – where in a To check the current state of the port
single Spanning Tree Process is used for all
VLAN’s. Switch1# show spanning-tree interface fa0/10
- Per-VLAN Spanning Tree (PVST) – In this case
there is a separate STP process for each VLAN. To disable the STP for a specific VLAN
This is a Cisco proprietary.
- Per-VLAN Spanning Tree Plus (PVST+) – This Switch1(config)# no spanning-tree vlan 10
is the next version of PVST, which allows
To get the switch to work as root bridge
switches configured with different flavors of STP
to interoperate.
Switch1(config)# spanning-tree vlan 10 root primary
Process –
To adjust the bridge priority of the switch from a default
value to increase its chance to get elected as root bridge
STP performs the following steps to maintain a loop free
topology.
Switch1(config)# spanning tree vlan10 priority 150
The main idea of the spanning tree is for the bridges to converge when there is any change in the network
select the ports over which they will forward the frames . topology.
The algorithm selects the ports as follows, Each bridge has
a unique identifier, lets say b1, b2, b3. The algorithm first
elects the bridge with the smallest id as the root of the
spanning tree, this root bridge always forwards frames out
all over its ports. Next each bridge computes the shortest
path to the root and notes which of its ports are on this
ports. This port is also selected as the bridge’s preferred
path to the root. Finally, all the bridges connected to a
given LAN elect a single designated bridge that will be
responsible for forwarding frames towards the root bridge.
Each LAN’s designated bridge is the one that is closest to
the root, and if two or more bridges are equally close to the
root, then the bridge’s identifiers are used to break ties; the
smallest id wins. Of course, each bridge is connected to
more than one LAN, so it participates in the election of a
designated bridge for each LAN it is connected to. In
effect, this means that each bridge decides if it is the Figure: 2
designated bridge relative to each of its ports. The bridge
As shown in the figure 2 we can see the configurations of
forwards frames over those ports for which it is the
the Switch 1, and the different modes of the ports of the
designated bridge.
switch which are Root and Designated, we can also see
from the output that all the ports are in forwarding. Switch
1 is not elected as the root bridge as it is connected to the
III. Simulation using Cisco Packet Tracer root bridge.
Figure: 3
1. http://www.routeralley.com/ra/docs/stp.pdf
2.http://www.orbit-computer-solutions.com/Spanning-
Tree-Protocol-Standards---Types.php
3,http://www.petri.co.il/csc_preventing_network_loops_wit
h_stp_8021d.htm
4.http://www.ccontrols.com/pdf/abc7.pdf
5.http://www.cisco.com/en/US/tech/tk389/tk621/technologi
es_configuration_example09186a008009467c.shtml
Figure: 4
6.http://www.hojmark.net/spane_an.pdf
The running configuration of Switch0 for the network
7.http://projectsinnetworking.com/?p=36
topology is shown in fig 4, we can observe from the output
of Switch0 that its interface Fa0/2 is in Blocking state,
interface fa0/1 is directly connected to the root bridge that
is Switch 2 and hence it is called as the root port and is in
forwarding state and finally interface Fa0/3 is connected
the host PC0 which has an ip address of 10.1.1.5.
IV. Conclusion