\section{Switching and Forwarding}

% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Scalable Networks}

   Switch: Forwards packets from input port to output port;
   port selected based on destination address in packet header.

   \pichere{switch_ports.eps,height=2in}

   \begin{sitem}
         \item Can build networks that cover large geographic area
         \item Can build networks that support large numbers of hosts
         \item Can add new hosts without affecting performance of existing
	       hosts
   \end{sitem}
\end{slide}

% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Source Routing}

   Address contains sequence of ports on path from source to destination.

   \pichere{sroute.eps,height=4in}

\end{slide}

% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Virtual Circuit Switching}

   \begin{sitem}
      \item Explicit connection setup (and tear-down) phase
      \item Subsequent packets follow same circuit
      \item Analogy: phone call
      \item Sometimes called {\it connection-oriented} model
      \item Each switch maintains a VC table.
   \end{sitem}

   \pichere{vcircuit.eps,height=4in}
\end{slide}

% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Datagrams}

   \begin{sitem}
      \item No connection setup phase
      \item Each packet forwarded independently
      \item Analogy: postal system
      \item Sometimes called {\it connectionless} model
      \item Each switch maintains a forwarding (routing) table
   \end{sitem}

   \pichere{dgram.eps,height=4in}
\end{slide}

% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Virtual Circuit versus Datagram}

   Virtual Circuit Model:
   \begin{sitem}
      \item Typically wait full RTT for connection setup before
                sending first data packet.
      \item While the connection request contains the full address for
                destination, each data packet contains only a small identifier,
                 making the per-packet header overhead small.
      \item If a switch or a link in a connection fails, the connection is
                broken and a new one needs to be established. 
      \item Connection setup provides an opportunity to reserve resources.
   \end{sitem}

   \bigskip
   Datagram Model:
   \begin{sitem}
      \item There is no round trip time delay waiting for connection setup;
                a host can send data as soon as it is ready.
      \item Source host has no way of knowing if the network is capable of 
               delivering a packet or if the destination host is even up.
      \item Since packets are treated independently, it is possible to route
                around link and node failures.
      \item Since every packet must carry the full address of the
                destination, the overhead per packet is higher than for the
                connection-oriented model.
   \end{sitem}
\end{slide}

% -----------------------------------------------------------------
\begin{slide}{}

   \subsection{Performance}

   Switches can be built from a general-purpose workstations;
   will consider special-purpose hardware later.

   \pichere{softswitch.eps,height=3in}

   \begin{sitem}
      \item Aggregate bandwidth
      \begin{sitem}
         \item 1/2 of the I/O bus bandwidth
         \item capacity is shared among all hosts connected to switch
         \item example: 800Mbps bus can support 8 T3 ports
      \end{sitem}
      \item Packets-per-second
      \begin{sitem}
         \item must be able to switch small packets
         \item 15,000 packets-per-second is an achievable number
         \item example: 64-byte packets implies 7.69Mbps
      \end{sitem}
   \end{sitem}
\end{slide}
