Sie sind auf Seite 1von 22

Avoiding Counting To Infinity In Distance Vector Routing

Andreas Schmid (andreas.schmid@sdm.de) and Christoph Steigner


(steigner@uni-koblenz.de)
University Koblenz-Landau, Institute for Computer Science,
Rheinau 1, 56075 Koblenz, Germany

Abstract. The Routing Information Protocol (RIP) may introduce misleading


routing information into the routing table, due to network topology changes such as
link or router failures. This is known as the counting to infinity problem. In the past,
the distance metric had to be below 16 hops, in order to keep this counting within
reasonable limits. In this paper a more elaborate approach is presented in order
to recognize those router interfaces, which might have received misleading routing
messages. This is accomplished by evaluating routing updates more carefully than is
done by the well known split horizon approach. This new approach gets by without
any additional message exchange between the RIP-protocol partners. In contrast to
other approaches, the router interfaces are examined in pairs to determine if a loop
exists between them. The algorithm locally extracts all the information it needs from
the normal update messages that are exchanged between RIP neighbors and is thus
executed in constant time. Only some minor calculations have to be carried out to
gain the knowledge that is necessary to recognize those interfaces which may have
received misleading routing information. Hence, this new distance vector routing
without counting to infinity can be used in complex networking environments.

Keywords: Routing Information Protocol, Internet, Protocol Design, Counting to


Infinity

1. INTRODUCTION

The major advantages of distance vector routing (DVR) are minimal


exchanges of routing messages, minimal administration, and minimal
memory and processing requirements. DVR is therefore still used in
spite of its known weakness. Namely, that it may suffer severely from
network component failures due to the counting to infinity approach.
This paper analyzes the preconditions of routing loops. It examines
the situations which are prone to routing loops, shows how to avoid
routing loops and proves the acquired solution. Simulation results are
presented to give a comparative insight into the behavior of conven-
tional RIP and the newly developed Routing Information Protocol with
Minimal Topology Information (RIP-MTI).


c 2001 Kluwer Academic Publishers. Printed in the Netherlands.

ripmti.tex; 5/09/2001; 17:28; p.1


2 A. Schmid, Ch. Steigner

2. DISTANCE VECTOR ROUTING

DVR protocols exchange very little information among neighbor routers.


These route advertisements consist of destination and metric, where the
metric is an integer number corresponding to the computed distance
to the specified destination network. In this paper only one destina-
tion network, called d, is regarded at a time. This convention is used
throughout (see fig.1).
Routing is understood as the process of providing routing informa-
tion for routing tables, whereas forwarding is the delivering of packets
by using the routing table information. In most DVR protocols the
routing table contains the cost of the shortest path and the next router
address in the path to the destination network. Routers directly con-
nected to destination d send this initial distance to their neighbors.
Other routers compute the shortest path to d as the minimum of the
sum of the information received from their neighbors and the link costs
to these neighbors.
Within RIP, all routers know in the initial state the destination
addresses to their neighboring networks and send the appertaining
network addresses to their neighboring routers with a metric of 1. These
routers themselves send the received network address with metric 2 to
their neighboring routers. This process is repeated until all routers
within the routing domain1 know all destination addresses and are
provided with reachability information for all destinations within the
routing domain.
In order to calculate the shortest link to the destination network,
only the smallest metric is stored in the routing tables. Routers send
1
region of the Internet under the administrative control of a single entity

network
d destination network
1,2,3... distance metrics
d,2 router with distance 2 to the destination network d
source router with distance 1 to the destination network d
d,1

d,1 sending router

d,2 route advertisement

forwarding direction
Figure 1. Legend for the network/router diagrams

ripmti.tex; 5/09/2001; 17:28; p.2


Avoiding Counting To Infinity In Distance Vector Routing 3

Figure 2. Building up complete routing information for destination d cold start

routing updates periodically (every 30 seconds) reporting all the routes


learned from their neighbor routers. If a route is not advertised for three
minutes or more, this route is marked as unreachable by assigning the
infinity metric (16) to it. If, however, other routers are still advertising
a route to this destination, the best among them is selected. Fig. 2
shows an example of how routers exchange routing updates.
What are the disadvantages of RIP? RIP is not always able to pro-
duce the right routing table entries: it reacts quickly to apparently good
(i.e. shorter routes) but wrong news, and very slowly to bad (i.e. longer
routes) but correct news [13]. The main problem is that routing loops
can arise with reachability information circling inside them (fig.3).
How do routing loops arise? As soon as a router recognizes that a cer-
tain destination network is unreachable, it propagates this information
throughout the system via neighbor to neighbor propagation. During
this period, one of the routers inside a loop, which has not yet received
the network unreachable information, sends a wrong but apparently
better than infinity update message to its neighboring routers. Because
this pretended good news is considered more valuable than bad news
all routers will accept and propagate this pseudo good news, which may
finally lead to counting to infinity if this pseudo good news is propagated
further inside the routing loop.
The lifetime of this misleading information in routing tables can be
limited if a low maximum value for the longest path in an autonomous
system is given [2]. RIP thus only allows 15 routers within one route

