<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../xslt/mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:m="http://www.w3.org/1998/Math/MathML">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Graph Theory: Networking</title>
    <link rel="stylesheet" href="../../css/style_mozilla.css" type="text/css" media="screen"/>
  </head>
  <body>
    <div id="logobarleft">
      <a href="http://links.math.rpi.edu/">
        <img src="../../css/titlebar_left.gif" alt="Project Links Logo"/>
      </a>
    </div>
    <div id="logobarright">
      <img src="../../css/titlebar_right.jpg" alt="Artwork"/>
    </div>
    <div id="titlebar">Graph Theory: Networking</div>
    <div id="breadcrumbbar">
			Home &gt; Graph Theory: Networking
					&gt; The Internet
					&gt; Distance-Vector Routing</div>
    <div id="sidebar">
      <div class="toolmenu1">
        <a href="banana.html" class="toolmenu1">Crib Sheet</a>
      </div>
      <br/>
      <div class="toolmenu2">
        <a href="banana.html" class="toolmenu2">Library</a>
      </div>
      <br/>
      <div class="toolmenu3">
        <a href="banana.html" class="toolmenu3">Help</a>
      </div>
      <br/>
      <div class="toolmenu4">
        <a href="banana.html" class="toolmenu4">Map</a>
      </div>
      <br/>
      <div class="toolmenu5">
        <a href="problemlist.xml" class="toolmenu5">Problem List</a>
      </div>
      <br/>
      <div class="toolmenu5">
        <a href="../index.html" class="toolmenu5">Module Home</a>
      </div>
      <br/>
      <div class="toolmenu6">
        <a href="http://links.math.rpi.edu/" class="toolmenu6">Links Home</a>
      </div>
      <br/>
      <br/>
      <div class="toc_topic">
        <a class="toc_link" href="page1.xml">Introduction</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="page2.xml">Objectives</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="page3.xml">Prerequisites</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">Foundations</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page4.xml">Directed Graphs</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page6.xml">Definitions</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page9.xml">Shortest Paths</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">Shortest-Path Algorithms</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page11.xml">Problem Variations</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page13.xml">Dijkstra's Algorithm</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page16.xml">Bellman-Ford Algorithm</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">Routing</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page19.xml">Overview</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page21.xml">Designing A Routing Protocol</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">Telephone Networks</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page23.xml">Overview</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page25.xml">Routing Strategies</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page26.xml">Costs</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page27.xml">DNHR</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">The Internet</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page29.xml">Overview</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page30.xml">Distance-Vector Routing</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page33.xml">Link-State Routing</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page37.xml">What's Next?</a>
      </div>
    </div>
    <div id="sectionbar">
      <div id="spacerright" class="spacerright">-</div>
      <div>
        <a href="page30.xml" class="sections">concepts</a>
      </div>
      <div>
        <a href="" class="sectionsgrayed">discover</a>
      </div>
      <div>
        <a href="page31.xml" class="sectionshighlighted">apply</a>
      </div>
      <div>
        <a href="page32.xml" class="sections">collaborate</a>
      </div>
      <div>
        <a href="" class="sectionsgrayed">practice</a>
      </div>
      <div id="spacerleft" class="spacerleft">-</div>
    </div>
    <div id="content"><h1>Distance-Vector Routing</h1>
				<h2>Problems with the Distance-Vector Algorithm</h2>
				<p>
				The distance-vector algorithm performs well if all nodes and links are
				functional.  However, it runs into many problems <b>(such as
				sending packets on a loop)</b> when links go down and come up.
				</p>
				<p>
				<b>
				Here's an example of how distance-vector routing, as it has been
				presented, can go wrong.
				</b>
				</p>
				<div class="figure" align="center"><a name=""/><img src="../graphics/threenodes.gif"/><br/><b><i>Figure 11</i></b><br/><br/></div>
				<ol><li>
						<m:math>
							<m:mi>A</m:mi>
						</m:math>
						routes packets to
						<m:math>
							<m:mi>C</m:mi>
						</m:math>
						via
						<m:math>
							<m:mi>B</m:mi>
						</m:math>.
					</li><li>
						Link
						<m:math>
							<m:mi>B</m:mi>
							<m:mi>C</m:mi>
						</m:math>
						goes down.
						<m:math>
							<m:mi>B</m:mi>
						</m:math>
						updates its cost to
						<m:math>
							<m:mi>C</m:mi>
						</m:math>
						to infinity.
					</li><li>
						<m:math>
							<m:mi>A</m:mi>
						</m:math>
						sends its vector to
						<m:math>
							<m:mi>B</m:mi>
						</m:math>.
						<m:math>
							<m:mi>B</m:mi>
						</m:math>
						sends its vector to
						<m:math>
							<m:mi>C</m:mi>
						</m:math>.

						<ol><li>
								Based on the information received,
								<m:math>
									<m:mi>B</m:mi>
								</m:math>
								updates its cost to
								<m:math>
									<m:mi>C</m:mi>
								</m:math>
								to three hops (the previous cost from
								<m:math>
									<m:mi>A</m:mi>
								</m:math>,
								plus one).
							</li><li>
								<m:math>
									<m:mi>A</m:mi>
								</m:math>
								updates its cost to
								<m:math>
									<m:mi>C</m:mi>
								</m:math>
								to infinity (since
								<m:math>
									<m:mi>B</m:mi>
								</m:math>'s
								distance vector had indicated that the distance from
								<m:math>
									<m:mi>B</m:mi>
								</m:math>
								to
								<m:math>
									<m:mi>C</m:mi>
								</m:math>
								is infinity, meaning that no connection exists).
							</li></ol>
					</li><li>
						<m:math>
							<m:mi>A</m:mi>
						</m:math>
						sends its vector to
						<m:math>
							<m:mi>B</m:mi>
						</m:math>.
						<m:math>
							<m:mi>B</m:mi>
						</m:math>
						sends its vector to
						<m:math>
							<m:mi>C</m:mi>
						</m:math>.
						<ol><li>
							Based on the information received,
							<m:math>
								<m:mi>B</m:mi>
							</m:math>
							updates its cost to
							<m:math>
								<m:mi>C</m:mi>
							</m:math>
							to infinity.
							</li><li>
							<m:math>
								<m:mi>A</m:mi>
							</m:math>
							updates its cost to
							<m:math>
								<m:mi>C</m:mi>
							</m:math>
							to 4 hops.
							</li></ol>
					</li><li> 
						The algorithm develops longer and longer paths from
						<m:math>
							<m:mi>A</m:mi>
						</m:math>
						to
						<m:math>
							<m:mi>C</m:mi>
						</m:math>,
						all of which are wrong as long as the link
						<m:math>
							<m:mi>B</m:mi>
							<m:mi>C</m:mi>
						</m:math>
						is damaged. These paths are oscillations between
						<m:math>
							<m:mi>A</m:mi>
						</m:math>
						and
						<m:math>
							<m:mi>B</m:mi>
						</m:math>.
					</li></ol>
				<p>
				How would you modify distance-vector routing to avoid
				problems like the one demonstrated above?  Take a few moments to
				jot down some idea before moving on to the next page, where you
				will be shown three methods that have been used.
				</p>
			</div>
    <div id="nav">
      <a href="page30.xml" class="nav">back</a>
      <a href="page32.xml" class="nav">next</a>
    </div>
    <div class="copyright">
			Copyright 1999
			Rensselaer Polytechnic Institute. All Rights Reserved.
		</div>
  </body>
</html>
