Vous êtes sur la page 1sur 4

CMPT376

Assignment 4: Describing a process


Naoya Makino
nmakino@sfu.ca
301117541

Routing Algorithm Processes: Distance Vector Algorithms


and Count to Infinity Problem

When you send messages from your computer to another, have you ever
wondered how these messages are transmitted? Routers decide how and where to
send packets in the least cost way. Routers need to know some information about
the networks in order to decide which route they should take the packets. They
need to have some way to collect information about the networks. Routing
algorithms are about how routers choose a path for each packet. There are two ways
of routing algorithms: global and decentralized. When it is global, all routers have
complete information about networks. That is, each router knows all link costs; each
router is connected by a link, and each link has a cost or weight associated with it. In
a global case, it uses link state algorithms; given that link costs are known to all
nodes, it computes the least cost paths from one node to all other nodes. The most
common algorithm used in link state algorithms is Dijkstras algorithm which
computes the least cost path from a source to a destination given that all link costs
are known to all nodes. In contrast to global, a decentralized network, no routers
have complete topology; each router knows physically connected neighbors with its
link cost information, but no one has a complete image of the networks. It exchanges
information with its neighbors; distance vector algorithms are used in this case.
Another consideration regarding routing algorithms is whether a network is static
or dynamic; static means that weights of a link change slowly over time. Dynamic
networks, on the other hand, change more quickly; it therefore updates its routing
information periodically in response to a link cost changes.

Distance Vector Algorithm


Considering a case of a decentralized and dynamic network, it uses distance
vector algorithm (DV). In order to calculate the least cost path, DV uses Bellman-
Ford Equation, which is
Dx(y) := cost of the least-cost path from x to y
Then Dx(y) = min{C(x,v)+ Dv(y)} where min is taken over all neighbors v of x.
As an example, let’s consider
the following case:
CMPT376
Assignment 4: Describing a process
Naoya Makino
nmakino@sfu.ca
301117541

[1]. Bellman-Ford Equation says that:


Da(d) = min{C(a,b)+Db(d), C(a,c)+Dc(d)} = min{23+5,3+7} = 10
In DV algorithm, each node maintains the following information:
Node x knows cost to each neighbor x: C(x,v)
Node x maintains distance vector Dx= [Dx(y): y є N ]
Node x also maintains its neighbors' distance vectors
For each neighbor v, x maintains Dv = [Dv(y): y є N ]
From time to time, each node sends its own distance vector estimate to neighbors.
In a dynamic case, it follows these steps to do updates
1. Node detects local link cost change
2. Updates routing information, recalculating distance vector
3. If DV estimate changes, then notify its neighbors
The following diagram describes how each node distributes information about its
neighbors:
Node A table cost cost
A B C A B C A B C
A 0 3 23 A 0 3 5 A 0 3 5
from B ∞ ∞ ∞ B 3 0 2
B 3 0 2
C ∞ ∞ ∞ C 23 2 0 C 5 2 0
Node B table
A B C A B C A B C
A ∞ ∞ ∞
A 0 3 23 A 0 3 5
from B 3 0 2 B 3 0 2 B 3 0 2
C ∞ ∞ ∞
C 23 2 0 C 5 2 0
Node C table
A B C A B C A B C
A ∞ ∞ ∞ A 0 3 23 A 0 3 5
from B ∞ ∞ ∞ B 3 0 2 B 3 0 2
C 23 2 0 C 5 2 0 C 5 2 0

time
A
23 3

C B
2
CMPT376
Assignment 4: Describing a process
Naoya Makino
nmakino@sfu.ca
301117541

When a node A receives new DV estimates from its neighbors, it updates its own DV
using Bellman-Ford Equation. From the above example, when node A is informed
that B can get to C with cost 2, A updates it own cost to C to 5 as it is cheaper for A to
go through B and C (cost 5) than directly go to C (cost 23).

Count To Infinity Problem


One of the most important problems in DV is called “count to infinity” problem.
For example, looking at the following figure, A goes through B-C-D to reach an outer
network with cost 3, but D to the next router link is broken.

Then D erroneously switches to C, increasing its cost to C’s + 1 = 3. C’s path cost is
now D’s + 1 = 4. A and B have not realized what happened yet. C’s path cost is still 4.
B’s and D’s costs are now C’s + 1 = 5. C’s path cost is now D’s + 1 = 6. This cycle
repeats while “count to infinity”. Packets get caught between C and D loop.
B C D
1 2 3
5 4 5
7 6 7
… … …
∞ ∞ ∞

Sprit-horizon with poison reverse method is one way to solve this problem. It
indicates to other routers that this route is no longer reachable and should be
removed from a path. It prevents a loop by sending updates with unreachable hop
counts – a number of steps from one router to the destination – back to senders (16
hops are the infinite distance) whenever it detects an unreachable route. Other
protocols, such as RIP (Routing Information Protocol), use a maximum hop count to
determine a loop. It keeps track of a hop count number while exchanging a packet
from a router to another, incrementing it each time going through routers. If it
reaches the maximum number of hop count, it is considered as unreachable.
CMPT376
Assignment 4: Describing a process
Naoya Makino
nmakino@sfu.ca
301117541

Distance Vector algorithm is widely used in packets-switched networks, so


this algorithm is crucial in order to understand the Internet networking. As we are
increasing the demand for data services and high-speed Internet, it is raising the
importance of more efficient routing algorithms. It is important to be aware of these
technologies, and I am looking forward to seeing more to come up in this field.

Reference:
[1] “Networkabcd.svg” Wikimedia Commons. 2010. Wikimedia Foundation, Inc. April
23, 2010 <http://commons.wikimedia.org/wiki/File:Networkabcd.svg>

Vous aimerez peut-être aussi