Tuesday, July 16, 2013

BACKBONEFAST

  • Not fast as uplinkfast due to link failure at some where else at upstream of root port 
  • Indirect failure, start recalculate stp
  • i.e. there is a problem at upstream of root port and root bridge is not reachable.
  • After a failure of upstream, upstream bridge advertise inferior BPDU(worse cost to root) to root port.
  • send Root Link Query(specific for BackBoneFast & ask Do u have alternate path)  
  • then root port containing bridge understand there is link failure to reach root bridge,
    • and expires max-age time(defaultly 20sec) and recalculate path costs
  • when baackbonefast is used time to reconverge is only the listen&learn time only, no max-age
  • spanning tree backbonefast on global mode

UPLINKFAST


  •  Uplinkfast automatically transform the state of alternate port( blocked to forward )and become root port, with out completing listening & learning state(because patch is already calculated as loop free path).
  • Work only when failure of directly connected link.
  • After making alternative port to root port
    • spoof the CAM table from the new root port
  • Does not apply at Core layer, apply at distributed & access layer
    • due to the increase in cost & priority

PortFast


  • PortFast doesnt disable STP on edge ports.
  • Only put in blocked state
  • Only send BPDU, doesnt recive BPDU
  • Edge ports not subject to forward delay
  • Not generate TCN (so no flush of CAM table, it cuts down the unknown unicast flooding in network) 

  • spanning-tree portfast default
    • if enable portfast globally, every access port interfaces become portfast enabled port but not on trunk links
    • some times there is a situation, enable portfast on trunk links also
    • at that time use spanning-tree portfast trunk cmd used.
  • If portfast enabled globally, when access port receive bpdu, it losses the portfast state and complete the listening & learning states then go to forwarding state
  • But if portfast enable at interface level, port will remain in portfast state regardless of bpdu receive.
  • show spanning-tree int e0/0 portfast

STP Terms

BRIDGE: 
  • STP is oldest protocol
  • at that time no switches(or may be switches are called bridges), so throughout STP, Switch is called as Bridge.
Root Bridge:
  • Instead of broadcast, all bridges are elected one bridge as Root,
  • then send information to that root bridge, root will send to destination
  • Other than root bridge remaining all are called Designated Bridges
Root Port:
  • Present on designated bridge
  • By using this port only Designated Bridges connect to Root Bridge, 
  • Remaining ports are Alternative Ports which are in blocked state.
  • Any time only one Root Port per switch towards Root Bridge
Designated Port:
  • Present on both Root & Designated Bridge
  • Designated Port is a Port which is connected to Root port, 
  • It sends information away from Root Bridge
Path Cost:
  • Based on path cost we will elect the Root/Designated Port.
  • Path Cost  is numerical value, 
  • Based on the type of connecting media (Fast Ethernet, gigabit Ethernet, etc) path cast value will be changed
Data rateSTP Cost (802.1D-1998)RSTP Cost (802.1D-2004 / 802.1w)
4 Mbit/s2505,000,000
10 Mbit/s1002,000,000
16 Mbit/s621,250,000
100 Mbit/s19200,000
1 Gbit/s420,000
2 Gbit/s310,000
10 Gbit/s22,000
Source: wikipedia


Spanning Tree Protocol


STP:
  • Root Bridge Election
  • Elect one Root Port per bridge
  • Elect Designated Ports on Root bridge
Root Bridge Election:
  • Based on Bridge ID of Switch
    • ID contain:
      • Bridge Priority (0-61440, increment of 4094)
      • System ID ( VLAN no.)
      • MAC Add (become Spanning Tree MAC address)
  • Lowest Bridge ID containing Switch become Root Bridge
Manual Selection of Root Bridge:
  • spanning-tree vlan [ids] priority         (lowest priority number will become root bridge)
  • spanning-tree vlan [ids] root [primary|secondary]
    •  without giving any priority value switch become root bridge
      • by automatically decrease the priority value than current root bridge
Root bridge verification:
  • show spanning-tree root
  • show spanning-tree vlan [id]

ADDITIONAL:
  • it repeatedly looks for the optimal solution, selecting an “optimal” candidate every time.