arXiv:1111.1514v1 [cs.NI] 7 Nov 2011 aesvrldsdatgs h otfmu r the are famous most The disadvantages. several have overhead. message com- and network. less complexity have whole putational protocols the distance-vector in node typically the information So requires the neighbors protocol broadcast its to state inform a link to a of node while metric associated about the the information only require when algorithms the routing And distance-vector all changes, store link topology. to network proto- has rout- routing the node link-state for a a information in col, distance while to destinations and nodes ing hop the requires next only store protocols routing vector uses calculate protocol to paths.[13] routing algorithm Bellman-Ford routing distance-vector Distributed link-state of the the A classes being class major protocol. major two other to the the of protocols, relating one is routing theory protocol distance-vector a communication networks, packet-switched computer In Introduction 1 problem. infinity to count the rout- prevent and can loops proto- information, ing routing limited vector prob- on distance infinity based how cols, to is count focus our the Our of solve lem. some to give how on and thoughts ) dif- and five RIP-MTI to AODV, EIGRP, (RIP, introduction protocols brief routing a vector distance give ferent we paper this In Abstract oee,dsac-etrruigpooosalso protocols routing distance-vector However, distance- protocols, routing link-state to Compared ∗ † [email protected] [email protected] uvyo itneVco otn Protocols Routing Vector Distance on Survey A ipn Tang Linpeng oebr5 2018 5, November 1 astems oua neirruigpooo is protocol routing interior per- popular and most protocol, the routing most haps the vector far distance so is popular Protocol Information Routing The protocol RIP 2 summa- the 1. we Table solve end in to the results how In the on rize 7). thoughts Section our problem(See of CTI some give We’ll also protocols. routing Babel and RIP-MTI EIGRP, rout- OSPF link-state protocol. two the ing for are Protocols competitors EIGRP Routing major Gateway and and Interior RIP com- successful reality, or storage very In limited or a power. have networks puting only sized node median each or when small for suitable networks. more big really for suitable not are areas, routing they support so don’t distance- protocols but routing routing, vector accelerate typically to are areas networks into for large divided reality, support In the been areas. is have routing issue more critical protocols years [7].Another routing recent proposed vector in distance However, secure network. affect whole severely a may the distributively, node done malicious or is malfunctioning vector computation Distance be- routing issues, security cause from problem. suffers this also protocols solve routing or how alleviate see effi- worked will have to we the protocols survey routing impede vector this distance In greatly several protocol. problem, emerge the of CTI might ciency to loops lead routing and topology, about information network limited the has only Be- router problem. each (CTI) cause infinity to count and loop routing i Liu Qin , ∗ o el ei u nrdcint I,AODV, RIP, to introduction our begin we’ll Now are protocols routing vector distance general, In † the TCP/IP suite. RIP protocol’s popularity results from its simplicity, early adoption in a popular oper- ating system (BSD) and early standardization in the RFC. Figure 1: a simple network topology that would cause 2.1 Overview of RIP protocol count to infinity problem RIP protocol is the simplest form of a distance vec- tor routing protocol. For example, the routing ta- process goes on. This kind of routing loop causes ble is very simple and only employs very limited the count to infinity problem, draining the network information–destination, hop count and next hop. bandwidth, slowing down the routing path conver- Its working are also easy to understand. On a gence and severely impeding the performance of RIP regular basis, each router in the network sends out protocol. its routing table to its neighbors, informing them to RIP partly solves this problem by setting the max- which subnets it is connected and how far these sub- imum hop count to be 15, so a hop count of 16 means nets are (by measure of hop count). Once a router a distance of infinity. And so the above process can receives such a routing message, it updates its rout- at most last for 15 rounds. Some people say this ap- ing table. Say router B sends to router A claim- proach would limit the size of the network that RIP ing it has a route to C with hop count K, then A can support. However, a network with a diameter of knows that by going through B, it can reach C with 15 is actually already too large for RIP protocol (typ- hop count K + 1. RIP protocol is essentially based ically routers are organized hierarchically, and just on a distributed version of the famous Bellman-Ford image a tree of routers with a depth of 7 and how shortest path algorithm. Assuming the protocol is ex- many routers would be in this network). The prob- ecuted in a synchronous fashion (that is, each round lem is that with such a large network (potentially tens the routers receives the routing message, updates the of thousands of computers), the routing table would routing table and sends out a new message, at the be quite large, the exchange in routing tables would same time), then Bellman-Ford algorithm tells us the generate too much traffic and the routing path may routing path will converge in no more than K rounds, converge too slow. In this case, maybe a hierarchical where K is the diameter of the network. routing protocol is more suitable. The RIP protocol has several advantages. It is sim- ple, and it is every efficient for small and simple net- 2.2 RIP Special Features For Resolv- works, consuming little network bandwidth and little ing RIP Algorithm Problems storage and computing power for the routers (which may be a battery powered small device). The simplicity of the Routing Information Protocol is The RIP protocol, however, also suffers from some its most attractive quality, but in order to solve some inherent limitations. The most famous is perhaps the of its inherent problems and improve its performance, count to infinity problem. In Figure 1 say A, B and we have to add to its complexity. However, we will C are all connected in a network and suddenly C is see these can’t solve the routing loop and count to disconnected because of a corrupted link. We would infinity completely.[1] naturally want A and B to find this out immediately. Now note that B initially has a route to C with hop 2.3 Split Horizon count 1. Now this route is invalid, but instead B would find that A has a route to C with hop count Split Horizon can prevent the routing loop problem in 2, and so it assume it has a route to C through A, some simple structured networks. And it’s intuitively with a hop count of 3; then, A would similarly up- simple. Its rule is that if in A’s routing table the next date its route to C with a hop count of 4; and the hop to a particular subnet is B, then A never reveals

2 to B that it has a route to this subnet. However, A typical hold-down timer runs for 60 or 120 seconds. this technique can’t prevent routing loop in Figure Note that hold-down would actually solve the count 2. Now A, B, C are three routers that are linked to to infinity problem in Figure 2 because A and B both each other and C has a link to a subnet n. And in refuse to receive updates from each other. A’s and B’s routing table, they both have a route to The may disadvantage of hold-down is that it forces n with the next hop being C. Now if the link from a delay in a router responding to a route once it is C to n is broken, A would falsely assume that it can fixed. in 2, Suppose a little malfunction causes C to reach n from B, and so B would similarly assume it go down for 5 seconds, but A and B would refuse to can reach n from A. So these two nodes would easily route to n for 60 or 120 seconds! form a routing loop. 3 AODV routing protocol

3.1 Introduction to the AODV proto- col The Ad-hoc On-Demand Distance Vector(AODV) routing protocol is designed for use in ad-hoc mobile networks. AODV is a reactive protocol, meaning the routes are created only when they are needed[11]. It assigns each routing reply with a sequence number to determine whether routing information is up-to-date and to prevent routing loops. Figure 2: A simple network topology where split hori- Route discovery is based on query and reply cycles. zon can’t solve the count to infinity problem When a node needs a route to a particular node, it sends a routing request to its neighbors and when a route has been found, the reply will be forwarded 2.4 Split Horizon with Poisoned Re- back to the originator of the request. Each node only needs to remember a set of routing destinations verse and the next hop of the route with some other auxil- In split Horizon with Poisoned Reverse, if in A’s rout- iary information, so AODV is a typical distance vec- ing table the next hop to a particular subnet is B, tor routing algorithm. Four kind of control packets then instead of hiding this routing from B, A actively are used: routing request message (RREQ) is broad- claim its distance to this subnet is infinity (that is 16 casted by a node requiring a route to another node, in RIP protocol). This adds more insurance that an routing reply message (RREP) is routed back (using outdated routing information would not help form a the reverse route) to the source of RREQ, and the routing loop in a changing network. However, it can’t route error message (RERR) is sent to notify other prevent routing loop as in Figure 2. nodes of the loss of a link, as is common is mobile networks. HELLO messages are sent periodically for 2.5 Hold-Down detecting and monitoring links to neighbors. The hold down feature works by having each router 3.2 Overview of the routing protocol start a timer when they first receive information about a subnet that is unreachable. Until the timer The AODV routing protocol is reactive, meaning expires, the router will discard any subsequent route that it creates and maintains routes only if they are messages that indicate the subnet is in fact reachable. needed, on demand. Each node will store its own

3 routing table, and every entry in the table includes 3.3 Sequence Numbers the following items: The sequence numbers are the most important fea- 1. a routing destination ture of AODV for removing the old and invalid in- formation from the network. They works as a sort 2. number of hops of the route of time stamps and prevent the AODV protocol from 3. destination sequence number the loop problem[11]. The destination sequence num- ber for each destination host is stored in the rout- 4. a list of precursors that may be forwarding pack- ing table, and is updated in the routing table when ets on the route the host receives the message with a greater sequence number. 5. the expiration time for this routing table entry Each node keeps its own sequence number, which Note that each node performing AODV protocol has is changed in two cases: a sequence number that is incremented when it sends 1. before it sends RREQ message, the sequence a RREQ or when a destination node sends back the number is incremented. RREP message. And this sequence number will be used to distinguish the up-to-date route from the 2. Immediately before a destination node originates older, possibly invalid route , so AODV is completely a RREP in response to a RREQ, it MUST up- loop free and copes well in a highly dynamic network. date its own sequence number to the maximum When one node wants to send a message to a node of its current sequence number and the destina- that is not one of its Neighbors, it will broadcast a tion sequence number in the RREQ packet[9] (as RREQ message. On receiving the RREQ message, sequence number is only 32 bit long, it may wrap the fellow nodes will try to satisfy the request to zero after it has reached the maximum value possible, and it is necessary for the destination • if its routing table has a valid route to the des- to always keep its sequence number the largest tination, or it is the destination, it will generate among the other nodes’ opinions, so this step is a RREP message back to the originator of the crucial.) request

• if it doesn’t have a valid route, it will rebroadcast 3.4 Solution to the Count to Infinity the RREQ message. Problem Note that the RREQ ID will be incremented each The following proof is excerpted from[11]. time the source node sends a new RREQ, so the pair (source IP address, request ID) identifies a RREQ Theorem 3.1. AODV routing protocol is loop-free. uniquely. In this way, other nodes can discard the duplicate or the older RREQ messages and saves the Proof. Proof by contradiction: Let {N1,...,Nm} be communication overhead of RREQ broadcasting. a loop in a route from any source node to any destina- If a node detects a link breakage to one of its Neigh- tion node. That means that these nodes are chained bors(say, a Neighbor has not sent HELLO to it mes- to each other. Assume without loss of generality that sage for a while), it will generate a RERR message. It will first invalidate the existing routes that has the nextHop(Ni)= Ni+1 lost Neighbor as the next hop, then lists the affected ∀1 ≤ i ≤ m, where Nm+1 = N1 destinations and determines if any of its neighbors may be affected (such Neighbors may have delivered Then, from the definition of AODV destination se- messages to it using the affected routes), and then quence numbers, we have (Note that node A will only delivers an appropriate RERR to such Neighbors.[9] have node B as its next hop if B has a route of same

4 or larger destination sequence number than that of 4 Enhanced Interior Gateway A) Routing Protocol

DestSeqNo(Ni) ≤ DestSeqNo(Ni+1) ∀i Enhanced Interior Gateway Routing Proto- ⇒ DestSeqNo(Ni)= DestSeqNo(Nj) ∀i, j col(EIGRP) is a Cisco proprietary routing protocol This means that the information about the desti- loosely based on their original IGRP. EIGRP is nation node was obtained from the same RREP mes- an advanced distance-vector routing protocol, with sage. Taking into account of the definition of the hop optimizations to minimize both the routing insta- bility incurred after topology changes, as well as count, we get the use of bandwidth and processing power in the

hopCount(Ni)= hopCount(Ni+1)+1 router. The basis of its operation is the Diffusing Update Algorithm (DUAL)[6], which is used to But Nm has N1 as its next hop, so compute shortest paths distributedly and with- out ever creating routing-table loops or incurring hopCount(Nm)= hopCount(N1)+ m − 1 counting-to-infinity behavior. = hopCount(Nm)+1+ m − 1 and we get m = 0, thus completing the proof. 4.1 Overview of EIGRP In this section, we will introduce how EIGRP oper- ates. 3.5 Evaluation of AODV 4.1.1 Diffusing Update Algorithm Advantages AODV has no central administrative system to control the routing process, and reacts very This section provides a summary of the operation of fast to topological changes in the networks. It saves DUAL as it applies in EIGRP, the details can be storage and energy since each node only needs to found in [3]. store the routing entries which it is responsible or Each router maintains a vector with its distance to interested in. every known destination in the routing table. Rout- ing information is exchanged only between neigh- Disadvantages It’s possible that a valid route is bors by means of update messages; this is done af- expired. And it is often hard to determine a rea- ter routers detect changes in the cost or status of sonable expiration time–a too short ET will cause links. Each update message contains a distance vec- repeated, unnecessary routing requests while a too tor of one or more entries, and each entry specifies the long ET will cause the protocol slow to changes. And length of the selected path to a given destination, as since AODV only stores a very limited information well as an indication of whether the entry constitutes in each node(destination, next hop), each node has a an update, a query, or a reply to a previous query. limited communication range, this causes AODV to A router also maintains a topology table containing rely on route discovery flood more often, which may the distance reported by selected neighbor routers to carry significant network overhead. The performance each known destination. Information for the routing of AODV protocol is poor in larger networks, since table is taken from the topology table. larger networks has longer paths and longer paths is For a given destination, a router updates its rout- more vulnerable to link breakages and requires high ing table differently depending on whether it is control overhead (may cause many more broadcasts) passive or active for that destination. A router for its maintenance.[11] Moreover, AODV is vulner- that is passive for a given destination can update able to various kinds of attacks, because it is based the routing-table entry for that destination indepen- on the assumption that all nodes will cooperate. dently of any other routers, and simply chooses as its

5 new distance to the destination to be the shortest dis- a query specifies the router’s new distance through tance to that destination among all neighbors, and as its current successor. its new successor to that destination to be any neigh- Once active, a router cannot change its successor, bor through whom the shortest distance is achieved. its feasible distance, the value of the distance it re- In contrast, a router that is or becomes active for ports to its neighbors, or its entry in the routing ta- a given destination must synchronize the updating of ble, until it receives all the replies to its query. A its routing-table entry with other routers. A router is reply received from a neighbor indicates that such a active if it is waiting for at least one neighbor to send neighbor has processed the query and has either ob- a reply to a query already sent by the router, and tained a successor to the destination, or determined is passive otherwise. Furthermore, a router is initial- that it cannot reach the destination. Once Node i ized in passive state for all known destinations with a obtains all the replies to its query, it computes a new 0 distance to itself and a finite distance to other des- distance and successor to destination j, updates its tinations that are directly attached to an adjacent feasible distance to equal its new distance, and sends link. Passive destinations with infinite distances are an update to all its neighbors. removed from the topology table. When a router is passive and needs to update its 4.1.2 Feasibility Condition routing table for a given destination j after it pro- cesses an update message from a neighbor or detects The feasibility condition given by Equation (4.1) is a change in the cost or availability of a link, it tries called source node condition(SNC). Using SNC when to obtain a successor. From router i’s standpoint, a nodes choose their successors is sufficient to select successor toward destination j is a neighbor router k minimum cost loop-free paths. that satisfies the following two equations: To show that the SNC guarantees loop-freeness, i i i i i recall that at the time when router i accepts an up- Dj = Djk + ck = min{Djp + cp|p is a neighbor} i date from router k, Djk announced by router k is no k i i i smaller than FDj ; since it is smaller than FDj, at Djk

6 The feasible successor effectively provides a backup 2. Loop-free and fast convergence. EIGRP uses route in the case that existing successors die. Also, DUAL , only routing table changes are propa- when performing unequal-cost load-balancing (bal- gated; and to one route ,only relative routers ancing the network traffic in inverse proportion to the will recalculates. cost of the routes), the feasible successors are used as next hops in the routing table for the load-balanced 3. Low usage of network resource. During normal destination. operation, usage of network resource is very low; By default, the total count of successors and feasi- only hello packets are transmitted on a stable ble successors for a destination stored in the routing network. When a change occurs, only routing table is limited to four. table changes are propagated, not entire routing table; this reduces the load the routing protocol itself places on the network. 4.1.4 Composite and Vector metrics EIGRP, like IGRP represents distances as a compos- 4.2.2 Disadvantages ite of available bandwidth, delay, load utilization, and 1. There is no area in EIGRP, so it is not good at link reliability. dealing with big hierarchy network. For the purposes of comparing routes, the vector metrics are combined together in a weighted formula 2. In some cases, the routers will be active for quit to produce a single overall metric[14]: a long time, this affect the fast convergence se- riously. For instance, in a long and narrow net- K2 · Bandwidth work, if something has changed, it would take K1 · Bandwidth + + K3 · Delay  256 − Load  EIGRP a long time to send the message from K5 one side to the other side. · · 256 K4 + Reliability 3. In a broadcast network, EIGRP sets up a full where the various constants (K1 through K5) can be mesh adjacency relationship with each other, the set by the user to produce varying behaviors. An routers exchange information with other. This important and totally non-obvious fact is that if K5 would waste a lot of bandwidth. is set to zero, the term is not used (i.e. taken as 1). 4. EIGRP is a protocol come up with by Cisco, it The scaling factor, 256, was introduced as a sim- is a private protocol, not a open standard. ple means to facilitate backward compatility between EIGRP and IGRP. EIGRP also maintains a hop count for every route, 5 RIP-MTI protocol however, the hop count is not used in metric calcu- lation. It is only verified against a predefined max- 5.1 introduction to the RIP-MTI pro- imum on an EIGRP router (by default it is set to tocol 100). Routes having a hop count higher than the maximum will be advertised as unreachable by an RIP is popular for its simplicity, but it also suffers EIGRP router. from the CTI problems most severely. Is there any way to design a better routing protocol that is com- patible with the widely used RIP protocol and solves 4.2 Evaluation the CTI problem simultaneously? This sounds like a 4.2.1 Advantages impossible mission, however, according to [12], by ex- ploiting the distance vector updates more thoroughly 1. Accurately routing load calculating. EIGRP than common RIP protocols, it is possible to design a uses composite metrics. much better protocol, and this new protocol is called

7 Routing Information Protocol with Minimal Topol- ogy Information (RIP-MTI). In this section we will see how the new protocol has exploit the routing min- imal information communicated in the RIP protocol and discuss its advantages and limitations.

5.2 The Network Model First we introduce some basic terms like hop, path, Figure 3: A particular from router i to subnet d with Simple Loop and Source Loops that are used by the a metric of 3 designers of the RIP-MTI protocol. The follow defi- nitions are from [12]. A network consists of subnets and routers which ∀Ij 1 ≤ j

i,d We will use different methods to detect X- P = (H1,H2,...,H ) A l Combination Source Loops and Y-Combination = ((O1,s1, I1), (O2,s2, I2),... (Ol,sl, ∗)) Source Loops later.

Now we introduce the defintion of Simple Loop and 5.3 Loop Detection Source Loop, which are of special interest to RIP- Loop detection lies at the heart of RIP-MTI protocol. MTI protocol. In a complex network, there may be many loops. Now i,d,i i,d,i Definition 5.1. A Simple Loop is a path PA,B where if there is a simple loop PA,B that starts from router A, B ∈ i, O1 = A, Il = B, ∃n1 ≤ n ≤ l,sn = d, and i at interface A, goes to subnet d and comes back

8 i,d i,d at interface B, then it means there are at least two PA to subnet d with metric mA . The combina- i d i,d,i routes from to , and if one route starting from tion of these path results in a path PA,B with metric A i,d,i i,d i,d i,d,i is corrupted, we may switch to the route starting m = m +m −1. We want to know if P is a B P i,d,i A,B A B A,B from . However, if A,B is a Source Loop, then Simple Loop or a Source Loop. And to achieve this, a harmful routing loop might form if we accept the we check the metrics on X- and Y-Combination by B routing updates from . So the critical question is to the two inequalities we have established. If the path distinguish between Simple Loops and Source Loops. passes the test, it is a Simple Loop, and we will upate The minimum Simple Loop metric (msilm) be- the minimum Simple Loop metric and the minimum A B i tween to interfaces and on router is: return path metric accordingly. i i,d,i msilmA,B = min silmA,Bforallsubnetsd n o 5.4.2 CTI Situations silmi,d,i where A,B means the metric of a Simple Loop Now we briefly introduce how RIP-MTI avoids rout- i,d,i PA,B . ing loops. For simplicity we assume the network rout- Further on we define the minimal return path met- ing path has converged. Now consider a typical sit- ric (mrpm) as follows: uation when a routing loop might occur. Router i d B i i,d,i has a path to subnet from interface , but now the mrpmA = min{silmA,B link is corrupted, and i receives an update from B for all interfaces B 6= A of router i} which makes the entry invalid. And then i receives an update from A claiming an alternative path to A. Now we have the following two sufficient conditions How can i decide whether this update is valid or not? for detecting Source Loops: It uses the loop information in the mslm and mrpm i,d,i i,d,i table. • A path PA,B with metric mA,B is no X- Combination, if the following inequality holds: • If there is no simple path between A and B, the i,d i,d update must be rejected. (No simple path means m + m − 1 < mrpmi + mrpmi A B A B no alternative path) • A path P i,d,i with metric mi,d,i is no Y- i,d i,d A,B A,B • If mA + mB − 1 < mslmA,B, the update will Combination, if the following inequality holds: be rejected. i,d i,d i i,d i,d i,d mA < mrpmA + mB • mA ≥ mrpmA + mB − 1, the update will be accepted or rejected according to the working Please note that even a path fails for these paths, modes, because we are not sure whether it’s a it may still be a valid path (because we only have valid update. such limited information at hand, we can’t have a necessary-and-sufficient condition for source loop de- Please note that there are still many details and tection). subtleties that I omit in this gentle introduction, and the interested reader may consult [4], which pro- 5.4 RIP-MTI routing vides a detailed explanation. There are actually three working modes in RIP-MTI: 5.4.1 Loop detection 1. The Normal Mode rejects only alternative routes Suppose that router i has an entry to subnet d via i,d which have been verified as invalid. interface B with metric mB . This indicates a path i,d PB . Now i receives an update to subnet d via in- 2. The Strict Mode accepts only the alternative terface A 6= B. This indicates an alternate path routes which have been verified as valid.

9 3. The Careful Mode accepts only the alternative ent from DSDV and EIGRP. routes which have been verified as valid and marks the invalid for further consideration. 6.1.1 Feasibility Condition

5.5 Summary of RIP-MTI protocol Babel uses the same feasibility condition, SNC, that is used in EIGRP. According to [12], the designers of the protocol has tested the RIP-MTI protocol using the visualization 6.1.2 Solving Starvation: Sequencing Routes techniques, and the results show that RIP-MTI does converge faster than RIP in complex network topolo- Obviously, the feasibility conditions defined above gies. cause starvation when a router runs out of feasible In summary, RIP-MTI is indeed a very interest- routes. Consider the following diagram, where both ing distance vector routing protocol. It is downward A and B have selected the direct route to S: compatible with the simple RIPv2 protocol and at A the same time overcomes the shortcomings of RIP D(A) = 1 using only very limited information. The key point FD(A) = 1 is that it traces the different routing updates coming 1 from different interfaces of one router, and using this information it can learn something about the network 1 S topology and thus avoid many CTI problems. D(B) = 2 FD(B) = 2 The downside of RIP-MTI, of course is that it still cannot eliminate CTI problems completely and 2 soundly–by completely I mean rejecting any invalid routing updates, and by soundly I mean accepting B any valid updates. The normal mode will accept some invalid updates and the strict mode will reject some Suppose now that the link between A and S breaks: valid updates. The careful mode somehow provides A a compromise between the two.

The RMTI project has implemented RIP-MTI pro- FD(A) = 1 tocol included a whole “Qugga Routing Suite”. And we will see whether this new approach will gain its 1 popularity. S D(B) = 2 FD(B) = 2

6 Babel routing protocol 2

The Babel routing protocol is a mostly loop-free B distance-vector routing protocol that is designed to be robust and efficient on both wireless mesh net- The only route available from A to S, the one that works and classical wired networks. It is based on goes through B, is not feasible: A suffers from a spu- the idea in DSDV[10] and EIGRP in Section 4. rious starvation. At this point, the whole network must be rebooted 6.1 Overview of Babel in order to solve the starvation; this is essentially what EIGRP does, when it performs a global syn- In this section, we describe how Babel operates con- chronization of all the routers in the network with ceptually and we only detail the part that are differ- the source (the ”active” phase of EIGRP).

10 Babel reacts to starvation in a less drastic man- 6.1.3 Requests ner, by using sequenced routes, a technique intro- duced by DSDV and adopted by AODV. In addition In DSDV, the sequence number of a source is in- to a metric, every route carries a sequence number, a creased periodically. A route becomes feasible again nondecreasing integer that is propagated unchanged after the source increases its sequence number, and through the network, and is only ever incremented the new sequence number is propagated through the by the source; a pair (s,m), where s is a sequence network, which may, in general, require a significant number and m a metric, is called a distance. amount of time. A received update is feasible when either it is more Babel takes a different approach. When a node de- recent than the feasibility distance maintained by the tects that it is suffering from a potentially spurious receiving node, or it is equally recent and the metric starvation, it sends an explicit request to the source is strictly smaller. More formally, if FD(A) = (s,m), for a new sequence number. This request is forwarded ′ ′ then an update carrying the distance (s ,m ) is fea- hop by hop to the source, with no regard to the fea- ′ ′ ′ sible when either s >s, or s = s and m

1 starvation has an (unfeasible) route to the source; S D(B) = (137, 2) hence, in the absence of packet loss, at least one such FD(B) = (137, 2) request will reach the source. (Packet loss is com-

2 pensated for by resending requests a small number of times.)

B Since requests are forwarded with no regard to the feasibility condition, they may, in general, be caught After S increases its sequence number, and the new in a forwarding loop; this is avoided by having nodes sequence number is propagated to B, we have: perform duplicate detection for the requests that they forward.

A

FD A , ( ) = (137 1) 6.2 Evaluation

1 Babel has been reported to be a robust protocol and S D(B) = (138, 2) to have fast convergence properties[2][8]. FD(B) = (138, 2) Babel offers high multi-hop bandwidth and fast 2 route repair time. Babel has also been reported to outperform OLSR[5], but it’s still not suitable for B highly mobile networks[2]. Hence, the design of a high performance routing protocol for mobile ad hoc at which point the route through B becomes feasible network (MANET) still remains an open research is- again. sue.

11 7 How to solve the count to in- the picture, although they have a direct link to each finity problem other, are pretty far away from each other in the tree.

From the discussion of RIP protocol, we can see that routing loop and count to infinity problem is a de- mon that all distance vector routing algorithm must face. Next we will give some of our thoughts about the count to infinity problem and how to solve it. Later we’ll examine some more sophisticated routing protocols and see how they cope with the problem.

7.1 Thoughts A natural extension for Split-Horizon would be in- stead of storing the next hop information, we store Figure 4: A typical shortest path spanning tree, the next K hop in the routing table, and refuse to re- where the arrow means parent-children relation and veal the relevant routing information to them. How- the dotted line means a direct link ever, this simple solution would not suffice. Suppose K+2 routers are directly connected to each other and Now suppose a link or a router goes down. What one of them has a link to subnet n. If this link is bro- does this mean to this shortest path spanning tree? It ken and we would adopt the next-K-hop approach, a means a subtree of nodes have to modify their route routing loop of K + 2 would still form. to n. In order to prevent routing loops in this pro- But, of course, if we set K to be 15 in RIP, this cess, we can first make all the nodes in the subtree to approach would suffice, but anyway it’s not a elegant invalid their route to n, and then let the nodes figure solution and can’t scale to larger networks. It is in- out a new, valid route to n. teresting to know that BGP protocol actually stores So how to make all the nodes in the subtree to in- the information of all the Autonomous Systems the valid their route to n? We adopt a controlled flood- route has passed in the update message, and so in ing. Suppose B detects that its link to A is broken Wikipedia[13] someone claims that BGP is not a pure (perhaps by the loss of HELLO messages),and further distance vector routing algorithm, and we will omit B has A as the next hop to n. Now B has to invalid BGP in this survey. all its descendants in the shortest path spanning tree to n. 7.2 Our approach First B sends a unique INVALID ROUTE request to all its neighbors (except A, which is disconnected We can still work out a theoretical approach to anyway, and with a unique sequence number to prevent the routing loop problem in RIP protocol, deal with duplicate messages), and all its neighbors and our approach is similar to some mechanisms in would respond. In particular, those neighbors with EIGRP, but its efficiency is still to be tested by prac- B as the next hop to n would respond with a IN- tice. We call our approach RIP-Tree in this paper. VALID RELAY message, meaning that they will re- We consider the shortest path spanning tree to a lay the message to all its descendants. B will refuse particular subnet n. That is, if B has A as the next to receive any updates about route to n until all its hop in its route to n, we add a edge from B to A. children has completed their tasks. Now it is easy to see the nodes (the routers that have The process goes on in a recursive way until at the a route to n) and these edges would form a tree. It is bottom of the spanning tree, a router with no children interesting to note that two routers, like C and D in receives the INVALID ROUTE request, finds out it

12 has completed the relay task, and informs its parent cols have tried to solve this problem using different with a INVALID COMPLETE message. And this methods. Cisco’s EIGRP protocol has been widely message goes all the way back to the root of the sub- deployed on Cisco’s routers. AODV is an on-demand tree. When the root receives INVALID COMPLETE ad-hoc mobile network routing protocol. RIP-MTI message, it starts a controlled flooding again to has the beautiful property of of downward compat- spread the START ROUTING message. When a ibility with RIP protocol while avoiding CTI prob- node receives a START ROUTING message, it starts lem, and has little computation overhead. Babel in- to receive the update messages about n. To increase tegrates the advantages of EIGRP and DSDV, it uses the stability of the algorithm, when a node sends sequence number to reduce starvation caused by SNC out an INVALID ROUTE message, it starts a timer. in EIGRP, and converges fast in ad hoc network. We When the timer expires, it also begin to receive up- give Table 1 comparing these five different routing dates. This feature is similar to hold-down in RIP algorithms. protocol. We also put forward a new method, RIP-Tree, to It is easy to understand why RIP-Tree is guaran- eliminate the count to infinity problem. Our method teed to prevent routing loops. Note that when the is based on the spanning-tree property of the short- root of the subtree receives a INVALID COMPLETE est paths in networks, and performs a more complex message, all the nodes of the subtree have invalid “invalidation” process (compared to RIP) when cor- their route to n. After that the nodes will begin to rupted links are detected. RIP-Tree is an asymptoti- receive updates about n, but none of the updates can cally fastest method, but its performance in practice originate from the subtree, so routing loop is pre- is yet to be tested. vented. We should also consider the case when two or more subtrees perform this process simultaneously. Note that in this case all nodes of the subtree B and D will eventually find that they can’t route to A. If node C, after the invalidation of subtree B, decides to route to A through D. According to our design of RIP-Tree, D has not started the invalidation pro- cess yet and will later inform C that this route is also invalid. Our algorithm also works best asymptotically. If the diameter of the network (the maximum distance between any two nodes) is D, it is easy to see that a routing update will take D hops to reach the whole network in the worst case. By our method, we spend 2D hops to invalidate the subtree, so the algorithm is also O(D). Our method suffers from the problem of single failure node (the root of the subtree), but we overcome this by setting a timer for each node.

8 Conclusion

In this section, we’ll compare the five routing algo- rithm we’ve surveyed. RIP is by far the most popu- lar and the simplest distance vector routing protocol, but it suffers from CTI problems. All other proto-

13 Protocol Scope of Applica- Techniques On- Overhead Convergence speed Loop-free Name tion demand RIP stable or slowly reversed-poison, NO low(if there are no routing loops may NO changing networks hold-down routing loops) greatly impede con- vergence RIP-MTI interior gateway feasibility condition NO low normal mode con- strict mode is loop routing with fre- with loop detection, verges faster but free, normal mode quent topology hold-down may lead to routing converges faster but changes loops, strict mode is not loop free converges slower but is safer AODV ad-hoc mobile net- sequence number, YES save overhead be- fast YES

14 works controlled flooding cause of on-demand of routing requests routing, but may cause more over- head in stable net- works EIGRP Interior gateway DUAL, Feasibility NO low fast YES routing with fre- Condition: SNC, quent topology Composite Metric changes Babel Wireless mesh net- Feasibility Con- NO low fast(presumably YES works and classical dition: SNC, faster than EIGRP) wired networks Sequence Number

Table 1: Comparison of RIP, RIP-MTI, AODV, EIGRP and Babel protocols References [11] G Sklyarenko. AODV routing protocol. In Sem- inar in Technische Informatik, Freie University, [1] The TCP/IP Guide - TCP/IP Routing Informa- Berlin Germany, 2006. tion Protocol (RIP, RIP-2 and RIPng). [12] Ch. Steigner, H. Dickel, and T. Keupen. RIP- [2] M. Abolhasan, B. Hagelstein, and J.C.P. Wang. MTI: A New Way to Cope with Routing Loops. Real-world performance of current proactive Seventh International Conference on Network- multi-hop mesh protocols. In Communications, ing (icn 2008), pages 626–632, April 2008. 2009. APCC 2009. 15th Asia-Pacific Conference [13] Wikipedia. Distance-vector routing protocol — on, pages 44–47. IEEE, 2010. Wikipedia, the free encyclopedia, 2010. [Online; [3] R. Albrightson, JJ Garcia-Luna-Aceves, and accessed 1-Dec-2010]. J. Boyle. EIGRP-a fast routing protocol based [14] Wikipedia. Enhanced interior gateway routing on distance vectors. In Proc. Networld/Interop, protocol — Wikipedia, the free encyclopedia, volume 94, 1994. 2010. [Online; accessed 22-Nov-2010]. [4] F Bohdanowicz, H Dickel, and C Steigner. Avoidance of Routing Loops. Inst. f¨ur Infor- matik, 2009.

[5] T. Clausen, P. Jacquet, C. Adjih, A. Laouiti, P. Minet, P. Muhlethaler, A. Qayyum, and L. Viennot. Optimized link state routing pro- tocol (OLSR). 2003.

[6] JJ Garcia-Lunes-Aceves. Loop-free routing us- ing diffusing computations. IEEE/ACM Trans- actions on Networking (TON), 1(1):130–141, 1993.

[7] Y Hu. SEAD: secure efficient distance vector routing for mobile wireless ad hoc networks. Ad Hoc Networks, 1(1):175–192, July 2003.

[8] D. Murray, M. Dixon, and T. Koziniec. An Ex- perimental Comparison of Routing Protocols in Multi Hop Ad Hoc Networks.

[9] C Perkins and E Belding-Royer. RFC3561: Ad hoc on-demand distance vector (AODV) rout- ing. Internet RFCs, pages 1–38, 2003.

[10] C.E. Perkins and P. Bhagwat. Highly dynamic destination-sequenced distance-vector routing (DSDV) for mobile computers. ACM SIGCOMM Computer Communication Review, 24(4):234–244, 1994.

15