ripmti.tex; 5/09/2001; 17:28; p.3


4 A. Schmid, Ch. Steigner

Figure 3. Routing loop after destination d becomes unreachable

leading to any destination. If the number of routers on a certain path


exceeds 15, the advertised destination is considered to be unreachable.
In fig.3, three routers i, r1 and r2 are connecting four networks.
Fig.2 shows the same system, however in a state where no counting
to infinity has occurred, due to the fact that the reachability to all
networks is given at a distance below infinity. In fig.3, it is shown what
happens if network d suddenly becomes unreachable. Unfortunately,
the routers’ reactions contradict one another. Router i sends this bad
but right news to the other routers (fig.3b), r2 advertises that a route to
network d still exists with a metric of 2 which is a good but wrong news.
Router r1 accepts this route to destination d, because its metric (2) is
smaller than infinity and assumes that this route really exits. Router
r1 assigns 3 (2 + 1) as the cost and r2 as the direction to network d.
Router r1 sends this information to router i in fig.3(c).
Router i wrongly assumes that the only possible route to reach the
destination d is via r1. Router i again wrongly advertises the new route
to router r2 in fig.3(d). The metric for destination d in the routing table
of router r2 is seen as not up-to-date, therefore, router r2 wrongly
corrects the metric for this route to 5 (not depicted in fig.3). This
procedure goes on within this routing loop until the metric reaches
infinity in all routing tables, which makes RIP very inefficient in this
case. By applying some heuristics, which will be explained below, this
inefficiency of RIP can be overcome to a certain degree.

ripmti.tex; 5/09/2001; 17:28; p.4


Avoiding Counting To Infinity In Distance Vector Routing 5

2.1. Improving convergence

To improve the convergence of RIP, four concepts have been suggested:

− triggered updates

− split horizon

− poison reverse

− path hold-down

These concepts have been integrated into different RIP implementa-


tions, but they do not solve the counting to infinity problem completely.

Triggered updates are sent immediately after any change of a rout-


ing table entry. This was proposed to spread changes of topology
faster than before. Routers do not have to wait until the next regu-
lar update. The main disadvantage of triggered update is that the
routing traffic rises strongly after a failure of a network component.
To reduce this effect, routers are forced to wait a random length of
time before they send a triggered update. While delaying triggered
updates reduces routing traffic it increases the risk that the new
routing information gets overwritten before the router sends the
information to its neighbors.

Split horizon avoids some of the incorrect routing advertisements: A


router does not send outgoing route advertisements back to the
router from which they were learned. This approach reduces the
probability of routing loops. It does not, however, avoid them.
In any routing loop, there are destination networks, which are
advertised with the same metric via two or more interfaces of a
router. If a router decides to accept one of its neighbor’s routes as
the best route, and sends this wrong but perceived good routing
update to other routers, a routing loop may be created.

Poison reverse increases the effect of split horizon by using a slightly


modified rule of split horizon: A router sends outgoing route ad-
vertisements back to the interface from which it has learned this
route with a metric set to infinity. This procedure reduces the
probability of routing loops, but it does not avoid routing loops
totally.

Path hold-down establishes a period of time (typically 60 sec.) dur-


ing which a router will ignore new routing information about a
given network, once the router has learned that this network is

ripmti.tex; 5/09/2001; 17:28; p.5


6 A. Schmid, Ch. Steigner

unreachable, i.e. has been assigned the metric infinity. According


to RFC 1009 [1, p24], a hold-down period is chosen long enough
to allow for the unreachable status to propagate to all routers in
the autonomous system (routing domain). Path hold-down ignores
the existence of possible reachabilities in case of routing failure.
Therefore, this is the slowest approach in the group, but it should
avoid most routing loops. The earlier releases of IGRP used a path
hold-down technique, the latest releases use poison reverse only [8,
p 117].

2.2. Other approaches

One way of avoiding the counting to infinity problem is to recognize


