From wikistone
Jump to: navigation, search
 
Line 14: Line 14:
 
* Priority . Port #
 
* Priority . Port #
 
* 0..255
 
* 0..255
 +
* 128 default
 +
* lower is better
  
 
Path Determination:
 
Path Determination:
Line 63: Line 65:
 
! global portfast
 
! global portfast
 
sw(config)# spanning-tree portfast default </nowiki>
 
sw(config)# spanning-tree portfast default </nowiki>
−
 
  
 
== RSTP 802.1w ==
 
== RSTP 802.1w ==

Latest revision as of 11:01, 4 December 2012

STP: 802.1d
RSTP: 802.1w
MSTP: 802.1s
Due to PVST's existance, STP is referred to as Common STP (CST) sometimes.

STP 802.1d

Bridge ID:

  • Priority . MAC
  • 0..65536 in 4096 increments
  • 32768 default
  • lower is better

Port ID:

  • Priority . Port #
  • 0..255
  • 128 default
  • lower is better

Path Determination:

  • cost
  • BID
  • PID

Port Roles:

  • Root Port: egress port to the root bridge
  • Designated Port: ingress port to the root bridge
  • Blocking Port: all packets but ingress BPDU dropped

All ports on a Root Bridge are Designated ports.

Port States:

  • Blocking
  • Listening
  • Learning
  • Forwarding

Convergence time:

20 sec: BLK (MaxAge) time
15 sec: Listening time
15 sec: Learning time

Default timers:

Hello: 2 sec
MaxAge: 10x Hello
FWD delay: 15 sec (listen & learn time)

Notes:

  1. Load balancing based on VLANs is typically done by adjusting port priority. This is not done if etherchannel bonded.
  2. After determining a root bridge, BPDUs are only sent by the root bridge.

Cisco:

! set bridge priority
sw(config)# spanning-tree (vlan [list]) priority #
! set priority macro
! primary: 24576 or 4096 lower than lowest discovered but always > 0
! secondary: 28672 or 4096 lower than second lowest discovered
sw(config)# spanning-tree (vlan [list]) root [primary | secondary]

! set port priority
sw(config-if)# spanning-tree vlan # portpriority [0..255]

! set cost
sw(config)# spanning-tree vlan # cost #

! global portfast
sw(config)# spanning-tree portfast default 

RSTP 802.1w

BPDUs are sent by all switches. This allows a topology to be determined.

Port Roles:

  • Root Port: egress to root bridge
  • Designated Port: ingress to root bridge
  • Alternate Port: alternate egress to root bridge (directly connected to root)
  • Backup Port: alternate port not connected to root bridge

Port States:

  • Discarding: listening, learning, and discarding non-BPDU packets
  • Forwarding: forwarding of course

Port Types:

  • Edge Port: a port connected to an end device (Cisco: a port in portfast mode)
  • Root Port: the best egress port to the root
  • Point-to-Point Port: link between two segments (seems to be just a logical definition of a port)

Default Timers:

Hello: 2 sec
Dead: 3x Hello (drops neighborship after this time)


Cisco:

! set p2p link
sw(config-if)# spanning-tree link-type point-to-point


MSTP 802.1s

Aggregates STP instances under one process. This is done on a switch by switch basis and is transparent to other switches.


PV(R)STP(+)

This is all Cisco proprietary:

PVSTP: It introduced PortFast, BackboneFast (alternates for DESG failures), and UplinkFast (alternates for ROOT failures). It required ISL trunks.

PVSTP+: Basicly, PVSTP with 802.1q. This is the default mode on Cisco switches. The VLAN ID is added to the priority. That's why there's a 4096 incrementor value. BPDUs are transmitted over links untagged.

PVRSTP+: Just RSTP + PVSTP+.


Cisco Crap

Cisco switches only support these modes:

  • PVSTP+ : #spanning-tree mode pvst
  • PVRSTP+ : #spanning-tree mode rapid-pvst
  • MSTP : #spanning-tree mode mst

.