(Latest Revision: 
Sat Mar 31 21:17:49 PDT 2007
) 
 
Notes On Chapter Twenty-Seven
-- Internet Routing
 
-  27.1 Introduction 
     
     -   This chapter is about how routing information
	  is propagated around the Internet  
      
 -  27.2 Static Vs. Dynamic Routing 
     
     -   Routers load static and initial routes when
	  they boot.   
      -   Dynamic routes  are subject to change as
	   routing software on various routers exchange
	  information regarding optimal routes  
      
 -  27.3  Static Routing In Hosts And A Default Route 
     
     -  Static routing can't adapt to changes in network topology or network
	  failures.  
      -  Most Internet hosts reside on a network with a single Internet
	  router.  They have no need for dynamic routing.  
      -  Such  a host usually has a static routing table
	  with two entries:   one for sending packets directly on the
	  local network, and the other to forward all other packets to the
	  router.  (See figure (b) above.) 
      
 -  27.4 Dynamic Routing And Routers 
      
     -   Most routers do dynamic routing  so that
	  they can learn and adapt quickly when  new
	  networks become reachable,  when 
	  congestion slows routes,  and when  old
	  routes stop working.   
      -   Routers  do dynamic routing by  informing each other about what they know to be
	  reachable.   
      
 -  27.5 Routing In The Global Internet 
     
     -  The routers don't just all talk to each other "willy-nilly." That
          would generate too much traffic. 
      -  Instead the design of router communication is
	  hierarchical.   Small  groups of routers
	  talk  among themselves, and then 
	  representatives of groups talk with representatives of other groups.
	    
      
 -  27.6 Autonomous System Concept 
     
     -   The groups  of routers that talk are
	  often referred to as  autonomous systems.
	    
      -  Usually an autonomous system consists of a network or set of  networks operated by  one organization such as
	  a  company division or college campus. 
	  
      -  There is no hard and fast rule about how an autonomous domain
          must be defined.  
      
 -  27.7 The Two Types Of Internet Routing Protocols 
      
     -  27.7.1 Interior Gateway Protocols  (IGPs)
	  
          
          -   Within an autonomous system 
	       routers will use an interior gateway protocol (IGP).  An IGP is
	       typically simple but does not scale well. 
           
 
      -  27.7.2 Exterior Gateway Protocols  (EGPs)
	   
          
          -  A router uses an exterior gateway protocol (EGP)  to communicate with a router in a different
	       autonomous system.   
           -  An EGP will typically be more complicated to implement than an
	       IGP but it will allow a router to send a lot of information in
	       a compact form, and thus it will be more 
	       conservative of bandwidth  than an IGP. 
           -  An EGP will allow for routing based on administrative
	       policy. Some routes will not be advertised simply because
	       domains do not want to admit certain kinds of traffic.
	       
           
 
      -  27.7.3 When EGPs and IGPs Are Used  
      -  27.7.4 Optimal Routes, Routing Metrics, and IGPs  
          
          -  Most IGP routers use  hop count  and
	        administrative cost  as routing metrics.  
           -   When administrators don't want traffic
	        routed into a part of their network, they set the
	       administrative cost factor high.  In essence this seems to add
	       "extra hops" to routes that cross their network and so routers
	       tend to avoid sending traffic via such routes. 
           -  Each autonomous system is free to use whatever metric it
	       wants.  
           -   EGPs don't use metrics  because
	        they don't know how to compare routes
	        that they get from autonomous systems with different
	       IGP's that use different metrics to evaluate routes.  
           
 
      
 
 -  27.8 Routes and Data Traffic  
     
     -  When routing infromation starts flowing out along a path
	  through the Internet, messages (data) starts flowing in
	  along that same path. 
      
 -  27.9 The Border Gateway Protocol (BGP)  
     
     -  Border Gateway Protocol (BGP)  is a very
	   popular EGP.   The current version is
	  BGP-4.  
      -   BGP gives routes as a string of autonomous
	  systems,  with no metrics or information about routers within
	  each autonomous system.  
      -  A manager can do policy-based routing by 
	  configuring BGP not to advertise some routes  to outsiders.
	  
      -  If an autonomous system is not willing to pass traffic through to
	  another autonomous system then it is classified by BGP as a  stub system.  Otherwise it is a  transit system.  
      -   BGP uses TCP  to send its routing
	  information.  This achieves reliable transport.  
      -  Major ISPs use BGP in conjunction with the routing arbiter
	  system -- a distributed database of verified routing information
	  about all possible destinations on the Internet.  
      
 -  27.10 The Routing Information Protocol (RIP)  
     
     -   RIP is a popular IGP  on Unix hosts.
	  The route daemon (called  routed) runs
	  RIP  software.  
      -  RIP   
          
          -  uses a hop count metric,  
           -   uses UDP for delivery,  
           -  broadcasts or multicasts routes,  
           -  can advertise a default route,   
           -  advertises [destination network, distance] pairs, i.e. performs
               distance-vector routing, and 
           -  can be configured on a host just to listen for routes. 
           
      -   The basic algorithm:   
           
          -  A host broadcasts a route on a directly-connected network:
               [[destination net; distance]]   
           -  If the receiver does not have a route to that destination it
	       installs the route from the sender    
           -  Likewise, it installs the route if it is shorter than an
	       existing route to the same network. 
           
    
      -  After a short time, all routers have been told about all routes in
	  the organization.   Routes in tables tend to get
	  better and better.   
      -  RIP is easy to configure.  
      -  An organization can configure one router on a network with a default
	 route and RIP software will tell all the hosts on the LAN that route.
	 
      
 -  27.11 RIP Packet Format  
     
     -  Basically a RIP packet is a list of [destination network,
	  distance] pairs.  
      -  RIP sends its complete routing table in each message.  
      -  RIP does not scale well to a larger network.  
      
 -  27.12 The Open Shortest Path First Protocol (OSPF)  
     
     -   OSPF:   
  -  is an IGP,
	  
           -  supports CIDR and subnets by sending masks,  
           -  does authentication to assure routes are accepted only from
	       a trusted source, 
           -  allows a router to advertise routes learned from an EGP such
	       as BGP, 
           -  uses link-state routing,  and 
           -  designates a single host to broadcast on a network. 
           
      
 -  27.13 An Example OSPF Graph  
     
     -   The basic idea of link-state routing:  
	  
          
          -  Routers must  periodically probe 
	       the routers to which they are directly connected.  Basically
	       they do an echo request.  
           -  Then the routers  broadcast 
	       information about  which  specific
	        links  between routers are "up"  -- responding.  
           -  When a router notices that the status of a link has changed,
	       it takes the current link-state information it has and works
	       out shortest-path routes to all the routers it knows about.
	       
           -  Through OSPF, in effect  each router gets a
	       list of nodes (routers) and edges (connecting networks).
	        
           -  Together the information represent a graph.  
           -   The router runs an algorithm to find the
	       shortest paths in that graph.  
           
      
 -  27.14 OSPF Areas  
     
     -   OSPF uses a hierarchical partitioning scheme.
	    
      -  The network managers can partition the set of routers into
	  subsets called areas.  
      -  Within each area the routers "speak OSPF" to each other.
	  
      -  For inter-area routing, designated area representative routers
	  exchange summary routing information 
      -  The hierarchical routing strategy is one of the things that
          allows OSPF to scale well. 
      
 -  27.15 Multicast Routing  
     
     -  27.15.1 IP Multicast Semantics  
          
          -  Any host is free to join a multicast group at any time.  A
	       router near a member of a multicast group is chosen to be
	       responsible to see that multicast packets are routed to the
	       host-member.  The host can quit the group any time.  The
	       multicast packets should then stop arriving at that host.
	       This is a very dynamic situation.  
           -  The host will send "I'm still a member" messages to the
	       local router until the last application on the host decides
	       to stop receiving the multicast.  At that point the host
	       sends a "I quit the group" message to the router.  
           -  An IP multicast group is anonymous   
                
               -  There is no easy way to discover which hosts are
		    members of the group.  Even the sender and the other
		    group members have no particular "tools" for getting
		    this information.  
             
                -  An arbitrary host can decide to send a message to a
		    multicast group any time it wants.  
                
           
      -  27.15.2 IGMP  
          
          -  Internet Group Multicast Protocol (IGMP) is the protocol
	       used between a host and router on the same network that
	       allows the host to join or quit a multicast group. 
           
      -  27.15.3 Forwarding and Discovery Techniques  
          
          -  When a router on a network learns through IGMP that a host
	       to which it is directly connected has joined a multicast
	       group, it becomes the responsibility of that router to see
	       to it that the host receives the packets of the multicast.
	       
           -  Multicast routing software is responsible to locate members
	       of the group and then "create an optimal forwarding structure"
               
           -  Approaches to Multicast Routing:   
               
               -  Flood-And-Prune: At first the routers forward the
		    multicast packets onto all interfaces.  After a while
		    forwarding becomes very selective when routers learn
		    which networks contain members of the multicast group.
		    
                -  Configuration-And-Tunneling: A router in each local
		    area is configured to know about the other local areas
		    (where multicast group members exist).  Anytime one of
		    these routers receives one of the multicast packets it
		    "floods" it locally, and also sends it to its peer
		    routers in the other localities. 
                -  Core-Based Discovery: designate a core unicast address
		    for each multicast group.  A router X needing to reach
		    the group sends a packet to the core address.  While
		    the packet is in transit the routers it travels through
		    examine it.  When a router Y that is a participant in
		    the multicast group sees the packet it processes the
		    message.  (The message may be a request to join the
		    group or it may be a request to send a packet to the
		    group).  This method forms a tree or routes. 
                
           
      -  27.15.4 Multicast Protcols  
          
          -  There is no Internet-wide standard multicast protocol.
	       
           -  Distance Vector Multicast Routing Protocol (DVMRP): used by
	       the mrouted unix program and by Internet Multicast
	       backBONE (MBONE) -- uses local multicast and IP-in-IP
	       encapsulation. 
           -  Core Based Trees (CBT): The protocol software builds a
	       delivery tree from a central point. 
           -  Protocol Independent Multicast -- Sparse Mode 
               (PIM-SM): similar to CBT 
           -  Protocol Independent Multicast -- Dense Mode (PIM-DM):  a
	       flood-and-prune protocol for use within an organization.
	       
           -  Multicast Extensions to the Open Shortest Path First
	       protocol (MOSPF): designed for use within an organization.
               
           
      
 -  27.16 Summary