routing loops by gaining some knowledge about the path back to the
source router. Cheng, et. al. [2] and Rajapopalan and Faiman [7] sug-
gested appending the router nearest to the destination (which is called
the head of path) to the routing update. With this additional informa-
tion, it is possible to trace back the path from the destination to the
source router. This back-tracing allows the recognition of routing loops
within the path.
Including the router-label nearest to the neighbor router in the
update message in order to obtain a three node path knowledge was
proposed by Shin and Chen [12] to avoid two-node looping. This al-
gorithm can be extended to a k-th order algorithm which avoids all
loops with more than k hops. However, this leads to an increase in the
size of update messages and the local memory requirement increases
in proportion to k. A DVR protocol developed for routing between
routing domains, called the Border Gateway Protocol (BGP), specifies
the entire path from source to destination in the update message.
Due to the fact that a routing loop needs certain timing conditions
to develop, routing loops can be avoided by coordinating the exchange
of routing information. Jaffe and Moss [5] showed that no routing
loops can occur in DVR algorithms after a link addition or a link-
cost decrease. Their protocol requires internodal coordination if link
costs increase or resources fail in the network.
Garcia-Luna-Aceves proposed the Diffusing Update Algorithm
(DUAL) [3,4], where the routers coordinate themselves mutually by
confirmation messages. With these messages, a router can find out if
the routing update procedure it has initiated to all its neighbors has
terminated already. If not, the router is blocked: it accepts no further
update messages, thereby avoiding the creation of routing loops. The
implementation of this method is extensive. It cannot be carried out
as an addon to RIP. According to Garcia-Luna-Aceves [2,4] there are

ripmti.tex; 5/09/2001; 17:28; p.6


Avoiding Counting To Infinity In Distance Vector Routing 7

three feasibility conditions, whereby each one guarantees freedom of


routing loops (Distance Increase Condition DIC, Current Successor
condition CSS, and Source router Node Condition SNC). It should
be noted that these conditions guarantee the absence of routing loops,
however, they are not able to calculate shortest paths. DUAL is used
by Cisco under the name EIGRP (Extended Interior Gateway Routing
Protocol). A coordinated diffusing computation is initiated only when
distances increase.
In summary, it can be said that the alienation to RIP in the Internet
community can be traced back to the unsolved problems with counting
to infinity and the resulting slow convergence of RIP. All the aforemen-
tioned solutions require the extension of routing messages in order
to function properly.

3. THE RIP-MTI APPROACH2

In order to avoid routing loops locally without any change of RIP


messages, RIP’s behavior of forgetting all but the shortest actual path
is changed. Minimal Topology Information (MTI) can be derived from
the information provided by the other paths. The RIP-MTI approach
is based on two simple ideas:
− router-local collection of all minimal loops between the inter-
faces of single routers
− router-local rejection of source loops by the conditions given
later in the theorems 4, 5 and 6
Source loops are loops which pass through the first router more than
once on their way through the networks and routers (see fig.5).
In two additional local tables on each router, the existence of loops
between a pair of interfaces and the network environment are stored. A
loop is recognized by examining reachability information for the same
destination network, found on two different router interfaces. Thus,
a loop can be recognized by two routing updates which contain the
same destination network and arrive over different interfaces of the
same router. Important: the loop information stored consists of the
beginning and the ending router interface and the distance metric for
the loop. This additional loop information is exactly what is needed
to be able to decide whether a destination network d can be reached
through more than one interface. This is the fundamental idea of the
RIP-MTI approach.
2
see [9,10,11]

ripmti.tex; 5/09/2001; 17:28; p.7


8 A. Schmid, Ch. Steigner

The RIP-MTI algorithm also makes use of the other concepts for
suppressing counting to infinity. RIP-MTI routers must use split hori-
zon and triggered updates, may use poison reverse, and of course must
use MTI, which can be seen as a very fast conditional path hold
down for wrong alternative routing updates. The further explanation
is based on link costs of 1 – it will be shown in section 3.5 how a link
metric with arbitrary costs can be used as well.
Two cases of loop appearances may be considered:

First case: loops may be used to offer alternative reachabilites to a


destination network if they do not pass any router more than once
and if within the loop one path to the destination network d fails.

Second case: loops may be reminders for wrong reachability informa-


tion if they pass a router more than once. This is referred to as
source loop later on.

Fig.4 depicts an example for these loop types:

First case loops: router i accepts (fig.4a) the routing update from
interface A concerning network d, because it detects no source
loop (the same applies to interface D)

Second case loops: router i rejects (fig.4f) an update from interface


B concerning network d, because it detects a source loop (the
same applies to interface C)

3.1. Definitions

Definition 1. (Path): A path from router i = r1 to subnet d = sL is


