\section{Forwarding functional}
\label{chap:fwd-functional}

This tests aims at verifying simple forwarding capabilities of the switch. The configuration 
that should be used throughout all the tests in this section, unless explicitly stated.

\paragraph{Switch Configuration}

Default configuration.

\paragraph{Tester Configuration}
\begin{table}[ht!]
\begin{tabular}{ l  l l l}
FRAME  & size   & 64bytes \\
       & load   & 10 \%   \\
       & number & 1000    \\
\end{tabular}
\end{table}

\subsection{VLANs}

This tests serve the purpose of verifying that basic VLAN-related functions work.

\newpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Trival}

\paragraph{Description} 

The test verifies whether basic forwarding within VLAN works (i.e. frames are forwarded to
the ports only in the specified VLAN).

\paragraph{Switch Configuration} 

\begin{table}[ht!]
\begin{tabular}{ l  l l l}
VLAN  & port 0:      & VID=\{0, 1\}, & QMODE=trunk\\
      & port 1:      & VID=\{0, 1\}, & QMODE=trunk\\
      & other ports: & VID=0,        & QMODE=trunk\\
\end{tabular}
\end{table}

\paragraph{Tester Configuration} 

\begin{table}[ht!]
\begin{tabular}{ l  l l }
FRAME   & 802.1Q:     & VID=1, PRIO=0 \\
        &             &               \\ 
TRAFFIC & send to:    & port 0, 1        \\
        & receive on: & port 0, 1        \\
        & monitor:    & other ports   \\
\end{tabular}
\end{table}

\paragraph{Test passed if}

\begin{itemize*}
\item All frames sent to port 0 are received only on port 1
\item All frames sent to port 1 are received only on port 0
\item All received frames are tagged with VID 1 and priority 0
\item No frames received on ports other than 0 \& 1
\end{itemize*}

\newpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Tagging}

\paragraph{Description} 

The test verifies whether tagging, untagging and basic forwarding within VLAN works 

\paragraph{Switch Configuration} 

\begin{table}[ht!]
\begin{tabular}{l l l l l}
VLAN  & port 0:      & VID=\{0, 1\}, & QMODE=access,  FIX\_PRIO=1,  PRIO\_VAL=3, PVID=1\\
      & port 1:      & VID=\{0, 1\}, & QMODE=access,  FIX\_PRIO=1,  PRIO\_VAL=3, PVID=1\\
      & other ports: & VID=0,        & QMODE=trunk\\
\end{tabular}
\end{table}

\paragraph{Tester Configuration} 

\begin{table}[ht!]
\begin{tabular}{ l  l l }
FRAME   & 802.1D:     & no VLAN tag \\
        &             &               \\ 
TRAFFIC & send to:    & port 0, 1       \\
        & receive on: & port 0, 1        \\
        & monitor:    & other ports   \\
\end{tabular}
\end{table}

\paragraph{Test passed if}

\begin{itemize*}
\item All frames sent to port 0 are received only on port 1
\item All frames sent to port 1 are received only on port 0
\item All received frames are tagged with VID 1 and priority 3
\item No frames received on ports other than 0 \& 1
\end{itemize*}

\newpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Untagging}

\paragraph{Description} 

The test verifies whether tagging, untagging and basic forwarding within VLAN works 

\paragraph{Switch Configuration} 

\begin{table}[ht!]
\begin{tabular}{l l l l l}
VLAN  & port 0:      & VID=\{0, 1\}, & QMODE=trunk, VID-untagged=1\\
      & port 1:      & VID=\{0, 1\}, & QMODE=trunk, VID-untagged=1\\
      & other ports: & VID=0,        & QMODE=trunk\\
\end{tabular}
\end{table}

\paragraph{Tester Configuration} 

\begin{table}[ht!]
\begin{tabular}{ l  l l }
FRAME   & 802.1Q:     & VID=1, PRIO=0 \\
        &             &               \\ 
TRAFFIC & send to:    & port 0,1      \\
        & receive on: & port 0,1      \\
        & monitor:    & other ports   \\
