\documentstyle[12pt,pocs-header]{article}
\Scribes{Uri Blank and Rainer Gawlick}
\Lecturer{Butler Lampson}
\LectureNumber{15}
\LectureDate{4 November 1991}
\include{macros}
\begin{document}
\MakeScribeTop

\section{Switched Networks}

In switched networks each node has to figure out on which link to send
a received packet based on the contents of the packet. This means that
nodes in a switched network implement some sort of a map A$\rightarrow
$L from addresses to links. These maps are often called routing
tables.  A node receiving a packet looks at the address contained in
the packet's header, applies the map to the address, and sends the
packet out on the link determined by the map. A node in a switched
network has to:
\begin{enumerate}
\item Use the map A$\rightarrow $L to switch packets
\item Maintain map A$\rightarrow $L
\item Deal with overloads 
\item Scale
\end{enumerate}

\subsection{Using The A$\rightarrow $L Map To Switch Packets}
The map from address to links is represented internally by data
structures and, in order to achieve good performance, nodes often
have  hardware to perform fast lookups
in the data structures representing the map.  
The hardware will depend on the type of addresses used by the network.
 In broadcast networks the address space is flat and small;
each node has a unique address, for example a 48-bit
Ethernet address. In this case the hardware performing the map lookup
is highly optimized for simple table lookups. 
The same type of hardware can also be used for switched networks if some
mechanism can be found to deal with the large number of addresses that 
a switched network potentially supports. Each node on the switched
network has to be able to interpret a large number of addresses. 
Fortunately there are
mechanisms that can be used to limit the number of addresses
each node in a switched network is required to support in its
A$\rightarrow $L map: hierarchical addresses, short address spaces,
and source routing.

\paragraph{Hierarchical Addresses:}
Hierarchical addresses make it much simpler to implement the map
A$\rightarrow $L.
If a node has an address /a/b, then, for any packet with an
address of the form /a/b/X or a/X,
the node will be able to determine on which link the packet should be sent. 
Nodes with such a hierarchical  addressing mechanism are structured into a
tree.  Each node in the tree must be able to interpret and switch 
some limited part of the address space local to its part of the tree.


\paragraph{Small Address Spaces:}
A switched network that has a limited number of nodes does not need a 
large address space. High speed local area networks 
(LANs) typically have small addresses spaces.  Small address spaces allow
the node to have the entire map A$\rightarrow $L in the high speed RAM thus providing 
for high speed lookups.  A Variation of the idea of short
address spaces is an idea of a virtual circuit ID. Virtual circuit IDs 
identify specific end-to-end connections in a network.  Only the nodes through 
which the connection is routed need to be aware of the virtual circuit ID
associated with the connection.  The virtual circuit mechanism allows 
nodes to keep the number of address that they have to manage at any point 
in time small, thus achieving the same effect as a globally small address 
space.  Usually virtual circuit
schema are coupled with some mechanism that establishes the virtual circuits
using a central agency.  Before sending any packets, an 
application requests a virtual circuit ID from the central authority.
The telephone system uses a virtual-circuit based routing algorithm.

\paragraph{Source Routing:}
If the source of a packet knows which links the packet must traverse,
then the source node can include this information in the packet header.
In this case the switching node reads the packet header in order to determine
on which link the packet should be forwarded.  Clearly nodes that 
forward packets are not required to maintain routing tables when 
source routing is used.  Source routing is often used for interprocessor
communication in multiprocessor machines.

\subsection{Maintaining Map A$\rightarrow $L}
In all addressing schemes except source routing each node must maintain
its address to link map.  As a result, changes to the 
network topology must be communicated throughout the network.
There are several ways to distribute topology change information.
A simple way is a manual update of the routing tables on each node. 
Another way is stop all network traffic while 
new routing maps are calculated and distributed.
The advantage of both 
approaches is that routing-table updates occur in an 
environment without concurrency.  The disadvantage is that 
disruptions to network services can be prolonged and frequent.  
Therefore, many network protocols provide a mechanism for
topology updates to be done during normal operation of the network.
Algorithms that perform topology updates during normal operation of the
network typically rely on nodes distributing their local view of the
network topology.  Each node maintains its A$\rightarrow $L map, or
routing table, based on the local topology information gathered from other
nodes.

\subsection{Overloads}
If frames arrive at a node faster than they can be forwarded, the node
can run out of buffer space.  In response to the exhaustion of its buffers,
the node must prevent the arrival of additional packets.  This can be
accomplished by requiring acknowledgements for each message sent over
a link or by explicitly making capacity information available to the nodes
sending the packets.  Once the sender stops forwarding messages, it too 
may eventually run out of buffer space.  In this way, the buffer
exhaustion will be propagated through the network all the way to the 
source.  Widespread buffer exhaustion in a network can cause deadlocks and
severe performance problems.

The simplest thing a network can do if there is an
overload is to drop packets.  Unfortunately, this does not resolve the problem
because protocols will retransmit lost messages. 
The problem is typically resolved by having senders use
some kind of exponential back-off algorithm. An alternative solution is to
use scheduling.  Scheduling algorithms typically use some agency
to collect all the requests for network capacity.  The agency decides 
how the network capacity should be allocated and then
sends this decision to the requesting nodes.  The disadvantage of scheduling
is that it requires a significant amount of communication.
In practice back off algorithms are used much more frequently. To
detect congestion in the network, the sender uses round
trip transmission times. When the round trip transmission time exceeds a
certain threshold the sender decreases the the transmission rate.
The Internet protocol uses the scheme based on transmission times
as the basis for its congestion control algorithm. Initially a sender
sends packets at a modest transmission rate.  If the sender detects good
round trip response times it increase the transmission rate; poor
response times illicit the opposite response.

\subsection{Scale}
Most of the difficulties associated with large scale networks come from 
the fact that these networks are usually
not managed as a single entity. Different parts are managed by
different people often having different interests.
Listed below are some examples of large switched networks:
\begin{itemize}
\item The telephone network is by far the largest switched network.
      
\item The Internet, which has around one million nodes, is the second largest network .
            
\item Bridged LANs:  
 Typically the number of nodes connected to a single LAN is limited by
bandwidth and other physical characteristics of the transmission
medium.  However, the number of nodes connected to a LAN-based network
can be greatly increased through the use of {\em bridges} that
physically interconnect individual LANs.  The routing tables used by a
bridge are built dynamically.  By snooping the network traffic, a
bridge can determine which nodes are directly connected to the LANs
interconnected by the bridge.  A bridge forwards a message from one
LAN to the other when it detects a message on a LAN and the
destination address of the message does not belong to a node on the
LAN on which the message was detected.  In order to avoid transmission
cycles, bridges in a network are typically organized into a spanning
tree structure.
	
\end{itemize}
\end{document}


