Distance-vector routing protocol: Difference between revisions

Content deleted Content added
Jorjulio (talk | contribs)
m In the introduction, fourth sentence of first paragraph, changed "routers, on which a distance-vector protocol is implemented," to "routers using a distance-vector protocol". Also, in the same paragraph, last sentence, changed "informs" to "inform".
m not hyphenated in the rest of the section
 
(12 intermediate revisions by 10 users not shown)
Line 1:
{{short description|Class of routing protocols}}
{{Multiple issues|
{{More footnotes needed|date=September 2010}}
{{technical|date=November 2013}}
}}
Line 10:
 
The term ''distance vector'' refers to the fact that the protocol manipulates ''vectors'' ([[Array data structure|arrays]]) of distances to other nodes in the network. The distance vector algorithm was the original [[ARPANET]] routing algorithm and was implemented more widely in [[local area networks]] with the [[Routing Information Protocol]] (RIP).
 
==Overview==
Distance-vector routing protocols use the [[Bellman–Ford algorithm]]. In these protocols, each router does not possess information about the full [[network topology]]. It advertises its distance value (DV) calculated to other routers and receives similar advertisements from other routers unless changes are done in the local network or by neighbours (routers). Using these routing advertisements each router populates its routing table. In the next advertisement cycle, a router advertises updated information from its routing table. This process continues until the routing tables of each router [[Convergence (routing)|converge]] to stable values.
 
Some of these protocols have the disadvantage of slow convergence.
 