\end{tabular}
\end{table}

\paragraph{Test passed if}

\begin{itemize*}
\item All frames sent to port 0 are received only on port 1
\item All frames sent to port 1 are received only on port 0
\item All received frames are untagged  (i.e. 802.1 with no VLAN tag)
\item No frames received on ports other than 0 \& 1
\end{itemize*}

\newpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Snake}

\paragraph{Description} 

The test verifies whether tagging, untagging and basic forwarding within VLAN works 

\paragraph{Switch Configuration} 

\begin{table}[ht!]
\begin{tabular}{l l l l l}
VLAN  & port 0:      & VID=\{0, 1\}, & QMODE=access, FIX\_PRIO=0, PVID=1, VID-untagged=1\\
      & port 1:      & VID=\{0, 2\}, & QMODE=access, FIX\_PRIO=0, PVID=2, VID-untagged=2\\
      & port 2:      & VID=\{0, 2\}, & QMODE=access, FIX\_PRIO=0, PVID=2, VID-untagged=2\\
      & port 3:      & VID=\{0, 3\}, & QMODE=access, FIX\_PRIO=0, PVID=3, VID-untagged=3\\
      & port 4:      & VID=\{0, 3\}, & QMODE=access, FIX\_PRIO=0, PVID=3, VID-untagged=3\\
      & port 5:      & VID=\{0, 4\}, & QMODE=access, FIX\_PRIO=0, PVID=4, VID-untagged=4\\
      & port 6:      & VID=\{0, 4\}, & QMODE=access, FIX\_PRIO=0, PVID=4, VID-untagged=4\\
      & port 7:      & VID=\{0, 5\}, & QMODE=access, FIX\_PRIO=0, PVID=5, VID-untagged=5\\
      & port 8:      & VID=\{0, 5\}, & QMODE=access, FIX\_PRIO=0, PVID=5, VID-untagged=5\\
      & port 9:      & VID=\{0, 6\}, & QMODE=access, FIX\_PRIO=0, PVID=6, VID-untagged=6\\
      & port 10:     & VID=\{0, 6\}, & QMODE=access, FIX\_PRIO=0, PVID=6, VID-untagged=6\\
      & port 11:     & VID=\{0, 7\}, & QMODE=access, FIX\_PRIO=0, PVID=7, VID-untagged=7\\
      & port 12:     & VID=\{0, 7\}, & QMODE=access, FIX\_PRIO=0, PVID=7, VID-untagged=7\\
      & port 13:     & VID=\{0, 8\}, & QMODE=access, FIX\_PRIO=0, PVID=8, VID-untagged=8\\
      & port 14:     & VID=\{0, 8\}, & QMODE=access, FIX\_PRIO=0, PVID=8, VID-untagged=8\\
      & port 15:     & VID=\{0, 9\}, & QMODE=access, FIX\_PRIO=0, PVID=9, VID-untagged=9\\
      & port 16:     & VID=\{0, 9\}, & QMODE=access, FIX\_PRIO=0, PVID=9, VID-untagged=9\\
      & port 17:     & VID=\{0, 1\}, & QMODE=access, FIX\_PRIO=0, PVID=1, VID-untagged=1\\

\end{tabular}
\end{table}

\paragraph{Tester Configuration} 

\begin{table}[ht!]
\begin{tabular}{ l  l l }
FRAME   & 802.1D:     & no VLAN tag   \\
        &             &               \\ 
TRAFFIC & send to:    & port 0,1,2,3  \\
        & receive on: & port 0,1,2,3  \\
\end{tabular}
\end{table}

\paragraph{Test passed if}

\begin{itemize*}
\item All frames sent to port 0 are received only on port 17
\item All frames sent to port 17 are received only on port 0
\item All frames sent to port 1 are received only on port 16
\item All frames sent to port 16 are received only on port 1
\item All received frames are untagged  (i.e. 802.1 with no VLAN tag)
\end{itemize*}