abbreviated as P i,d and is a sequence of routers and subnets:

P i,d = (r1 = i, s1 , r2 , s2 , ..., rL , sL = d)

L is the total length of the path. A path from i to d over interface A


is abbreviated as PAi,d and a path that returns back to router i over
i,d,i
interface B as PA,B .

Definition 2. (Route metric3 ): A route metric mi,d


A from router i
i,d
to subnet d over interface A is defined as mA = L, when a path

PAi,d = (r1 = i, s1 = A, r2 , ..., sL = d)


3
a metric is always associated to a certain path

ripmti.tex; 5/09/2001; 17:28; p.8


Avoiding Counting To Infinity In Distance Vector Routing 9
d, 3 d, 3

r2 r1 r2 r1 r2 r1

d, 2 d, 2
B C B C B C
i d, 2 i d, 2 i
A D A D A D
accepted
first
d, 1 d, -
case
d d d
d, 1 d, 1 d, 1 d, 1 d, - d, 1

r3 r4 r3 r4 r3 r4

(a) (b) (c)

d, 3
d, 3 d, 3 d, 3 d, - d, 3 d, 4
r2 r1 r2 r1 r2 second r1
case
d, 4
d, -
B C B C B C
rejected
d, - i d, - i d, - i
A D A D A D

d d d
d, - d, 1 d, - d, 1 d, - d, 1

r3 r4 r3 r4 r3 r4

(d) (e) (f)

Figure 4. Routing loop avoided after destination d becomes unreachable

exists. A routing update < mi,d


A = 1 > from router i received by a
neighbor router r2 over interface A shows a route metric of mi,d
A =
r2 ,d
mA + 1.

It should be pointed out, that a path/route metric is never static. A


path/route metric cannot be assembled out of the routing information
stored in the routing tables of the routers at any particular point in
time. Time plays a very important role, because it always takes some
time for a data packet to traverse a given path: during this time, the
routing table entries can change because of routing updates the routers
may have received in the meantime. The result is, that the path the
message traverses can contain loops, but this is not the case when
looking at the routing tables at any single point in time.
A composite back route between the interfaces A and B of a router
via destination d is a necessary criterion for a loop between interfaces
A and B. In an acyclic network topology there are no composite back
routes.

Definition 3. (Composite back route metric): A composite back


route metric mi,d,i
A,B between two interfaces A and B of router i via a
destination d exists, if the destination d is advertised as being reach-

ripmti.tex; 5/09/2001; 17:28; p.9


10 A. Schmid, Ch. Steigner

able via interface A and via interface B. Then these two paths can be
combined into one composite path:
i,d,i
PA,B = (r1 = i, A, ..., d, ..., sL = B, rL+1 = i)

Because a composite back route metric is composed of two route metrics


mi,d i,d i,d,i
A and mB , the composite back route metric mA,B corresponds to
the back route length (L) and can be calculated as follows:

mi,d,i i,d i,d


A,B = mA + mB − 1 = L

A routing loop is a necessary condition for the counting to infinity


behavior.

Definition 4. (Routing loop metric): A routing loop metric is a


special route metric mi,d
A (or a special composite back route metric
i,d,i
mA,B ) which passes through any router only once in its corresponding
path.

The source loop is a key concept of this work.

Definition 5. (Source loop metric): A route metric mi,dA (or a com-


posite back route metric mi,d,i
A,B ) is a source loop metric if it passes
through the source router i (which receives the route advertisements)
more than once.

The following definition of a cycle is temporary in the sense that it


specifies a cycle but can be reduced later to the minimal cycle.

Definition 6. (Cycle metric): A cycle metric cyci,d,i


A,B between two
interfaces A and B via the destination d is a special composite back
route metric mi,d,i
A,B between A and B via the destination d, whereby
the source router must not be traversed along the route. (In fig.4 there
is a cycle between interface B and C.)

It is possible to define the smallest metric of a loop independent


of the destination d as a representative of all loops between a pair of
interfaces:

Definition 7. (Minimal cycle metric): The minimal cycle metric


between two interfaces A and B is

mincyciA,B = min{cyci,d,i
A,B for all destinations d}

ripmti.tex; 5/09/2001; 17:28; p.10


Avoiding Counting To Infinity In Distance Vector Routing 11

The notion of the minimal return route metric via an interface A is


important for further explanations (refer to the corollary theorem 6).

Definition 8. (Minimal return route metric): The minimal re-


turn route metric via an interface A is

minmiA = min{mincyciA,S for all interfaces S of i}

