spanning_tree_protocol

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
spanning_tree_protocol [2024/01/18 11:17] – [Set/Change Spanning Tree Mode] walkeradminspanning_tree_protocol [2024/01/18 13:26] (current) – [Introduction] walkeradmin
Line 9: Line 9:
 \\  \\ 
 Spanning Tree Protocol essentially stops packet loops (where the same packet transports around your switches constantly) which causes broadcast storms and thus grinds the network to a complete halt. Spanning Tree Protocol essentially stops packet loops (where the same packet transports around your switches constantly) which causes broadcast storms and thus grinds the network to a complete halt.
 +\\ 
 +\\ 
 +<color #ed1c24>Spanning Tree</color> is a <color #ed1c24>Layer 2</color> Protocol.
 \\  \\ 
 ---- ----
Line 188: Line 191:
   protocol -               ieee (this is the 802.1D standard, or the 'original' Spanning Tree Protcol)   protocol -               ieee (this is the 802.1D standard, or the 'original' Spanning Tree Protcol)
   Priority 32778 -         This is the 32768 default value plus the VLAN (100).   Priority 32778 -         This is the 32768 default value plus the VLAN (100).
-  Address 0006.f680.1f80 - The address of the Interface+  Address 0006.f680.1f80 - The MAC address of the Switch.
   Cost 19 -                The Cost   Cost 19 -                The Cost
   Port 1 (FastEthernet0/1) The Interface being used for STP   Port 1 (FastEthernet0/1) The Interface being used for STP
Line 209: Line 212:
 (we want rapid-pvst) (we want rapid-pvst)
  
-spanning-tree mode rapid pvst+spanning-tree mode rapid-pvst
 </file> </file>
 You will not see out output from using this command (unless you get an error) but by using the sh span again you will see that the mode has changed. You will not see out output from using this command (unless you get an error) but by using the sh span again you will see that the mode has changed.
Line 240: Line 243:
 \\  \\ 
 ---- ----
 +==== Spanning Tree and Portfast ====
 +Part of the Spanning Tree Protocol is where a port has to change role, say when a device is plugged in to the switch, the switch may have to transition from Blocking mode to Forwarding mode. PortFast is a Cisco proprietary protocol.
 +\\ 
 +\\ 
 +A quick reminder of port modes:
 +\\ 
 +<file>
 +Blocking - A port that is Blocking traffic.
 +Listening - Not Forwarding traffic and not Learning MAC Addresses.
 +Learning - Not Forwarding traffic but learning MAC Addresses.
 +Forwarding - Sending and Receiving traffic as normal.
 +</file>
 +A <color #ed1c24>Blocking</color> Port cannot move to a <color #ed1c24>Forwarding</color> port directly (normally) the <color #ed1c24>Blocking</color> Port has to transition as follows:
 +<file>
 +Blocking
 +
 +  Listening - 15s
 +
 +  Learning - 15s
 +
 +Forwarding
 +</file>
 +Any device connected to a port can only connect to the network after transitioning through all of those states. This can take around 30 seconds (or longer if switch is busy). This is why when you plug a device in to a Cisco, it can take 30 seconds before the interface goes green.
 +\\ 
 +\\ 
 +During this 30 seconds, no user data is available on this port.
 +\\ 
 +\\ 
 +Spanning Tree <color #ed1c24>Portfast</color> allows a port to transition to the forwarding state immediately, bypassing the <color #ed1c24>Listening</color> and <color #ed1c24>Learning</color> states.
 +\\ 
 +\\ 
 +Spanning Tree Portfast should be configured on edge ports where you can expect client PCs, Servers, Printers etc. Basically any port that is not part of a STP loop that expects STP messages or BPDUs.
 +\\ 
 +\\ 
 +Having said that, <color #ed1c24>Portfast</color> will not stop STP operation, if that port receives any STP or BPDU messages, it will revert back to 'normal' mode and participate in <color #ed1c24>Listening</color> and <color #ed1c24>Learning</color> modes.
 +\\ 
 +----
 +==== Two Switches with Single Link ====
 +For what we do with our systems, there are generally two data switches between devices, with a link between them (per VLAN) which looks like this diagram below:
 +\\ 
 +\\ 
 +{{ :stp_004.png?700 |}}
 +\\ 
 +In this example, we can see just a single link from Switch A to Switch B. This means that there cannot be any Loops, so STP would not be required here (although it is worth remember that STP in some form runs on a Cisco be default).
 +\\ 
 +\\ 
 +Remember this Statement regarding STP - //**When a switch receives a broadcast message, that switch will forward that message out of every interface on that switch, except the one it was received on. 
 +**//
 +\\ 
 +\\ 
 +Having STP running is not going to cause any issues, and in fact as a safety measure is still quite good (who knows who might bridge the switches with a second cable).
 +\\ 
 +\\ 
 +
 +
  
spanning_tree_protocol.1705576649.txt.gz · Last modified: 2024/01/18 11:17 by walkeradmin