Spanning Tree Protocol

0
194

• Spanning Tree Protocol (STP) uses Spanning Tree Algorithm to avoid the Switching loops in layer-2
     devices (bridges or switches).

• STP works when multiple switches are used with redundant links avoiding Broadcast Storms, Multiple
    Frame Copies & Database instability.

• First Developed By DEC

• STP is a open standard (IEEE 802.1D)

• STP is enabled by default on all Cisco Catalyst switches

some terms you should know before read this artical.

 BPDU

   1. All switches exchange information through what is called as Bridge Protocol Data Units (BPDUs)

   2. BPDUs contain a lot of information to help the switches determine the topology and any loops that
        result from that topology.

    3. BPDUs are sent every 2 sec

Bridge ID

   1.Each switch has a unique identifier called a Bridge ID or Switch ID

   2.Bridge ID = Priority + MAC address of the switch

   3.When a switch advertises a BPDU , they place their switch id in these BPDUs

Root Bridge

* The bridge with the Best (Lowest) ID.
* Out of all the switches in the network , one is elected as a root bridge that becomes the focal point in the
    network.

 Non-Root bridge

All Switches other than the Root Bridge are Non-Root Bridges

 Designated port

1.Either a port On a root bridge or a port that has been determined as having the best (lower) cost.
2.A designated port will always in Forward Mode

 Root port

 The link directly connected to the root bridge, or the shortest path to the root bridge.
  Priority and Alternatives if Config occurred.
 Root port with the least cost (Speed) connecting to the root bridge.
 The bridge with the Best (Lowest) Switch ID.
 Lowest Physical Port Number.
 Only One root port will be in Bridge or switch.

 Non Designated port

 All the Port or ports which are blocked by STP to avoid switching loop.
 A Non Designated port Will Always in Blocked Mode.

STP port states

• Blocking – 20 Sec or No Limits.
• Listening – 15 Sec.
• Learning – 15 Sec.
• Forwarding – No Limits.
• Disable – No Limits.

Switch – Port States

• Blocking: Won’t forward frames; listens to BPDUs. All ports are in blocking state by default when the switch is powered up.

• Listening: Listens to BPDUs to make sure no loops occur on the network before passing data frames.

• Learning: Learns MAC addresses and builds a filter table but does not forward frames.

• Forwarding: Sends and receives all data on the bridged port.

HOW TO ENABLE STP

switch>
switch>enable
switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#spanning-tree vlan 1
switch(config)#exit
switch
#

HOW TO DISABLE STP

switch>
switch>enable
switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#no spanning-tree vlan 1
switch(config)#exit
switch

Rapid Spanning Tree Protocol (RSTP) enables STP Root Ports and STP Designated Ports to change from the blocking to forwarding port state in a few seconds.


Related Posts:

Enhanced Interior Gateway Routing Protocol

OSPF(Open Shortest path first)

 

RIP( Routing Information Protocol)

 

for more articals visit   http://computertechnologyspecial.blogspot.com

Comments

comments