It is crucial for this definition that cycles are the base for minimal
return routes. Imagine the minimal return route to be the shortest
possible route of a conventional message leaving the source router i via
the interface A and returning after minmA forwardings to the source
router i.

3.2. Avoiding source loops

The existence of two distinct routes from one router to the same des-
tination
− a simple direct route and
− a composite route
is a necessary, but not sufficient criterion for a cycle.
Therefore all composite back routes with a source loop are shown
i,d,i
in one table (fig.5). The source loop corresponds to a path PA,B which
passes through the source router i two times:
− it leaves router i over interface A;
− it returns to router i via an arbitrary interface (A,B or any)
− it leaves the router i again via an arbitrary interface (A,B or any)
and
− it finally returns to router i via interface B
A source loop can return and leave a router via nine different network
combinations, because there are three interface possibilities to return
to and leave from the router, thus 32 network combinations are pos-
sible at all. Fig.5 provides a complete listing of all source loops using a
rubber band tightly connected to the interfaces A and B, entering and
leaving the router using all possible interface combinations. In fig.5, the
route mi,d
A was chosen to contain the source loop. For all nine cases the
path leaves router i via interface A first and finally enters router i via
interface B at the end. The nine combinations are constituted by the
the arbitrary choice of the:

ripmti.tex; 5/09/2001; 17:28; p.11


12 A. Schmid, Ch. Steigner

− first return to the router between the interfaces A, B, or any


− second leave from the router between the interfaces A, B, or any
The source loops can be differentiated by the following features of
their paths:
ESH (External Split Horizon): The path leaves router i for the
first time and returns to it via the same interface.
ISH (Internal Split Horizon): The path enters router i for the first
time and leaves it for the second time via the same interface.
Y combination: The path leaves router i for the second time and
enters it in the end via the same interface.
X combination: The interfaces via which the path leaves router i and
returns to it for the first time are different, and the same for the
interfaces via which the path leaves and returns to router i for the
second time.
This differentiation has been applied to fig.5. ESH and ISH can be
avoided by applying the split horizon rule, which will be proven later
on.

THEOREM 1. If source loops are avoided by every router locally,


routing loops do not occur globally.

Proof by contradiction: let the path P i,d contain a routing loop.


Routing loops contain at least one router rx which is traversed twice:
P i,d = (r1 = i, s1 , ..., rx , sx , ..., ry = rx , ..., rl , sl = d)
From the viewpoint of router rx , the second traversal of rx in this path
is a source loop.
P rx ,d = (rx , sx , ..., ry = rx , sy , ..., rl , sl = d)
With router rx avoiding this source loop, the source loop does not exist
in its routing tables and is not propagated to other routers rx−1 . The
result is that path P i,d cannot be a routing loop in which router rx is
passed more than once.
In order to show the interrelation between source loops (SL), routing
loops (L) and counting to infinity (C) the following conditions hold:
¬∃SL ⇒ ¬∃L
⇒ ¬∃SL ⇒ ¬∃C
¬∃L ⇒ ¬∃C

ripmti.tex; 5/09/2001; 17:28; p.12


Avoiding Counting To Infinity In Distance Vector Routing 13

"first return"
A-A A-B A - any
"second leave"

B-A B-B B - any

any - A any - B any - any

a more comprehensive example


network of the any-any source loop

router

any-Interface

network
A B
source
any-Interface router

router

network
network d

Figure 5. A enumeration of all nine possible source loops within a composite back
route

ripmti.tex; 5/09/2001; 17:28; p.13


14 A. Schmid, Ch. Steigner

The first condition is stated by theorem 1, which has been proven al-
ready. The second condition can be proven by the following observation:
Counting to infinity behavior (C) can be defined as: C is initiated, if
reachability information of a destination subnetwork d runs repeatedly
inside a cycle until the advertised distance d reaches the predefined
maximum value. The route to d contains a loop when it enters the
cycle for the second time. Hence, if routing loops are avoided, there is
no counting to infinity behavior.

3.2.1. Impossible composite back routes


If the split horizon rule is used by the RIP algorithm it can be shown,
that five out of nine source loops do not have to be considered, because
they do not happen: the entries labeled by ISH (internal split horizon)
and ESH (external split horizon) in fig.5.

THEOREM 2. (Internal Split Horizon, ISH):


If the split horizon rule is used, the source loops marked with ISH never
occur because they are no composite back route metrics mi,d,iA,B .

Proof: Two (see fig.5) composite back route metrics mi,d,i


A,B contain
a route metric mi,d
A with the corresponding path

