Tuesday, July 16, 2013

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.

  • Thursday, July 11, 2013

    PORT COST vs PORT PRIORITY

    Both parameters are used to determine which interface will be in forwarding state.

    They have differences though:

    •  If you want to affect how to the local switch elects the root port change the cost on the links.  Cost is cumulative throughout the STP domain. The higher cost is the less preferred.
    •  If you want to affect how downstream switch elects its root port change the priority. This is only local significant between the two directly connected switches. Highest priority is less preferred.

     Going away from the root of the tree use priority whereas, when going towards the root of the tree use cost.

    Reff: https://supportforums.cisco.com/thread/16435

    SPANNING TREE:
    to check total path cost/priority between current designated bridge to root bridge:
    show spann root [cost/priority]

    To change root port(towards root bridge) use spanning-tree cost on desired port.
    To change the root port on below directly connected designated bridge(which is away from root bridge), use spanning-tree priority on desired port which is place on present switch.
    note: if u r confused about toward/away root bridge, avoid rackets in above and read again, then read below
     Ex:
    • If A is root bridge, C is designated bridge reach the root bridge A via designated bridge B. 
    • Now we want to change the root port on B, use spanning-tree cost command on B. 
    • Like this u change the root port on C using cost command on C. 
    • Spanning-tree Priority command case is different, if we want to change the root port on C, but not use on C instead used on B.
    BPDU FILTER:
    • config at interface level or globally
    • both have same effect disable STP on per interface basis
    • this can stop STP information at incoming/outgoing interface
    • Used at access layer at which end host are users
    • this block the stp information reaching the end hosts
      • if know (root bridge, mac add, priority), there is possibility malfunction of STP