NetworkLab 1ex
NetworkLab 1ex
that enables them to select routes between any two nodes on a computer network. [1] There are
4 main categories of routing protocols:
•Hybrid (EIGRP)
Distance Vector
The distance vector (DV) protocol is the oldest routing protocol in practice. With distance vector
routes are advertised based upon the following characteristics:
•Distance - How far the destination network is based upon a metric such as hop count.
•Vector - The direction (next-hop router or egress interface) required to get to the destination.
Furthermore, routing updates are sent in full (rather than delta-based updates) and at regular
intervals, resulting in extremely slow convergence times - one of the key downfalls to distance
vector protocols. In addition due to the slow convergence times and "routing by rumour",
distance vector protocols are prone to routing loops.
However, on the flipside, the resource consumption is low compared to link-state, due to not
having to hold the full state of the entire topology.
Link-state
In contrast to distance vector routing, link state routing (OSPF, ISIS) relies on each node
advertising/flooding the state (i.e. delay, bandwidth etc) of their links to every node within the
link state domain. This results in each node building a complete map of the network (shortest
path tree), with itself as the root using the shortest path first algorithm, also known as the
Dijkstra algorithm.
Unlike distance vector link-state neighbours only sends incremental routing updates (LSAs)
rather than a full routing update. Also, these updates are only sent at the point a change in
the network topology occurs, rather than at regular intervals.
Link-state protocols provide extremely low convergence times and, due to each router having a
complete view of the network, aren't prone to the same routing loops seen with DV-based
protocols.
However, due to the computation required for the algorithms to run across the shortest path
trees upon each node, greater resources are consumed compared to that of distance vector,
however, this really isn't a concern with the systems of today.
Path Vector
Path vector (PV) protocols, such as BGP, are used across domains aka autonomous systems. In
a path vector protocol, a router does not just receive the distance vector for a particular
destination from its neighbor; instead, a node receives the distance as well as path
information (aka BGP path attributes), that the node can use to calculate (via the BGP path
selection process) how traffic is routed to the destination AS.
Hybrid
A hybrid routing protocol consists of characteristics from both, link state and distance
vector routing protocols.
For example, EIGRP can be considered a hybrid routing protocol, as it displays characters of
both. As shown below:
Link state routing (LSR) is a routing protocol used in packet-switched networks that
uses a link state database to store information about the network topology. It is
one of the two main types of routing protocols, the other being distance-vector
routing.
The LSR process can be divided into several phases:
1.initialization phase: The first phase is the initialization phase, where each router
in the network learns about its own directly connected links. This information is
then stored in the router’s link state database.
2.flooding phase: The second phase is the flooding phase, where each router floods
its link state information to all other routers in the network. This allows each router
to learn about the entire network topology.
3.path calculation phase: The third phase is the shortest path calculation phase,
where each router uses the link state information to calculate the shortest path to
every other router in the network. This is typically done using Dijkstra’s algorithm.
4.route installation phase: The fourth and final phase is the route installation
phase, where each router installs the calculated shortest paths in its routing table.
This allows the router to forward packets along the optimal path to their
destination.
One of the main benefits of LSR is that it only requires routers to have knowledge
of their directly connected links, as opposed to the entire network topology. This
makes it well-suited for large and complex networks. Additionally, LSR is less prone
to routing loops and can quickly adapt to changes in the network topology.
Link state routing (LSR) is a routing protocol that uses a link state database to
store information about the network topology.
The main features of LSR include:
1.Each router in the network only needs to know about its directly connected links.
This allows for a more scalable solution, as routers do not need to maintain a full
view of the entire network topology.
2.LSR uses a link state database to store information about the network topology.
This database is updated by flooding link state information between routers.
3.LSR uses the shortest path algorithm, such as Dijkstra’s algorithm, to calculate
the shortest path to every other router in the network. This ensures that packets
are always forwarded along the most efficient path.
4.LSR can quickly adapt to changes in the network topology. When a link goes
down or a new link is added, the link state information is updated and the shortest
path is recalculated.
5.LSR is less prone to routing loops, as each router only installs the shortest path
in its routing table.
6.LSR supports multiple equal-cost paths, which allows for load balancing and
redundancy.
Some advantages of the link state routing algorithm are given below-
One of the main advantages of LSR is that it only needs to know the state of the
links it is directly connected to, as opposed to DVR which needs to know the entire
state of the network. This allows LSR to converge quickly, and to adapt to changes
in the network more quickly. This is particularly useful in large networks where the
topology changes frequently.
Another advantage of LSR is that it does not suffer from the count-to-infinity
problem which is prevalent in DVR. In DVR, if two nodes have incorrect information
about the distance to a destination, they will continue to update each other
indefinitely, leading to a stalemate. However, with LSR, nodes only exchange
information about their directly connected links, so there is no possibility of the
count-to-infinity problem.
However, LSR also has some drawbacks. Let’s discuss some of the disadvantages
below-
One of the main disadvantages is that it requires more memory and processing
power than DVR. The LSDB of each node must be updated constantly to reflect
changes in the network, and this can consume a lot of resources.
Conclusion:
In conclusion, Link State Routing (LSR) is a powerful and efficient routing algorithm
used in computer networks. It uses a link state database (LSDB) to store
information about the state of all the links in the network and uses Dijkstra’s
shortest path algorithm to determine the best path for data to travel. LSR is
particularly useful in large networks where the topology changes frequently and it
does not suffer from the count-to-infinity problem. However, it requires more
memory and processing power than DVR and is not as scalable for very large
networks.
3.It is asynchronous because it does not require all of its nodes to work in unison.
2.Sending distance vectors: Each router sends its distance vector table to its
immediate neighbors.
4.Calculating best path: Using the information in its distance vector table, each
router calculates the best path to each network and updates its routing table
accordingly.
5.Periodic updates: The sending and updating distance vectors are repeated
periodically, typically every 30 seconds. This allows the network to adapt to
changes in topology quickly.
In the network shown below, there are three routers, A, C, and D, with the
following weights − AC =8, CD =4, and DA =3.
Step 1 − Each router in this DVR(Distance Vector Routing) network shares its
routing table with every neighbor. For example, A will share its routing table with
neighbors C and D, and neighbors C and D will share their routing table with A.
Step 2 − If the path via a neighbor is less expensive, the router adjusts its local
table to send packets to the neighbor. In this table, the router updates the lower
cost for A and C by updating the new weight from 8 to 7 in router A and from 8 to 7
in router C.
Step 3 − The final revised routing table with the reduced cost distance vector
routing protocol for all routers A, C, and D is shown below-
Advantages of Distance Vector Routing Algorithm
The distance vector routing algorithm, also known as the Shortest path routing
algorithm in computer networks, has several advantages:
Simplicity: The distance vector routing algorithm is relatively simple to
implement and understand, making it easy to use in small networks or in places
where resources are limited.
Low overhead: The distance vector routing algorithm requires minimal overhead,
as routers only exchange information with their immediate neighbors. This makes
it efficient in terms of bandwidth and processing power.
Flexibility: The distance vector routing algorithm is flexible and can be used with
different metrics, such as hop count or delay, to determine the best
path.Scalability: The Distance Vector Routing algorithm can be easily scaled to
accommodate a growing network, as new routers can simply be added to the
network and the distance vectors updated accordingly.
Compatibility: Distance vector routing protocols such as RIP and IGRP are widely
supported by router vendors and are compatible with a variety of network devices,
making them an attractive option for many organizations.
The distance vector routing algorithm, also known as the Shortest path routing
algorithm in computer networks, has several disadvantages:
Slow convergence: Distance vector routing protocols have slow convergence
time, meaning that it takes a long time for the network to adjust to changes in
topology. This can cause temporary black holes or routing loops.
Limited scalability: Distance vector routing protocols are unsuitable for large
networks because they rely on every router knowing the entire routing table,
which can lead to a high overhead.
Limited accuracy: Distance vector routing protocols use only one metric, such as
hop count, to determine the best path, which can lead to suboptimal routes.
Limited security: Distance vector routing protocols do not have built-in security
features, which can make them vulnerable to attacks.
Limited feasibility in large networks: Distance vector routing protocols are not
suitable for large networks as they rely on periodic updates from all routers, which
can cause a high overhead and will not scale well.
Due to these limitations, the distance vector routing algorithm is primarily used in
small networks or places, where resources are limited and more advanced routing
protocols such as OSPF and EIGRP, are not feasible.
Summary
Distance vector routing is a sort of dynamic protocol.
The router is used to determine the best path from source to destination.
Each router in the network exchanges a topology change with an adjacent router
on a regular basis.
FAQs
Here are some frequently asked questions on the distance vector algorithm.
Q1: What is the difference between the distance vector algorithm and the link-
state algorithm?
Answer: The distance vector algorithm is a decentralized algorithm that exchanges
information about the distance between network nodes, while link-state algorithm
is a centralized algorithm that exchanges information about the entire network
topology.
Q2: What is a routing loop?
Answer: Routing loop is a problem that occurs in distance vector routing algorithm
when a node receives updates from multiple paths that have the same cost, and
as a result, the node sends data in a loop, continuously forwarding it between the
same nodes.
Q3: What is the counting-to-infinity problem?
Answer: Counting-to-infinity problem is a problem that occurs in the distance
vector routing algorithm when a node receives updates about a path that has
failed, and continues to use the same path in its routing table, causing the
distance to increase infinitely.
Q4: What is the Bellman-Ford algorithm?
Answer: Bellman-Ford algorithm is a distance vector routing algorithm that uses a
dynamic programming approach to determine the shortest path to all other nodes
in the network.
Q5: How do you prevent routing loops in the distance vector routing algorithm?
Answer: Routing loops can be prevented in distance vector routing algorithm by
using techniques such as the split horizon, poison reverse, and hold-down timers.
Q6: How do you prevent a counting-to-infinity problem in a distance vector routing
algorithm?
Answer: Counting-to-infinity problem can be prevented in the distance vector
algorithm by using techniques such as route poisoning and triggered updates.
Q7: What is the difference between the distance vector algorithm and the path-
vector algorithm?
Answer: The distance vector algorithm calculates the shortest path based on the
cost metric, while the path-vector algorithm calculates the shortest path based on
the path vector, which is a sequence of AS numbers.
----------------------------------------------------------------------------------------------------------------------
The fundamental difference between distance vector and link state routing protocols is in the
nature of the routing information routers send to each other.
In distance vector protocols, each router sends its neighbors a list of all known networks along
with its own distance to each one of these networks. Because in software engineering, a list (or
better said, an array) is also called a vector, the list of networks and distances is sometimes
called the vector of networks and distances, hence the name distance vector routing protocol.
In link state routing protocols, each router describes itself and its interfaces to its directly
connected objects; these objects can be either neighboring adjacent routers, or they can be
directly attached networks. This information is passed unchanged from one router to another,
so that in the end, every router knows about every other router, its interfaces and what exactly
they connect to. In essence, in link state routing protocols, each router knows the entire
network topology down to every single router and every single interconnection, also called the
state of a link, hence the name link state routing protocol.
So these protocol types differ in what they know about the network and what information they
use to compute the routing table. Distance vector routing protocols do not advertise the entire
network topology, and with a distance vector routing protocol, none of the routers in the
network knows how the network looks like in its entirety. A router running a distace vector
routing protocol only knows its directly connected neighbors, and it knows about the lists of
networks these neighbors have advertised, but it does not really know where those networks
really are.
Link state routing protocols allow a router to have a complete map of the network, and use
specific algorithms to find shortest paths to every object in the network, including destination
IP networks.
The fact that we have both distance vector and link state routing protocols is due to historical
reasons: Originally, distance vector protocols were much easier to design and implement in
software, and so they were very popular. However, without some clever ideas which haven't
been invented until early 90's, they had some drawbacks, especially in terms of how fast they
reacted to a change in the network and how they avoided creating a routing loop. In the
meantime, another approach to routing protocol design, the link state approach, was
developed. Link state protocols are much more complex and require more processing power
and memory, but as the resources in routers improved over time, link state routing protocols
slowly took over.
Nowadays, we have extremely fine routing protocol implementations from both worlds - EIGRP
is a state-of-the-art distance vector routing protocol, while in link state world, we have OSPF
and IS-IS.
-----------------------------------------------------------------------------------------------------------------------