PAi,d = (i, ..., A, i, A, ..., d) or PAi,d = (i, ..., B, i, B, ..., d)

That means that the interface A (or B) could serve as in and out
interface in the path PAi,d . These composite back routes are avoided by
the source router i which applies the split horizon rule (A router
does not send outgoing routing updates back to the router from which
it has learned this route). In a path

P i,d = (r1 = i, s1 , r2 , s2 , ..., rl , sl = d),

the condition sx 6= sx+1 holds for any router rx (1 ≤ x ≤ l − 1).

THEOREM 3. (External Split Horizon, ESH):


If the split horizon rule is used, the source loops marked with ESH never
occur because they are no composite back route metrics mi,d,i A,B .

Proof: Three (see fig.5) composite back route metrics mi,d,i


A,B contain
a route metric mi,d
A with the corresponding path

PAi,d = (r1 = i, s1 = A, r2 ∈ N R(A), . . . ,


rx−1 ∈ N R(A), sx−1 = A, rx = i, . . . , d)

ripmti.tex; 5/09/2001; 17:28; p.14


Avoiding Counting To Infinity In Distance Vector Routing 15

Figure 6. Example of a composite back route with an X combination

with N R(A) = {neighbor routers of interface A}. These composite back


routes are avoided by the neighbor routers applying the split hori-
zon rule. They do not send those routes, which they have learned from
router i, back to router i, because router i compared with the neighbor
routers holds the shortest metric to destination d, and therefore router
i always is the next router for destination d in the routing tables of the
neighbor routers.

3.2.2. Avoiding X combinations


Fig.6 gives an example for a composite back route with an X combina-
tion. In this case there is a composite back route between interfaces A
and B.
From the viewpoint of router i the part of the routing domain includ-
ing interface A and the part of the routing domain including interface
B are separate. To get from the one part of the routing domain to
the other, the source router i has to be traversed. It would not make
any sense to use a route via interface A as an alternative route to
destination d reachable via interface B. X combinations are constructed
by concatenating two different cycles, in this case the upper and lower
cycle. The X combination would leave the router via interface A, take a
return route back to the source router i, enter the router via a interface
different to A, leave the source router once again via another interface
other than A or B and at last return via interface B. X combinations
can be avoided by making sure that the metric of the route combination
is less than the sum of the two minimal return routes via the first (A)
and the second interface (B).

THEOREM 4. Let mi,d,i


A,B be a composite back route metric.
If minmiA + minmiB > mi,d,i
A,B then the composite back route metric
mi,d,i
A,B does not contain an X combination.

ripmti.tex; 5/09/2001; 17:28; p.15


16 A. Schmid, Ch. Steigner

r1 r2

Figure 7. Example of a composite back route with an Y combination

Proof: A composite back route metric mi,d,i


A,B with an X combination
has a path
i,d,i
PA,B = (i, A, ..., s1 6= A, i, s2 6= B, ..., d, ..., B, i)
The first part of this path, from the first occurrence of i to the second
occurrence of i, is a return route via interface A. The second part of the
path, from the second occurrence of i to the third occurrence of i is a
return route via interface B. Therefore, the shortest X combination is
the sum of the minimal return routes via interface A and B (minmiA +
minmiB ).
If the composite back route metric mi,d,i
A,B is shorter than the shortest
possible X combination, then it cannot contain an X combination.

3.2.3. Avoiding Y combinations


Fig.7 shows an example of a composite back route with a Y combina-
tion. The problem with Y combinations is as follows. Router i knows the
route to destination d via interface B, because it is directly connected
to i. If router r1 learns from r2 that it can reach d via r2, r1 will send
an update to router i containing < mrA1 ,d = 3 >.
Router i then has to decide whether d can be reached via interface A
too. The route via interface B is correct, because it is a direct connec-
tion to destination d. The route starting from interface A, returning
for the first time at any interface of router i and leaving the router
the second time via interface B is not correct, because it contains a
source loop.
The minimal return route via interface A advertising the alternative
route with the higher metric plays the crucial role here. Y combinations
can be avoided by applying the following condition:

THEOREM 5. Let mi,d,i


A,B be a composite back route metric combining
the two route advertisements mi,d i,d i,d i,d
A and mB ; mA ≥ mB .

ripmti.tex; 5/09/2001; 17:28; p.16


Avoiding Counting To Infinity In Distance Vector Routing 17

If minmiA > mi,d i,d


A − mB , then the composite back route does not
contain a Y combination.

Proof: The longer route mi,d i,d,i i,d


