(rev. May 02, 2015) 
 
Notes On Chapter Twenty-Six
-- Internet Routing and Routing Protocols
-  26.0 Study Guide  
    
    -  Know what static routing and dynamic routing are.
    
 -  Understand that every Internet host requires at
         least a rudimentary routing capability.
    
 -  Understand what Autonomous Systems are.
    
 -  Understand why it is not OK for an Internet routers 
         to broadcast routing information to all the other 
         Internet routers.
    
 -  Understand what Interior Gateway Protocols (IGPs) are.
    
 -  Understand what Exterior Gateway Protocols (EGPs) are.
    
 -  Know what policy constraints are, and why they are 
         necessary.
    
 -  Understand how EGPs and IGPs work together on the 
         Internet - in other words be able to explain what
         is going on in Figure 26.3.
    
 -  Understand that IGPs use routing metrics, but that
         EGPs do not, and why.
    
 -  Know the basics of what BGP is and how it works.  Know that
         it's an EGP.
    
 -  Know the basics about what RIP is and how it works.
         Know that RIP is an IGP.
    
 -  Know the basics of what OSPF is and how it works.
         Know that OSPF is an IGP.
    
 -  Be able to compare and contrast RIP and OSPF.  Know 
         advantages/disadvantages of one versus the other.
    
 -  Understand how an internet topology translates into 
         an OSPF graph, as illustrated by Figure 26.6.
    
 -  Know what multicast routing is and the reasons why it is
         difficult to implement.
    
 
 -  26.1 Introduction  
    
    -  Propagation of routing information
    
 -  Forwarding table updates
    
 -  Routing update protocols
    
 -  Interior and exterior routing protocols
    
 
 -  26.2 Static vs Dynamic Routing  
    
    -  When a router boots, it typically loads a forwarding table from a
         file on secondary storage.
    
 -  With static routing, the contents of the forwarding table
	 remain unchanged unless an administrator (a person) modifies it.
    
 -  With dynamic routing, the router executes route
         propagation software that communicates with route propagation
	 software on other routers, learns about changing network conditions
	 and updates its forwarding table accordingly.
    
 -  The goal is to keep packets moving along optimal routes from source
         to destination.
    
 
 -  26.3 Static Routing in Hosts and a Default Route  
    
    -  Refer to Figure 26.1.
    
 -  Every Internet host that sends an IP datagram is responsible to
	 forward it to its first-hop destination.
    
    
 -  Therefore every Internet host needs to have a forwarding table.
    
    
 -  Most hosts use just a simple static table with two entries:
         
	 -  one entry specifying direct delivery for the directly-connected
	      network, and
         
 -  an entry specifying a default router able to forward datagrams
	      to the rest of the Internet.
         
 
     
 
 -  26.4 Dynamic Routing and Routers  
    
    -  Refer to Figure 26.2.
    
 -  Most Internet routers need to perform dynamic routing.
    
 -  Fundamentally, that is because the Internet is dynamic. A
	 router needs to maintain next-hop information for reaching every
	 network in the Internet.  Congestion comes and goes.  Network routers
	 and links go up and down.
    
 -  Suppose a router R is connected to a few networks, and suppose each
	 of those networks is connected to several other routers.  To do a
	 good job, R needs to know at all times, and for every network N
	 in the Internet, which is the best next-hop destination to use for N.
    
 -  This information can change too rapidly for human administrators to
         keep up with it by manually altering forwarding tables.
    
 -  As an example of how dynamic routing can work, consider that
         router R1 in figure 26.2 might communicate
         with router R2 across Network 3.  Router R1
         might learn from router R2 about the existence of 
         Network 2 through the exchange of routing information with router     
         R2, and router R1 might update its forwarding
         table to show that the next hop for packets addressed to Network 2
         should be router R2.
    
 
 
 -  26.5 Routing in the Global Internet  
    
    -  Too much traffic would be generated if every Internet router
         exchanged routing information with every other Internet router.
    
 -  Instead routers in specific groups exchange routing information and
         representatives of the groups report the information to routers
	 outside the group.
    
 -  Regulators of the Internet have given organizations a lot of
	 discretion to choose their own routing hierarchies and protocols.
    
 
 -  26.6 Autonomous System Concept  
    
    -  The term autonomous system (AS) is often used to refer to
         groups of routers that exchange information and use representatives
	 to communicate it to the rest of the Internet routers.
    
 -  Typically an autonomous system is a connected set of networks and
	 routers controlled by a single administrative authority, such
	 as an ISP, or a public or private organization.
    
 
 -  26.7 The Two Types of Internet Routing Protocols  
    
    -  An Internet routing protocol is either an interior gateway
	 protocol or an exterior gateway protocol. (Routers 
         are also known as Gateways.)
    
     -   26.7.1 Interior Gateway Protocols (IGPs)
          
          -  For exchanging routing information within an autonomous system,
	       routers use interior gateway protocol software.
          
 -  Usually IGP software is easy to install and operate, but has
	       limited scalability.
          
 
    
     -   26.7.2 Exterior Gateway Protocols (EGPs)
          
          -  When a router belonging to one autonomous system exchanges
	       routing information with a router belonging to a different
	       autonomous system, they use an exterior gateway protocol.
          
 -  EGPs are typically more complex to install and operate but
	       scale well.
          
 -  Routing information is communicated in summary form. 
          
 -  Managers can configure the software to put policy
	       constraints on the information released outside the
	       organization.  (A basic idea is to be cautious about
               advertising routes to outsiders if you don't want 
               outsiders to use those routes. )
          
 
    
    
     -   26.7.3 Illustration of How IGPs and EGPs Are Used
          
          -  Refer to Figure 26.3.
          
 -  Routers in Autonomous System 1 use an interior gateway
               protocol to exchange routing information among themselves.
               The same goes for routers in Autonomous System 2.  
          
 -  Routers 1 and 4 use an exterior gateway protocol to exchange
               summary routing information regarding the Autonomous Systems
               to which they belong.  
          
 -  When router 1 receives new information 
               from router 4, router 1 passes some of it along to routers 2 and 3, 
               so they can update their routing tables with information about 
               routes to networks that are connected to Autonomous System 2.  
               Router 4 behaves the same way, giving information to routers 5 and 6 
               about networks connected to Autonomous System 1.
             
          
 
 
     -   26.7.4 Optimal Routes, Routing Metrics and IGPs
          
          -  Ideally routers cooperate to keep datagrams moving along
	       optimal paths.  However the definition of "optimal" is
	       elusive.  Is it least delay?  Highest throughput?  Least
	       jitter?
          
 -  Currently, the typical Internet router works with a very
	       simplified approximation to the concept of "optimal path."
	       Usually the length of a path is measured as a combination of
	       hop-count and administrative cost.
          
 -  The idea of the administrative cost metric is for
	       administrators to artificially inflate hop-counts in some
	       forwarding tables in order to prevent certain paths from being
	       used by certain hosts.  
          
 -  IGPs use routing metrics.
          
 -  EGPs DO NOT use routing metrics.  To use routing metrics, EGPs
	       would have to compare and resolve routing information from
	       different autonomous systems, compiled using different IGPs.
	       EGPs don't try to address such problems.  They just communicate
	       reachability information.
          
 
     
 -  26.8 Routes and Data Traffic  
    
    -  Refer to Figure 26.4.
    
 -  "When routing advertisement flows out, data will begin to flow in."
    
 
 
 -  26.9 The Border Gateway Protocol  
    
    -  Border Gateway Protocol (BGP) is the Internet's most widely
         used exterior gateway protocol.
    
 -  BGP characteristics:
         
         -  Routing Among Autonomous Systems: BGP gives routes as
	      paths of autonomous systems.
	 
 -  Provision for Policies: Managers can configure BGP to
	      restrict which routes it advertises to outsiders.
         
 -  Facilities for Transit Routing: BGP classifies each AS as
	      a transit or stub system.
              
              -  A transit system agrees to pass traffic 
                   through to another autonomous system.
              
 -  A stub system does not.
              
 
          -  Reliable Transport: Routers executing BGP software use
	      TCP connections to communicate reliably.
         
 
     -  The Internet relies heavily on BGP.  Tier-1 ISPs use BGP.
    
 
 -  26.10 The Routing Information Protocol (RIP)  
    
    -  RIP was among the first interior gateway protocols used on the
         Internet.
    
 -  RIP Characteristics:
         
         -  Designed for Routing within an Autonomous System
         
 -  Measures distance using a Hop Count Metric (The
	      directly-connected net is counted as one hop away.)
         
 -  RIP communicates using UDP, which is Unreliable
	      Transport.
         
 -  RIP uses Broadcast or Multicast Delivery.
         
 -  RIP has Support for CIDR and Subnetting.  It sends a mask
	      with each destination address.
         
 -  RIP has Support for Default Route Propagation.
         
 -  RIP uses a Distance Vector Algorithm.
         
 -  There is a Passive Version for Hosts.  Hosts don't
	      advertise routes, but they can listen to RIP and use the info to
	      update their routing tables.  This allows hosts to select among
              multiple routers that may be connected to their network.
         
 -  There is a version of RIP for IPv6 - RIP next generation (RIPng).
         
 
     -  Entries in a RIP forwarding table are basically of the form:
         (destination network, distance)
         where distance is the number of hops to the destination.
     -  RIP is very "plug and play." Mainly all a manager has to do is start
	 it up on each router. The routers talk to each other, and after a
	 short time they all have the information they need.
    
 
 -  26.11 RIP Packet Format  
    
    -  Refer to Figure 26.5.
    
 -  This is the format of the RIP update message used with IPv4
    
 -  Notice that it is set up as a list of sets of route information.
    
 -  Each route is represented with the following information:
         family, route tag, IP address, address mask, next hop, and distance.
    
 -  The family field is almost always just a 16-bit code that
         says the type of address family used is IP. 
    
 -  The route tag is something used to group entries.
    
 
 
 -  26.12 The Open Shortest Path First Protocol (OSPF)  
    
    -  A disadvantage of RIP and other distance-vector protocols is that it
         generates a lot of datagrams.  Every router on a network broadcasts
	 information to all the other directly-connected routers.
    
 -  Thus RIP becomes less and less efficient as the number of routers
         and networks that can be reached increases.
    
 -  Also routes tend to propagate slowly.
    
 -  The Internet Engineering Task Force (IETF) designed the Open
         Shortest Path First Protocol (OSPF) to satisfy demand for an IGP
	 that scales to large autonomous systems better than RIP.
    
 -  OSPF Characteristics:
         
         -  Routing within Autonomous Systems: OSPF is an IGP.
         
 -  CIDR Support: OSPF sends masks with addresses.
         
 -  Authenticated Message Exchange: Route info reveived is 
              authenticated.
         
 -  Imported Routes: For example a router can learn a route
	      from BGP and propagate it with OSPF.
         
 -  Link-State Algorithm: messages are of the form "The link
	      between X and Y is up (or down)" and OSPF uses Dijkstra's
              algorithm to calculate shortest paths.
         
 -  Support for Metrics: An administrator can assign a cost
	      to each route.
         
 -  Extension to IPv6: Version 3 of OSPF (OSPFv3) propagates
              routes to IPv6 destinations.
         
 -  Support for Multi-Access Networks: Rather than allow all
	      routers on a directly-connected multi-access network (e.g. an
              Ethernet) to broadcast routes, OSPF optimizes 
              by designating a single router to do it.
         
 
     
 -  26.13 An Example OSPF Graph  
    
    -  Refer to Figure 26.6.
    
 -  OSPF calculates paths in graphs like the one in Figure 26.6 (b).
    
 -  Note that the routers correspond to nodes in the graph, 
         and the networks correspond to some of the 
         edges in the graph.
    
 -  Note that not all networks turn up as edges in the graph,
         and
    
 -  a single network may correspond to 
         several edges in the graph.
    
 -  The way the algorithm works, each routers in 26.6 (b) periodically
         checks that it can reach each of the routers to which it is directly
         connected by one of the edges. 
    
 -  Then the router broadcasts that link-state information to all the 
         other routers.
    
 -  Each router collects all the link-state information for the entire 
         network, and calculates the shortest paths from itself to all the 
         other routers.
    
 
 
 -  26.14 OSPF Areas  
    
    -  A hierarchical approach  allows OSPF to scale better than RIP. 
    
 -  OSPF allows managers to subdivide their networks into OSPF
         areas.
    
 -  Routers within a single area periodically exchange link-state
         information.  If they broadcast, it is not forwarded across
         the area boundary.
    
 -  A single representative router from each area is designated to
	 communicate with one or more representatives of other areas.
    
 -  Area representatives exchange summarized routing information.
    
 
 -  26.15 Intermediate System - Intermediate System (IS-IS)  
    
    -  IS-IS is an IGP similar to OSPF.
    
 -  It was originally proprietary to DEC, and used in OSI networks.
    
 -  A version that works with IP routing is now available.
    
 -  Features have been added to OSPF to a point where IS-IS 
         has less overhead.
    
 -  The development of a version of OSPF that could handle IPv6
         contributed significantly to the increase in overhead.
    
 -  IS-IS is gaining in popularity among large ISPs.
    
 
 -  26.16 Multicast Routing  
    
    -  26.16.1 IP Multicast Semantics
         
         -  Hosts are allowed to join or leave an IP multicast group at any
	      time, by sending a message to a local router.
         
 -  Member hosts receive one copy of each datagram sent to an IP
	      multicast group.  If there are multiple applications on the host
	      that have requested membership, then the host is required to
	      furnish each of those application with a copy of each multicast
	      datagram.
         
 -  There's no method provided for discovering the identities of
	      members of an IP multicast group, or for learning the size of
	      the group.
         
 -  An arbitrary application may send a datagram to any IP multicast
	      group at any time.  It is not required to join the group.
         
 
     -  26.16.2 IGMP
         
         -  A host uses Internet Group Multicast Protocol (IGMP) to
	      communicate with a router when joining or leaving an IP
	      multicast group.
         
 
	 
     -  26.16.3 Forwarding and Discovery Techniques
         
	 -  Internet routers have the responsibility to propagate multicast
	      routing information.
	 
	 
 -  Dynamic group membership and support for anonymous senders make
	      the routing problems hard.
         
 -  Because members can join and leave at will, the system has to 
              support routes that change quickly and continually.
         
 -  Because senders are arbitrary, routing information has to be 
              globally available.
	 
	  -  Multicast protocol approaches to datagram forwarding:
	      
	      -  Flood-and-Prune
	           
	           -  This works well for small multicast groups all
		        attached to contiguous LANs connected by routers,
			e.g. within a company "intranet".
	           
 -  Initially routers cooperate to flood - to forward each
			multicast datagram to all networks (via hardware
			multicast), while avoiding loops, and also exchanging
			information about group membership.
	           
 -  When routers learn that there are no members of the
			group on a connected network, they prune it - they
			stop forwarding the group datagrams to it.
	           
 
 
	       -  Configuration-and-Tunneling
	           
	           -  This works well when the group is geographically
		        dispersed - a few members at each of a few sites.
	           
 -  A router at each site is configured to know about
		        other sites.
	           
 -  When the router receives one of the datagrams for the
		        group, it forwards it via hardware multicast locally.
	           
 -  It then consults its configuration information and
			sends a copy to each remote site on its list - using
			IP-in-IP tunneling, to encapsulate the
			multicast datagrams in unicast datagrams.
	           
 
 
		   
	      
	       -  Core-Based Discovery
	           
	           -  This technique helps provide "smooth growth" of an IP
		        multicast group.
	           
 -  A core unicast address is assigned to the multicast
			group. If router R1 receives a multicast
			datagram to forward, it encapsulates it and forwards
			it to the group's core unicast address.
	           
 -  Routers along the way examine the datagram.
	           
 -  When it arrives at a router R2 that
		        participates in the group, R2 removes the
			datagram from its encapsulation and forwards it to
			members of the group using multicast routing.
	           
 -  If R1 wants to forward a request to join the
		        group to R2, it also send to the core
			unicast address.
	           
 -  When R2 gets the request, it adds a new
		        route to its multicast forwarding table and starts
			using IP-in-IP to send copies of multicast datagrams
			to R1.  
	           
 -  A basic idea here is to grow the set of routers
			receiving the multicast as a tree.
	           
 
 
	       
          
     -  26.16.4 Multicast Protocols
         
         -  Refer to Figure 26.7.
	 
 -  Notwithstanding twenty years of research and experimentation,
              there is still no Internet-wide multicast routing facility.
	 
         
 -  Proposed Protocols:
	      
	      -  Distance Vector Multicast Routing Protocol (DVMRP):
	           a type of configuration-and-tunneling protocol
	      
 -  Core Based Trees (CBT): a core-based-discovery
	           protocol
	      
 -  Protocol Independent Multicast - Sparse Mode
		   (PIM-SM): a core-based-discovery protocol
		   
	      
 -  Protocol Independent Multicast - Dense Mode
		   (PIM-SM): a flood-and-prune protocol
		   
	      
 -  Multicast Extension to the Open Shortest Path First
		   Protocol (MOSPF): builds on OSPF and uses link-state
		   requests within an organization.
	      
 
          -  Despite a couple of decades of research, there is still no 
              practical Internet-wide multicast routing standard.