User Tools

Site Tools


networking:stp

This is an old revision of the document!


STP

Algorithm

How it works:

  1. Each switch generates an ID for itself (PBDU ID)
    1. BPDU ID has two parts - priority:System-Mac
  2. Each switch sends BPDUs out of all its ports (as multicast)
  3. After BPDUs are exchanged, Root switch is elected
    1. Root is having the smallest priority, and if equal - smallest System-Mac
    2. Only Root switch keeps sending BPDUs
    3. On the Root switch all ports are Designated
  4. All non-Root switches will elect a Root port - port closest to the Root switch
    1. Root port is having the smallest Cost to the Root switch (cost is based on the speed)
    2. If there are parallel links, port with the smallest number wins
  5. On all non-Root switches, elect Designated port and define Blocked ports
    1. Designated port is the port closest (cost-wise) to the Root
    2. If cost is the same - the port on the switch with lowest System-MAC becomes a Designated port

Port States

  1. Disabled
  2. Listening - switch sends and receives BPDUs. It lasts 15 seconds and it's where Root is elected
  3. Learning - switch is building MAC address table. Also lasts 15 seconds
  4. Forwarding
    1. Root Port
    2. Designated Port
networking/stp.1764775876.txt.gz · Last modified: by v1ctor