A within mA,B belongs to the path PA =
(i, A, ..., i, B, ..., d). The first part of this path from the first to the
second occurrence of i is a return route via interface A and the second
part is the corresponding path of mi,d i,d
B . Therefore mA is the sum of any
return route via interface A and mi,d i,d
B . If mA is smaller than the sum
of the minimal return route via interface A and mi,d B :

mi,d i i,d
A < minmA + mB

then mi,d i,d,i


A does not contain a return route via A and mA,B is not a
source loop.

3.3. The RIP-MTI algorithm

In an acyclic routing domain it is not possible for any router to reach


an arbitrary destination by two different routes over two different in-
terfaces. If a router has a choice between different interfaces to a desti-
nation d, the routing domain must be cyclic, with the result that after
the failure of a route to destination d it can possibly be replaced by an
alternative route. But after such a failure the router must not accept
any route to destination d as an alternative route: if the route is a
member of a source loop this may lead to counting to infinity.
With theorem 6 it is possible to decide whether two routes con-
catenated to build a composite back route form a source loop or a
cycle.

THEOREM 6. (Corollary):
Let mi,d,i i,d i,d
A,B be a composite back route metric and mA ≥ mB . All routers
use the split horizon rule. If
a) minmiA + minmiB > mi,d,iA,B (to avoid X combinations) and
b) minmiA > mi,d i,d
A − mB (to avoid Y combinations),
then mi,d,i i,d,i
A,B is a cycle cycA,B and therefore neither a source loop nor a
routing loop and no counting to infinity can arise.

3.4. Calculating minimal return routes

Up to this point, the minimal return minmiA route via an interface A


was assumed to be given. By looking at the construction of the X and
Y combination composite back routes in detail it can be seen that in

ripmti.tex; 5/09/2001; 17:28; p.17


18 A. Schmid, Ch. Steigner

most of the cases it is possible to use the composite back route metric
mi,d,i
A,B as upper bound of minmA and minmB . Only in the case of a
Y combination can the composite back route metric not be used as an
upper bound of minmB where mi,d i,d
A ≥ mB .

3.5. Overcoming minimum hop routing

The problem with using a non-minimum hop metric is, that the formula
for calculating composite back routes (mi,d,i i,d i,d
A,B = mA + mB − 1 = L)
can be used for minimum hop metrics only. One way to overcome this
failure is to extend the routing update message and the routing tables,
with the hop count metric as additional information besides the actual
metric. The RIP-MTI algorithm is executed with this hop count met-
ric only calculating minimal cycles and minimal return routes using
the previously described method. In this case, extending the routing
protocol cannot be avoided.

4. SIMULATING RIP-MTI

4.1. Simulation environment

To simulate RIP-MTI a Java Applet was developed that allows the


graphical building of models of networks, and enables switching be-
tween the original RIP and the new RIP-MTI algorithm [6]. During
simulation connections between interfaces and networks can be cut,
which makes it possible to provoke a counting to infinity situation.
The temporal order in which the routers send their periodic routing
updates is crucial for the emergence of counting to infinity. Hence the
simulation program allows timing to be influenced.
For analysis two different models were chosen (see fig.8) representing
the models in fig.7 and fig.6.

4.2. Simulation results

Corresponding to the two simulated models shown in fig.8 every possi-


ble temporal order was simulated with small and large periods between
the routers leaving out those orders symmetrically equivalent to already
simulated orders.
There were 86 counting to infinity situations in total when using the
original RIP algorithm (36 in model 1 and 50 in model 2). All of them
were avoided when switching to the RIP-MTI algorithm resulting in
much faster convergence.

ripmti.tex; 5/09/2001; 17:28; p.18


Avoiding Counting To Infinity In Distance Vector Routing 19
router 1 router 2
2 192.100.10.0 1

1 2

router 1 router 2
192.100.0.0 192.100.20.0
2 192.100.10.0 1

1 2

router 3
1 2
192.100.0.0 192.100.20.0
3 4 192.100.60.0

router 3
192.100.30.0 192.100.40.0
1 2

1 2

192.100.30.0 2 192.100.50.0 1 3

router 4 router 5

Figure 8. Simulating a X and Y combination

700 670
number of routing updates

644 658
638
RIP-MTI
600
RIP
RIP (Infinity=31)
RIP (Infinity=61)
500

400
360
324
300 294 302 304
300

205
200 180 176
153 162
144
100 76 72
48 46 33
18 12 26
0
321 132 45312 54321 12543 13452

router order

Figure 9. RIP-MTI comparative convergence behaviour

