Wednesday, June 2, 2010

STP

Spanning Tree Protocol:
  • Main purpose is to prevent loops on a bridge
  • Creates Spanning Tree within a Mesh network, leaving a single path between two nodes
  • Creates spare links to provide full backup paths if active links fail
  • Messages are sent by STP by messages known as BPDU's - BPDU's are a very important aspect of STP and determine the state of the port a bridge will go in (as follows):
  • Blocking
  • Listening
  • Learning
  • Forwarding
  • Disabled
Blocking & Listening:
  • Discards frames from attached segment
  • Discards frames from another port
  • No learning
  • BPDU's are received but are directed to system module, does not transmit BPDU's
  • Allowed to be managed
Learning:
  • Discards frames from attached segment
  • Discards frames from another port for forwarding
  • Station location incorporated into address database
  • Directs BPDU's to system module
  • Uses BPDU's - receiving, processing and transmitting them from system module
  • Allowed to be managed
Forwarding:
  • Forward frames from attached segment
  • Forwards frames from switched port
  • Incorporates station location into address database
  • Recieves BPDU's and directs to system module
  • Processes BPDU's from system module
  • Allowed to be managed
Disabled:
The states are traversed as follows:
  • Initialize to blocking
  • Blocking to listening or to disabled
  • Listening to learning or disabled
  • Learning to Forwarding or disabled
  • Forwarding to disabled
The path that bridges use is determined by the following rules:

Select Root Bridge: Contains the smallest bridge ID. Each bridge has an ID and a priority number, the bridge ID has both. When comparing the priority is looked at, if equal MAC's are compared, the lover MAC wins.

Determine the least cost paths to the root bridge: This can be configured by an administrator

Least path is traversed due to the following two rules:

Least cost path from each bridge: once root bridge is elected, every bridge calculates the cost from itself to root, the smallest cost is picked and known as the RP (root port) of the bridge.

Least cost path from each network segment: The bridges determine which bridge has the least cost to root, the network segment selected connected to the bridge is now the DP (Designated Port)

NOTE:

root ports send towards root bridge
designated ports send from root bridge

Disable all other root paths. All other ports become disabled and are known as Blocked Ports (BP).

Ties: If equal cost paths exist from two ports on the same bridge or two or more bridges on a network segment. This is how to avoid such a case:

Breaking ties for root ports: Lower bridge ID's are used

Breaking ties for designated ports: Again, the Lower Bridge ID is used to forward messages to root. If ID's are equal, lower MAC address is used

Final tie-breaker: If the same bridge is used (same MAC address) then the lower port priority is used.

No comments:

Post a Comment