Spanning Tree Protocol
Spanning Tree Protocol
The redundant or backup link is helpful only when the primary link fails.
Until the primary link is functioning, the backup link should be disabled. If
both the primary and backup links are active at the same time, they will
create a switching loop.
But if any broadcast message it sent by any device to the switch then
switch broadcasts same to all ports except the port from which frame is
sent. In this way other switch connected to it receives broadcast message
and then they also broadcast the same which creates an endless loop and
hence it creates Broadcast Storm. This may consume lots of network
bandwidth which may disturb whole network. But id instead of redundant
link only single link between switches are there then this storm will not
be created.
Path Cost
Spanning Tree Protocol Document Ver 1 00
Post Root Bridge election, as shown in below diag. port status will be
updated and that will be done on the basis of shortest path (on the basis
of cost) to the Root Bridge for each switch, these will be root port. Next is
to assign designated ports and then remaining all ports will be as blocking
ports.
Root Port(RP): Shortest Path to the Root Bridge and forwards all
packet
Designated Port (DP): The designated port is a port that is sending
lowest cost path onto a segment, it forwards all Packet
Blocked Port (BP): Does not send and receive packet
Once port status is updated then it blocks the redundant link towards
Root Bridge. Hence Redundant Link is logically inactive which avoids
loop.
Spanning Tree Protocol Document Ver 1 00
But suppose after some time any link gets damaged as shown in
below diag. then again STP will run and blocked port may get
active and data may start transferring from other route.
Spanning Tree Protocol Document Ver 1 00
The default priority of switch is 32,768, and the lowest priority wins. If
there is a tie in priority, the lowest MAC address is used as the tie-breaker.
In this way Root Bridge is selected.
Below image shows how if priority of all switches are same then on the
basis of lowest MAC ID Root Bridge is decided. In below fig A has the
lowest MAC ID hence it is selected as Root Bridge.
.
Spanning Tree Protocol Document Ver 1 00
Once Root Bridge is elected, Root port will be assigned then designated
ports will be assigned after that all other ports will be assigned as
Blocking ports.
Spanning Tree Protocol Document Ver 1 00
Conclusion: This STP is used in CCTV for ring topology for fault
tolerance, when single device fails other route converges and
network does not fail.