Fig.9 shows how many routing updates were needed in the network
in a counting to infinity situation to reach convergence using RIP-MTI
compared to RIP with infinity set to 16, 31 and 61. The numbered
labels on connectors depict two temporary orders in model 1 and four
temporary orders in model 2.
RIP-MTI accelerates convergence by 73 to 83% compared with the
original RIP algorithm. When increasing infinity first to 31 and then to
61 improvements of 85-91% and 92-95% respectively where seen. This is
because an increased value for infinity does not influence convergence in
RIP-MTI. These factors can be transferred to the reduction of network
traffic and to the duration until convergence, because they depend on
the number of routing updates needed.

ripmti.tex; 5/09/2001; 17:28; p.19


20 A. Schmid, Ch. Steigner

5. CONCLUSIONS

This paper showed that source loops are the cause of routing loops,
which are responsible for counting to infinity. Therefore two condi-
tions to avoid source loops were given and proven. These conditions
were integrated into the new RIP-MTI algorithm. RIP-MTI is storing
information about cycles between every pair of local interfaces of a
router, which is a new and unique approach. Finally it has been shown
by simulation that RIP-MTI does exactly what has been proven in
theory: routing loops and counting to infinity behavior are eliminated
resulting in much faster convergence with minimal demand for addi-
tional memory and processing power. With RIP-MTI a new, simple
and robust routing algorithm is given which scales better than other
routing algorithms (OSPF and BGP). This gives rise to develop new
intra- and interdomain routing algorithms.

References

1. R. Braden and J. Postel, Requirements for internet gateways, IETF RFC 1009,
USC/Information Sciences Institute, June 1987
2. C. Cheng, R. Riley, S. P. R. Kumar and J .J. Garcia-Luna-Aceves, A loop-
free extended bellman-ford routing protocol without bouncing effect, in ACM
SIGCOMM Symposium Commun. Arch. and Protocols, pp. 224-236, Austin,
Texas
3. J. J. Garcia-Luna-Aceves, A unified approach to loop-free routing using dis-
tance vectors or link states, in ACM SIGCOMM Symposium Commun. Arch.
and Protocols, pp. 212-223, Austin, Texas, Sept. 1989
4. Garcia-Luna-Aceves (1993), Loop-free routing using diffusing computations,
IEEE/ACM Transactions on Networking 1, No. 1, pp. 130-141
5. J. M. Jaffe and F. M. Moss, A responsive routing algorithm for computer
networks, IEEE Transactions on Communications COM-30, No. 7, pp. 1785-
1762, July 1982
6. O. Kandel, RIP-MTI – Simulation des erweiterten RIP-Algorithmus, Diploma
thesis, University of Koblenz-Landau, Institute for Computer Science,
Rheinau 1, 56075 Koblenz, Germany, July 2000 (German), Java Applet:
http://www.uni-koblenz.de/∼steigner/ripmti/
7. B. Rajagopalan and M. Faiman, A new responsive distributed shortest path
routing algorithm, in ACM SIGCOMM Symposium Commun. Arch. and
Protocols, pp. 237-246, Austin, Texas, Sept. 1989
8. G. C. Sackett and C. Metz, ATM and multiprotocol networking, McGraw-Hill,
1996
9. [9] A. J. Schmid, Solution for the counting to infinity problem of distance
vector routing, Research report 7-98, University of Koblenz-Landau, Institute
for Computer Science, Rheinau 1, 56075 Koblenz, Germany, June 1998, URL
http://www.uni-koblenz.de/fb4/publikationen/gelbereihe/RR-7-98.ps.gz

ripmti.tex; 5/09/2001; 17:28; p.20


Avoiding Counting To Infinity In Distance Vector Routing 21

10. A. J. Schmid, RIP-MTI: Minimum-effort loop-free distance vector routing algo-


rithm, Diploma thesis, University of Koblenz-Landau, Institute for Computer
Science, Rheinau 1, 56075 Koblenz, Germany, March 1999
11. A. J. Schmid and C. Steigner, A solution for the counting to infinity problem of
distance vector routing, Proc. of the Second IASTED International Conference
on Parallel and Distributed Computing and Networks (Brisbane, Queensland,
Australia), December 1998, pp. 471-477
12. K. G. Shin and M.-S. Chen, Performance analysis of distributed routing strate-
gies free of ping-pong-type looping, IEEE Transactions on Computers C-36, No.
2, pp. 870 881, Feb. 1987
13. A. S. Tanenbaum, Computer Networks, Prentice Hall, third edition, 1996

ripmti.tex; 5/09/2001; 17:28; p.21


ripmti.tex; 5/09/2001; 17:28; p.22

Das könnte Ihnen auch gefallen