(rev. 01/06/2008) 
 
Notes On Chapter Thirteen 
-- WAN Technologies and Routing
 
-  13.1 Introduction 
     
     -  This chapter is about how to put together a packet-switched WAN
	  using long distance digital communication lines and routers.
	  
      
 -  13.2 Large Networks and Wide Areas 
     
     -  a LAN spans a single building or campus 
      -  a MAN can span a city 
      -  a WAN spans sites in multiple cities, countries, or continents.
	   Scalability is the key feature of a WAN
	  technology.  
      
 -  13.3 Packet Switches 
     
     -  
           The basic element of a WAN is a "packet
	  switch."   Many individual computers are connected to "I/O
	  connectors" on the switch. 
      -  Other (high speed) I/O connectors on the switch connect over long
	  distances to more switches, which are connected to more computers.
	  
      -   There are many different kinds of WAN's,
	  employing many different kinds of hardware and software for their
	  packet switches.  
      
 -  13.4 Forming A WAN 
      
     -  
          One chooses the speed and capacity of each switch-to-switch
	  connection with care.  It is important to match speed and capacity
	  to the anticipated traffic. 
      -  Usually one connects each switch to at least two other switches.
	  If one connection fails, communication can continue through
	  another. 
      
 -  13.5 Store And Forward  
     
     -  Unlike a LAN, in a WAN large numbers of packets move through the
	  network at the same time. 
      -  Switches are special purpose computers.  When packets arrive at a
	  switch they are  stored and forwarded:  examined by software
	  running on the switch, placed in a queue corresponding to the
	  interface from which they need to exit, and transmitted when the
	  interface is ready. 
      
 -  13.6 Physical Addressing In A WAN  
     
     -   The typical WAN has a standard frame format
	  and frame addressing rules.  This is just like the situation in a
	  LAN,  which has the same kind of rules.  Of course, the
	  rules and standards are different for different kinds of WANS, and
	  also different from the rules and standards of LANS. 
      -  
           Most WAN addresses are hierarchical.  
	  For example the first half of an address can determine the identity
	  of the destination switch, and the second part of the address can
	  determine which host on the switch.  
      
 -  13.7 Next-Hop Forwarding  
      
     -   Switches have to be concerned with routing.
	   
      -  If a switch S gets a packet addressed to  a
	  computer C attached directly  to S, then S must transmit the
	  packet onto its interface with C. 
      -  If a switch S gets a packet addressed to  a
	  computer K attached to a switch T directly connected  to S,
	  then usually S will transmit the packet onto its interface with T.
	  
      -  If a switch S gets a packet addressed to  a
	  computer J attached to a switch W  not  directly connected
	   to S, then ordinarily S should transmit the packet to a
	  switch X that is "closer" to W.  "Closer" usually means that there
	  are fewer links (hops) between X and W than there are between S and
	  W.  This kind of routing is called "next-hop." 
      -  
          Typically, switches use a table of routes to perform routing.  The
	  table in the figure shows the routing table for switch #2.  It has a
	  column of destinations and a column of corresponding interfaces for
	  the next hop.  (See figure.) 
      -   To route a packet, software on the switch
	  looks up the destination address in the routing table  and
	  sends the packet out on the corresponding interface. 
      -  Information in the table may be preloaded, discovered by
	  distributed algorithms performed by switches, or some combination
	  of those techniques. 
      
 
 -  13.8 Source Independence  
     
     -  Usually the source address of a packet (the address it came from)
	  plays no role in determining the packet's next-hop. 
      -  In other words, typically routing algorithms "don't care" where a
	  packet came from. 
      -  Routing algorithms only "care" about how to send a packet on its
	  way from its current location to its final destination. 
      -  The job of the router is relatively simple when the routing
	  decision is based solely on the destination address. 
      -  On the other hand, it is possible to send packets by different
	  routes based on characteristics of the packets, including source
	  address.  Considerations like this can come into play when there
	  are different "qualities of service" available. 
      
 -  13.9 Relationship Of Hierarchical Addresses To Routing 
     
     -   Routing is very demanding on processors and
	  memory.   The number of hosts N in a WAN can be very large.
	  Routing may be too inefficient if it takes O(N) memory or time to
	  route each packet. 
      -  It should be possible to determine routes with a quick hash or
	  associative search. 
      -  Routing tables should be made as compact in size as possible.
          
      -  
           Hierarchical addressing schemes facilitate
	  construction of compact routing tables with quick indexing.
	   For example, a switch can just use the destination switch
	  number as an index into a routing table and read off the next hop
	  for the packet.  This is a very quick alternative to searching the
	  table for each route. (See figure.) 
      -  However, if the destination switch is the local switch then the
	  local switch must route the packet out one of its host interfaces,
	  based on the host part of the address.  There can be a separate
	  table for that local routing. 
      
 -  13.10 Routing In A WAN 
     
     -  An exterior switch in a WAN is a switch that connects directly to
	  one or more computers. 
      -  An interior switches in a WAN connects only to other switches.
	  
      -  
           If a switch S in a WAN becomes overloaded,
	  the network architects can "split" S.   They add another
	  switch T to the network, disconnect some of the connections to S,
	  and reconnect them to T.   This is how WAN's
	  grow.  
      -  
          For this to work, each switch must do routing -- generally "shortest
	  path routing.".  The figure shows shortest path routing tables for
	  switches 1-4. 
      
 -  13.11 Use Of Default Routes 
     
     -   Using a default route in a routing table can
	  help to keep the table compact.  All routes are explicit
	  except the default route.  The switch checks first to see if there
	  is an explicit route.  If not the packet is sent out the interface
	  of the default route. 
      -  
           The figure shows how some of the previous routing tables can be
	   shortened by taking advantage of default routes.  
      
 -  13.12 Routing Table Computation  
     
     -   A switch can boot with some routing
	  information already in memory.  Other (static) information can be
	  downloaded from neighboring switches at boot time. 
	  Switches may dynamically cooperate to modify routing tables as
	  network conditions change. 
      -   Big networks have redundant links and
	  dynamic routing.  Routing software can automatically route
	  traffic "around" a failed link.  
      
 -  13.13 Shortest Path Computation In A Graph  
     
     -  
          Dijkstra's single source, all nodes, shortest paths algorithm
          is often used to compute the "shortest" distance from one switch to
	  another. Such computations determine the content of the routing
	  tables.  A packet is always sent to the next switch along the
	  shortest path. 
      -  
          Photo of Edsger Dijkstra
      -  
          The algorithm actually computes the "cheapest" route.  The cost of
	  each link can be assigned as desired -- whatever best describes the
	  true cost of traversing the edge. 
      -  The cost does not have to be the length of the link.  For
	  instance, the cost could be some function that takes into account
	  the time delay on the line (and delay can change over time).
	  
      -  If there are "political" reasons to discourage using some links
	  (e.g. they aren't "ours") then the metric can be adjusted to make
	  those links costly. 
      
 -  13.14 Distributed Route Computation  
     
     -   One disadvantage of using Dijkstra's
	  algorithm to calculate routes is that it is necessary to have in
	  advance a complete representation of the graph of the network.
	   
      -   An alternative is to let switches "learn"
	  about routes  by sending messages periodically to their
	  nearest neighbors.  After a short time all switches can learn the
	  best routes.  Also, if a link or switch fails, new routes can be
	  discovered. 
      
 -  13.15 Distance Vector Routing 
      The distributed distance vector algorithm for
     building dynamic routing tables goes as described below.   Note
     that this version does not handle the case of broken links or failed
     switches. 
     
     -  A switch X periodically sends the contents of its routing tables to
	  the switches directly connected to X. 
      -  The other switches do likewise. 
      -  When X gets routing information from Y it interprets them as a
	  series of messages of the form  "I can get
	  to Z over a path of distance equal to D."   X knows the
	  distance to Y is C.  Therefore X knows that X can get to Z over a
	  path of distance equal to D+C. 
      -  If X has a route to Z that has a longer distance than D+C, then it
	  will delete that route. 
      -  If X now has no route to Z, it will make a new entry in the table
	  that says to send packets addressed to Z to Y.  The entry will also
	  say that the distance to Z is D+C. 
      -  If X is already routing packets for Z to Y, X will check the
	  distance field of the route table entry and set it to D+C because
	  the distance may be new because of route changes in the tables of
	  other switches. 
      -  (Basically you handle failed links and switches by deleting a
	  route to a directly connected switch if it has not contacted you
	  in a long time.) 
      
 -  13.16 Link-State Routing (SPF)  
     
     -   Another version of dynamic routing (SPF)
	  calls for switches to broadcast knowledge of "edges" in the graph
	  of the network.  
      -  Switches  then build a representation of the
	  graph and run Dijkstra's algorithm  on it to build a
	  routing table. 
      -  This algorithm will be adaptive too, if edges are removed when
	  they are not re-announced after a long time, and if the routing
	  tables are re-computed when the representation of the graph
	  changes. 
      
 -  13.17  Example WAN Technologies 
	   
     
     -  13.17.1  ARPANET  
          
          -  Funded by the Defense Department. 
           -  One of the first packet switched WAN's 
	   -  Much of the important fundamental research on protocols for
	       packet switched networks was carried out using the ARPANET as
	       a test bed. 
	   -  ARPANET "evolved" into the Internet. 
           
      -  13.17.2 X.25  
          
	  -  An early packet switched technology originally designed for
	       point-to-point connectivity between terminals and remote
	       mainframes. 
	   -  X.25 employs a switch at each end. 
	   -  At one time the CSU WAN, joining all the campuses, was composed
	       of X.25 links. (As described on the second page of 
	       this document, the CSU started migrating to T1 connections
	       and frame relay in 1990.)  
           
      -  13.17.3  Frame Relay  
          
	  -  A telephone company service designed to shuttle traffic
	       between two or more LAN's separated by a long distance.  This
	       is useful when a company has several branch offices it wants to
	       connect. 
	   -  Frame relay transfers data in blocks of size up to 8000
	       octets. 
          
      -  13.17.4  SMDS  
          
          -  SMDS is Switched Multi-megabit Data Service. 
           -  High speed, optimized interfaces to computers 
           -  Generally faster than Frame Relay 
           
      -  13.17.5  ATM 
          
          -  ATM is Asynchronous Transfer Mode.
           -  It was conceived as a high bandwidth integrated services
	       data network to transfer voice, video, and data across
	       short, medium, and long distances -- kind of everything to
	       everyone.
           -  Expectations have gradually scaled way back, and now ATM
	       does not seem to have much of a future except in a few
	       pockets where it is used as a long haul technology.
           -  Designers of ATM felt it needed to switch small packets over
	       very high speed optical connections in order to meet all its
	       service goals.
           -  It is next to impossible to transmit voice properly with
	       large packets.
           -  ATM is put together according to the model of switches attached
	       to computers and other switches.
           
      
 -  13.18 Summary