Examples of distance-vector routing protocols:
* [[Routing Information Protocol]] (RIP)
* [[Routing Information Protocol#RIP version 2|Routing Information Protocol Version 2]] (RIPv2)
* [[Routing Information Protocol#RIPng|Routing Information Protocol Next Generation]] (RIPng), an extension of RIP version 2 with support for [[IPv6]]
* [[Interior Gateway Routing Protocol]] (IGRP)
* [[Enhanced Interior Gateway Routing Protocol]] (EIGRP)
 
==Methodology==
Routers that use distance-vector protocol determine the distance between themselves and a destination. The best route for [[Internet Protocol]] [[Network packet|packets]] that carry [[data]] acrossthrough a [[data network]] is measured in terms of the numbers of [[Router (computing)|routers]] (hops) a packet has to pass through to reach its destination network. Additionally, some distance-vector protocols take into account other traffic information, such as [[network latency]]. To establish the best route, routers regularly exchange information with neighbouring routers, usually their [[routing table]], hop count for a destination network and possibly other traffic related information. Routers that implement distance-vector protocol rely purely on the information provided to them by other routers, and do not assess the [[network topology]].<ref>{{Cite book|title= Network+ Guide to Networks|url= https://archive.org/details/networkguidetone00dean_142|url-access= limited|author =Tamara Dean |publisher= Cengage Learning|year=2009 |isbn= 9781423902454|pages=[https://archive.org/details/networkguidetone00dean_142/page/n294 274]}}</ref>
 
Distance-vector protocols update the routing tables of routers and determine the route on which a packet will be sent by the ''next hop'' which is the exit interface of the router and the IP address of the interface of the receiving router. Distance is a measure of the cost to reach a certain node. The least cost route between any two nodes is the route with minimum distance.
Line 19 ⟶ 31:
 
== Development of distance-vector routing ==
The oldest [[routing protocol]], and the oldest distance-vector protocol, is version 1 of the [[Routing Information Protocol]] (RIPv1). RIPv1 was formally standardised in 1988.<ref>{{CiteRef webRFC|url=https://tools.ietf.org/html/rfc1058.html|title=Routing Information Protocol|last=Hedrick|first=C. L.|website=tools.ietf.org|language=en|rfc=1058|access-date=2019-04-16}}</ref> It establishes the shortest path across a network purely on the basis of the hops, that is numbers of routers that need to be passed to reach the destination network. RIP is an [[interior gateway protocol]], so it can be used in [[local area networks]] (LANs) on interior or border routers. Routers with RIPv1 implementation exchange their routing tables with neighbouring routers by [[Broadcasting (networking)|broadcasting]] a RIPv1 packet every 30 second into all connected networks. RIPv1 is not suitable for large networks as it limits the number of hops to 15. This hop limit was introduced to avoid routing loops, but also means that networks that are connected through more than 15 routers are unreachable.<ref>{{Cite book|title= Network+ Guide to Networks|url= https://archive.org/details/networkguidetone00dean_142|url-access= limited|author =Tamara Dean |publisher= Cengage Learning|year=2009 |isbn= 9781423902454|pages=[https://archive.org/details/networkguidetone00dean_142/page/n294 274]}}</ref>
 
<!--I don't think BGP is a distance-vector protocol but rather a path-vector protocol. Otherwise it would should be listed as solution to the count-to-infinity problem, because BGP uses paths and can therefore detect loops intrinsically-->
The distance-vector protocol designed for use in [[wide area network]]s (WANs) is the [[Border Gateway Protocol]] (BGP). BGP is an [[exterior gateway protocol]] and therefore implemented on border and exterior routers on the [[Internet]]. It exchanges information between routers through a [[Transmission Control Protocol]] (TCP) session. Routers with BGP implementation determine the shortest path across a network based on a range of factors other than hops. BGP can also be configured by administrators so that certain routes are preferred or avoided. BGP is used by [[internet service providers]] (ISPs) and telecommunication companies.<ref>{{Cite book|title= Network+ Guide to Networks|url= https://archive.org/details/networkguidetone00dean_142|url-access= limited|author =Tamara Dean |publisher= Cengage Learning|year=2009 |isbn= 9781423902454|pages=[https://archive.org/details/networkguidetone00dean_142/page/n294 274]–275}}</ref>
 
Line 28 ⟶ 41:
 
==Count to infinity problem==
The [[Bellman–Ford algorithm]] does not prevent [[routing loop]]s from happening and suffers from the '''count to infinity problem'''. The core of the count- to- infinity problem is that if A tells B that it has a path somewhere, there is no way for B to know if the path has B as a part of it. To see the problem clearly, imagine a subnet connected like A–B–C–D–E–F, and let the metric between the routers be "number of jumps". Now suppose that A is taken offline. In the vector-update-process B notices that the route to A, which was distance 1, is down – B does not receive the vector update from A. The problem is, B also gets an update from C, and C is still not aware of the fact that A is down – so it tells B that A is only two jumps from C (C to B to A). Since B doesn't know that the path from C to A is through itself (B), it updates its table with the new value "B to A = 2 + 1". Later on, B forwards the update to C and due to the fact that A is reachable through B (From C's point of view), C decides to update its table to "C to A = 3 + 1". This slowly propagates through the network until it becomes infinity (in which case the algorithm corrects itself, due to the relaxation property of Bellman-Ford).
 
===Workarounds and solutions===
[[Routing Information Protocol|RIP]] uses the [[Split horizon route advertisement|split horizon]] with poison reverse technique to reduce the chance of forming loops and uses a maximum number of hops to counter the 'count to infinity' problem. These measures avoid the formation of routing loops in some, but not all, cases.<ref>{{IETFRef RFC|1058}}, Section |section=2.2.2</ref>}} The addition of a ''hold time'' (refusing route updates for a few minutes after a route retraction) avoids loop formation in virtually all cases, but causes a significant increase in convergence times.
 
More recently, a number of loop-free distance vector protocols have been developed — notable examples are [[EIGRP]], [[DSDV]] and [[Babel (protocol)|Babel]]. These avoid loop formation in all cases, but suffer from increased complexity, and their deployment has been slowed down by the success of [[link state routing protocol]]s such as [[OSPF]].
Line 174 ⟶ 187:
|}
|-
|colspan=5| At this point, all the routers (A, B, C, D) have new "shortest-paths" for their DV (the list of distances that are from them to another router via a neighbor). They each broadcast this new DV to all their neighbors: A to B and C, B to C and A, C to A, B, and D, and D to C. As each of these neighbors receives this information, they now recalculate the shortest path using it.
 
For example: A receives a DV from C that tells A there is a path via C to D, with a distance (or cost) of 5. Since the current "shortest-path" to C is 23, then A knows it has a path to D that costs 23+5=28. As there are no other shorter paths that A knows about, it puts this as its current estimate for the shortest-path from itself (A) to D, via C.
Line 583 ⟶ 596:
==References==
{{Reflist}}
* {{Ref RFC|2453|ref=no}}
* [http://www.ietf.org/rfc/rfc1058.txt "RFC1058 - Routing Information Protocol", C. Hedrick, Internet Engineering Task Force, June 1988]
* [http://www.ietf.org/rfc/rfc1723.txt "RFC1723 - RIP Version 2 Carrying Additional Information", G. Malkin, Internet Engineering Task Force, November, 1994]
* [http://www.ietf.org/rfc/rfc2453.txt "RFC2453 - RIP Version 2", G. Malkin, Internet Engineering Task Force, November, 1998]
* "A Path-Finding Algorithm for Loop-Free Routing'', J.J. Garcia-Luna-Aceves and S. Murthy, IEEE/ACM Transactions on Networking, February 1997
* "Detection of Invalid Routing Announcements in the RIP Protocol", D. Pei, D. Massey, and L. Zhang, IEEE Global Communications Conference (Globecom), December, 2003
 
==Further reading==
* [http://docwiki.cisco.com/wiki/Routing_Basics#Link-State_Versus_Distance_Vector Section "Link-State Versus Distance Vector"] {{Webarchive|url=https://web.archive.org/web/20101214043441/http://docwiki.cisco.com/wiki/Routing_Basics#Link-State_Versus_Distance_Vector |date=2010-12-14 }} in the Chapter "Routing Basics" in the [[Cisco Systems|Cisco]] "Internetworking Technology Handbook"
* [httphttps://authorscsc-knu.phptrgithub.comio/tanenbaumcn4sys-prog/books/Andrew%20S.%20Tanenbaum%20-%20Computer%20Networks.pdf Section 5.2 "Routing Algorithms"] in Chapter "5 THE NETWORK LAYER" from "Computer Networks" 4th.5th Edition by Andrew S. Tanenbaum and David J. Wetherall
 
{{DEFAULTSORT:Distance-Vector Routing Protocol}}