STP Study Guide

From ITCwiki
Jump to navigation Jump to search

Spanning Tree Protocol Study Guide

BY: Mike Luger, Curt Hermanson, Phil Gimber

  • Evolution of STP Basics
  • Evolution of STP
  • STP (Spanning Tree Protocol) – Eliminates loops at layer 2 topology

STP initially converges on a logically loop-free network topology

  • 1) Elects one root bridge
  • 2) Selects the root port on all nonroot bridges
  • 3) Selects the designated port on each segment

Elects One Root Bridge

  • • The protocol uses a process to elect a root bridge
  • • Only one bridge acts as the root bridge in a given network per VLAN
  • • On the root bridge, all ports act as designated ports
  • • Switch with lowest priority parameter is elected as root
  • • STP Step 2 (cont)

Selects the Root Port on All Non-root Bridges

  • • The protocol establishes one root port on each nonroot bridge.
  • • The root port is the lowest-cost path from the nonroot bridge to the root bridge

Selects Designated Port on Each Segment

  • • On each segment, STP establishes one designated port on the bridge that has the lowest path cost to the root bridge
  • • The switch primarily chooses a designated port as the least-cost path to the root bridge
  • • In the event of a tie, the bridge ID acts as the tiebreaker
  • • Port Roles

There are four roles of ports under STP

  • 1) Root
  • 2) Designated
  • 3) Non-Designated
  • 4) Disabled

There are Five Port States

  • • Blocking
  • • Listening
  • • Learning
  • • Forwarding
  • • Disabled


RSTP

RSTP is not so much a new protocol, but rather an improved and faster version of STP. It preserves all the basic concepts of STP and interoperates with it as well. Users familiar with the operation of STP can quickly learn the new algorithm since both the terminology and basic parameters have been left unchanged.

Tree Topology

Spanning Tree topology can be thought of as a tree: it includes a root (a Root Bridge), branches (LANs and Designated Switches), and leaves (End Nodes). On a tree there are no disconnected parts that are considered part of the tree; that is, the tree encompasses all of its leaves. In addition, there are no loops in a tree. If you trace a path from one leaf to any other leaf, you will find there is one and only one possible path. This is true of the Spanning Tree topology as well. It organizes and connects switches into a loop-free topology while leaving no segments isolated.


Root Bridge

Just as a tree has a root from which all branches spring, Spanning Tree has a Root Bridge . Only one Root Bridge can exist in any given network. Although any switch can be a Root Bridge, the switch with the best Bridge ID becomes the Root Bridge. There are two parts to the Bridge ID: a user selected priority and the MAC address. The switch with the lowest numerical value of the priority component becomes the Root Bridge. When all switches have the same priority value, the one with the lowest MAC address becomes the Root Bridge.


Designated Bridges

A simple way to prevent loops in the network is to ensure only one bridge is responsible for forwarding traffic from the direction of the root into any given link (branch). As long as only one active path from a root to any end node (leaf) exists, there will be no loops in the topology. The bridge responsible for forwarding traffic in the direction from the root to a given link is known as the Designated Bridge of that link.

How RSTP works

The main difference in the operation of STP and RSTP is that RSTP no longer relies on conservative timers to re-converge after a topology change. In order to accomplish this, the algorithm does the following:


  • 1. It monitors MAC operational states and retires ports that are no longer functional.
  • 2. It processes inferior BPDUs to detect topology changes.
  • 3. It keeps track of ports that provide alternative paths to the Root Bridge.
  • 4. If a Root Port fails, RSTP can quickly retire the Port and make an Alternative port its new Root Port. This new Root Port can be placed in the forwarding state without delay.
  • 5. When bridges are connected via point-to-point links (directly connected), they use handshake (sync), rather than timers to transition a Designated Port to Forwarding.





RSTP Topology Change Mechanism

When an RSTP bridge detects a topology change it performs the following actions The RSTP Bridge starts the TC while time with a value equal to twice the hello time for all its nonedge designated ports and its root, port if necessary. The TC While time is the interval during which the RSTP Bridge actively informs the rest of the bridges in the network of a topology. It then flushing the MAC addresses associated with all nonedge ports. And as long as the TC While timer is running the BPDUs will be sent out of the port will have the TC bit set.

Bridge Identifier for PVRST+

  • • Bridge Priority A 4-bit field still used to carry bridge priority
  • • Extended System ID
  • • Mac Address

Only four high-order bits of the 16 bit bridge priority field carry actual priority

  • • Cisco STP Default Config
  • • PVST+
  • • PVRST+
  • • MST

PortFast

Spanning Tree Portfast causes an interface configured as a layer 2 access port to enter the forwarding state immediately.

  • Conf t
  • int fa 0/1
  • spanning-tree portfast
  • confirm with show spanning-tree interface Fastethernet 0/1

Config the Basic Parameters of PVRST+

  • conf t
  • spanning-tree mode rapid-pvst
  • spanning-tree vlan 2 root primary
  • spanning tree- vlan 3 root secondary