Routing Algorithm Processes: Distance Vector Algorithms and Count To Infinity Problem
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.
time
A
23 3
C B
2
CMPT376
Assignment 4: Describing a process
Naoya Makino
[email protected]
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).
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
[email protected]
301117541
Reference:
[1] “Networkabcd.svg” Wikimedia Commons. 2010. Wikimedia Foundation, Inc. April
23, 2010 <http://commons.wikimedia.org/wiki/File:Networkabcd.svg>