Spanning Tree exists for the \textbf{sole} reason to save "your" network and all the broadcast storms an network engineer having a bad day can by mistake create!
STP comes from the above desire where redundancy was wanted but no protocol existed before STP to help in this regard.
\item\textbf{Root port:} Only 1 port on any switch (non-counting the root bridge!). Is always the port with the lowest metric (aka. best path) to the root bridge.
\item\textbf{Alternative port} is an active port in network with an alternative path to the root bridge. A port in alternative mode will remain active but \textit{discards} all traffic until the the current designated path fails.
\item\textbf{Backup port} is running in active mode and \textit{discards} all traffic it recieves until the current designated port on the segment the backup port is connected to, fails.
Election of ports goes in order of the following values (low is best): 1) root bridge id, 2) lowest path cost to root bridge, 3) sender bridge id, 4) sender port bridge id
\item A future development of the original 802.1D standard meant to provide faster convergance. As the original STP standard wasn't actually that fast.
\textbf{B}ridge \textbf{P}rotocol \textbf{D}ata \textbf{U}nits is on cisco equipment sent out every 2 seconds and generally catogorizes into 2 categories:
Any network node with switchports and STP + BPDU enabled sends out BPDU packets with the ports mac as the src address. The destination mac is is designated STP multicast addr 01:80:C2:00:00:00.
\subsubsection{Root Bridge}
Using a \textbf{R}oot \textbf{B}rigde as the reference point for the STP instance and calculation of root/designated/non-designated ports.\\This election process uses a pre-configured bridge priority (ranges from $0$ to $2^{16}$) (defaults to $2^{15}$). If a tie in priority is found the switch in possession of the lowest mac address wins the root bridge election.
\textit{\textbf{NB:} beware that when working with bundled links (aka. ether-/port-channel). Then the link cost will be calculated based upon the summarized bandwidth accross all links.}
Cisco did on their part early on enhance the original spanning tree standard with some proprietary portroles that can (on cisco switch equipment) skip steps in the port role election process. And configure a STP switchport to a specific behavior as described below:
\item If alternate path identified. RQL{\footnotesize\textbf{R}equest \textbf{L}ink \textbf{B}locking} packets are out for identify either A) an alternative path to the root bridge \textit{or} B) an up-/downstream switch with a path to the root bridge.
\item Beware to \underline{only} enable BPDU filter on ports connected to end hosts. Consequence if not followed \underline{can} result in creating bridging loops.
\item\st{Prevents external switches from becoming roots}
\item If enabled, prevents any ports from becoming a root-port. Ports will remain as designated ports \textit{effectivily} preventing the switch becoming the root bridge.
\item This, too, behaves in s similiar manner as BPDU guard, putting the port in \texttt{err-disable} mode when a BPDU packet is recieved on the port.
\item\textbf{Beware} root and loop guard is mutually exclusive
\begin{itemize}
\item Root guard works on designated ports and does not allow the ports to become \textit{non}-designated ports, where
\item Loop guard works on \textit{non}-designated ports and does not allow the ports to become designated ports {\footnotesize though expiration of times}.
\item By default only enables on fiber optic links.
\item Works by sending packes every 15 seconds (default timer). If not packet is recieved back, the port can either log (default) a messaage or actively try to re-establish the link (aggresive). 1 packet/second for 8 sec. is send. If non is returned the port will go to \texttt{err-disable} state.
\item FlexLinks is good alternative to running STP in an environment with customers who you do \textit{not} want to run STP with. Fx. Service Provider/Enterprise/Datacenter environment.
\item Preemtion for FlexLinks is \textit{not} enabled-by-default.
\begin{enumerate}
\item Detects link failure.
\item Moves any dynamic unicast MAC addresses learned on primary link to standby link.
\item Moves standby link to forwarding state.
\item Transmits dummy multicast packets over new active interface. {\small Dummy multicast packet format is as follows: \textbf{destination:} 01:00:0c:cd:cd:cd, \textbf{source:} MAC address of the hosts or ports on the newly active FlexLinks port}
\end{enumerate}
\item{\small\textbf{Note:}} Configuring FlexLinks outside of access layer switches can be very complex!
\makecell{Protection against STP\\failures caused by uni-directional\\ links}&\makecell{Yes, when enabled on all\\potential non-designated ports\\in redundant topology}&\makecell{Yes, when enabled on all\\links in redundant topology}\\\hline
\makecell{Protection against STP\\failures caused by problem in\\software resulting in designated\\switch not sending BPDUs}& Yes & No \\\hline
\item\textbf{Beware} that instance 0 is the \textit{I}nternal \textit{S}panning \textit{T}ree. And therefore cannot be configured for user-mapped Vlans.
\item Aggregates the configured vlans into groups/instances/processes. This in turn provides lower resource utilization on switches. \dWinkey
\item Backwards compatible with 802.1D STP/802.1w/RSTP and Cisco PVST+.
\item Converges faster than PVRST+.
\item\itemtitle{Challenges}{Arises because of older hardware and the architecture of the protocol}
\begin{enumerate}
\item Operability with older/legacy hardware/equipment is not always possible.
\item\textit{Of course} it is more complex compared to standard STP (older) protocols. {\footnotesize Staff may require teachings of the way of the protocol.}
\end{enumerate}
\end{itemize}
\begin{table}[h]
\centering
\caption{MST Attributes}
\label{mstattr}
\resizebox{\columnwidth}{!}{%
\begin{tabular}{|l|l|}
\hline
\thead{Data}&\thead{What ?}\\\hline
32 bytes & alphanumeric configuration name \\\hline
2 bytes & configuration revision number \\\hline
Table of 4096 elements &\makecell{associates each of the potential\\4096 VLANs with an instance}\\\hline
\end{tabular}%
}
\end{table}
\subsection{MST Regions}
It is the network admins job to propagate an even configuration to all switches in a single region by using CLI or SNMP. Currently IOS does not support any other options to do the job.
\begin{itemize}
\item\itemtitle{Boundaries}{MST differs between regions by}
\begin{enumerate}
\item sending a digest computer from the Vlan-to-instance mapping table of the switch sending the digest.
\item the characteristics of the MST protocol for that single switch.
\end{enumerate}
\item if computed digest and MST characteristics between switches is \textit{found matching}, the switches considers themselves part of the same MST region.
\item\textbf{Beware} that unlike VTP, MST does not automatically increase the configuration revision number. This \textit{has to be done} manually.
\item Frame corruption: Physical interfaces can be defective/with errors.
\item Resource errors: High compute usage in the Control Plane. {\scriptsize Remember the Spanning Tree Process in fx. Cisco Catalyst switches is handled in software.}
\item PortFast configuration error: Can lead to bridging loops when mis-wiring happens together with logical port configuration errors.