You are on page 1of 4

I nternational J ournal of Computer Trends and Technology (I J CTT) volume 4 I ssue 6J une 2013

ISSN: 2231-2803 http://www.ijcttjournal.org Page 1530



Comparison of Dynamic Routing Protocols: RIP and OSPF

Mrs.Lalitha*1, Sugand Rao Rathod*2
Assistant Professor, Dept of Computer Applications, SNIST, Ghatkesar, Hyderabad, AP, India
M.C.A Student, Dept of Computer Applications, SNIST, Ghatkesar, Hyderabad, AP, India
ABSTRACT

The two main classes of adaptive routing
protocols in the internet: distance vector and link
state. This paper presents the comparison
between distance vector and link state. It also
outlines the pros and cons of RIP and OSPF
protocols and a performance analysis with some
possible enhancement is presented. Network
Simulator (NS2) is used to obtain the
performance results of the two classes using
different metrics such as throughput, packet
delay and packet loss. Results of the simulation
show that OSPF has a better performance than
RIP in terms of average throughput and packet
delay in different network sizes, while RIP is
better than OSPF in terms of number of packet
loss in large networks.

Keywords: Dynamic Routing Protocols, RIP,
OSPF, NS2

I. INTRODUCTION
Networks rely on routing protocols to
keep the routing tables updated. Routing is used
in networks to control and forward data. For a
router to be efficient and effective, the critical
factor is the choice of the routing protocol.
Routing protocols find a path between network
nodes; if multiple paths exist for a given node
then the shortest path is selected by protocol.
Each protocol has a cost metric that it applies to
each path. The path with lowest metric is selected
by protocol. Metrics to compare one routing
protocol with another are based on convergence
time to adapt to topology changes, optimality is
to choose the best path, not necessarily at
minimum cost but to ensure a minimum delay or
to minimize overhead and space requirements to
store the routing table [1][5][7].

The rest of paper is organized as follows:
Section 2 is an overview of routing protocols. In
Section 3 and 4 RIP and OSPF are discussed. We
studied RIP and OSPF because this interior
routing protocol is widely used in the internet. In
addition the pros and cons of these routing
protocols are studied in brief. In Section 5 the
system model used for simulation is examined,
and in Section 6 we implement routing protocols
using NS2. The results of simulation show that
OSPF is better than RIP in some aspects. But in
other aspects RIP is revealed to be better than
OSPF in Section 7. Finally we conclude the
paper.

II. ROUTING PROTOCOLS
There are two types of routing protocols:
static or dynamic routing protocols. Dynamic
routing protocols are superior over static routing
protocols because of its scalability and
adaptability features. Dynamic routes are learned
by communicating each router with another,
when a new router is added or an old router is
removed, the router learns about changes,
updates its routing tables, and informs the other
router about the modification. The classification
of a routing protocol is either as an interior or
exterior gateway protocol. The interior gateway
protocol runs an algorithm within an
Autonomous System (AS) and the exterior
gateway protocol runs an algorithm outside an
AS. The interior gateway protocol is classified
into two groups: either distance vector (DV) or
link state (LS). The distance vector selects the
best routing path based on a distance metric,
I nternational J ournal of Computer Trends and Technology (I J CTT) volume 4 I ssue 6J une 2013
ISSN: 2231-2803 http://www.ijcttjournal.org Page 1531

while link state selects the best routing path by
calculating the state of each link in a path and
finding the path that has the lowest total metric to
reach the destination [1][5].
The parameters used in order to evaluate the
algorithms performance are: [7]
Instantaneous Packet Delay: This is the
average delay of all data packets routed
successfully from source to destination for
a given period during an algorithm
simulation.
Instantaneous Throughput: This is the
number of packets successfully routed for a
given time during an algorithm simulation.
Packet Loss: This refers to the number of
packets that are lost.
Different features of LS and DV protocols
are presented in [1][4][6]. In they enhance the
RIP to provide stability and reduce overhead of
message updates. In and they enhance OSPF by
using QoS. In [5] it is shown that OSPF is better
than RIP in throughput, packet delay, packet loss
and other aspects.

III. ROUTING INFORMATION
PROTOCOL (RIP)
RIP is an interior routing protocol that is
based on DV routing. RIP uses hop count to
calculate the best route. It is simple but has many
drawbacks. RIP uses hop count as a cost metric
for each link, and each link has a cost of 1. The
maximum path cost is 15 so RIP is limited to use
in ASs that are not larger than 15 hops. Every 30
seconds the router sends copy of the routing table
to its neighbors. The routing table is updated
whenever the network topology is changed; each
router informs its adjacent neighbors about the
updating in the routing table. When the router
receives an update, first it compares the new
route with the current routing table, then adds a
new path to the routing table and informs its
adjacent neighbors about the updating in the
routing table [5][9].
The following table summarizes the
advantages and disadvantages of RIP [8] [9]:

Table 1: Advantages and Disadvantages of
RIP

Advantages of RIP Disadvantages of RIP
Simple In heterogeneous networks RIP
is not scalable and is inefficient

to use in networks with more
than one LAN protocol because

RIP is based on number of hops
to reach destination
Easy to configure The periodic updating of routing
table consumes bandwidth
because RIP propagates entire
routing table to neighbor routers
The convergence is slow. (RIP is

slow to adjust the link failure)
RIP is not suitable for large
networks because the number is
limited to 15

In RIP is enhanced by using Fast Self-
healing Distance Vector Protocol (FS-DVP),
FS-DVP suppresses its failure notification to
provide better stability and reduce the overhead
of message updates. In FS-DVP, each node
generates a backup node set, for each
destination, pre- computes the backup next hop
and stores them. If the link has failed, the packet
selects the next hop from the backup set. FS-
DVP thus eliminates the delay due to re-
computation and reroutes packets without any
interruption in the presence of link failures. To
save bandwidth resources and balance the load
in the network, FS-DVP uses a suppression-
failure technique to handle link failure, so when
a link fails, an adjacent node suppresses the
update message and sets a timer for a
suppression interval, but other nodes are not
explicitly notified of the failure. When router
R1 detects that router R2 is unreachable, R1
starts a timer, the timer must be less than 60
seconds, if R1 receives a route from R2 before
the timer expires, the link recovers so that the
suppression is successful and no notification is
propagated for this failure, otherwise a failure is
propagated at the end of suppression interval
and new routing tables are computed. FS-DVP
I nternational J ournal of Computer Trends and Technology (I J CTT) volume 4 I ssue 6J une 2013
ISSN: 2231-2803 http://www.ijcttjournal.org Page 1532

is applied on RIP and called FS-RIP. In FS-RIP
99.8756% of packets reach their destination
successfully while in OSPF, 50% of packets
reach their destination successfully. FS-RIP has
fewer packets dropped than OSPF.

IV. OPEN SHORTEST PATH FIRST (OSPF)
OSPF is an interior routing protocol that
is based on link state routing. OSPF is faster
than RIP but is complex. RIP keeps track of the
closest router for each destination, while OSPF
keeps track of the complete topology of all
connections in the local network [5].
In OSPF each node broadcasts the link-
cost information about its adjacent links to all
other nodes in the network. Each node has a
complete view of the network using link-cost
information from other nodes. It applies
Dijkstras shortest path algorithm to get the
shortest route to all nodes in the network. A
node broadcasts link-cost information whenever
the links state is changed. Every 30 seconds it
also broadcasts link-cost information. [1]
The following table summarizes the
advantages and disadvantages of OSPF [8] [9]:

Table 2: Advantages and Disadvantages of
OSPF

Advantages of OSPF Disadvantages of OSPF
OSPF quickly adjusts to OSPF is complicated To
link failures configure and Needs

network design and
planning
OSPF does not propagate At the initial link-state
the entire routing protocol packet is flooding so OSPF
But It transmits consumes a large bandwidth
information only about its
Link
OSPF is suitable for large OSPF requires Higher
Networks processing and Memory
than RIP

OSPFs cost metric is cost given by the
administrator. The cost reflects monetary cost
and is a static value. The cost metric can be
either bandwidth or link delay. In the cost
metric of OSPF is based on bandwidth. Cost is
inversely proportional to bandwidth. The higher
bandwidth means a lower cost (cost =
10
8
/bandwidth in bps). In OSPF is extended to
use a link delay as QoS metric in order to
compute routes. When packets are routed based
on the shortest static cost route, this may
increase the links delay. In the delay-based
routing algorithm, the link delay is the sum of
the link propagation delay and its mean queuing
delay over the sampling interval of the link. The
delay algorithm uses threshold and incremental
factors in order to return to the computation
algorithm. The threshold and incremental
factors are tuned to improve the stability of
flow of traffic with an acceptable trade off of
delay. The cost metric based on bandwidth or
delay is suitable for its use in multimedia and E-
commerce.
V. SIMULATION SYSTEM DESIGN
MODEL
A network consists of senders and
receivers. The sender sends packets to the
receiver by passing intermediate nodes. To
choose the path from the source to the
destination, the source runs a routing protocol
such as DV or LS. The network simulation model
has the following characteristic: This model uses
a connectionless oriented UDP protocol and
constant data rate. Also this model uses a
connection oriented TCP protocol and FTP.
There are several parameters to evaluate network
performance such as throughput, delay and
packet loss. The environment of the simulation
experiments was Ubuntu 10 and NS-2.34. In
order to analyze data results, the tools AWK and
gnu plot were used.
We used three different sizes of networks.
The smallest network had five nodes and five
links. Node0 sent a UDP protocol with constant
packet rate to node3. A TCP protocol was used to
send FTP from node0 to node3. Node0 connected
to node1, node1 to node3, node3 to node4, node3
to node4, node4 to node2, and node2 to node0.
Connection from node0 to node1 and connection
from node1 to node3 had a bandwidth of 1 Mbps
and delay of 5 ms but other connections had a
bandwidth of 2 Mbps and delay of 2 ms. The
I nternational J ournal of Computer Trends and Technology (I J CTT) volume 4 I ssue 6J une 2013
ISSN: 2231-2803 http://www.ijcttjournal.org Page 1533

Network Simulator-2 (NS2) has an
implementation of the OSPF protocol with static
cost is called Link State Routing. Also it has an
implementation of the RIP is called Distance
Vector. The simulation study was done under
Network Simulator (NS2). We first built the
network with RIP as the routing protocol and
then used the same model with OSPF to evaluate
and analyze the results. In [13] they used
bandwidth as metric, in our experimental we used
the same metric. The connection from node0 to
node1 and the connection from node1 to node3
have a cost of 100 while other connections have a
cost of 50. To calculate packet loss we down
linked and uplinked the connection between
node0 and node1 in DV, and repeated this
between node0 and node2 in LS. The topology is
indicated in Figure 1. The same experiment was
repeated with a larger network by using 11 nodes
and 21 nodes.






Fig. 1: Network Topology







Fig. 2: Network Topology







Fig. 3: Network Topology


VI. CONCLUSION
In this paper, we have introduced a
quantitative comparative study for link state and
distance vector routing algorithms in different
network settings. We can conclude that OSPF
outperforms RIP in terms of average throughput
and instant packet delay in different sizes of
network. In terms of number of packets lost,
OSPF is better compared to RIP in small
networks but RIP is better in large networks.
OSPF is better than RIP for many reasons: OSPF
uses either bandwidth or delay as metric for
shortest path and it does not use the number of
hops as in RIP. OSPF can adjust the link and
OSPF coverage network more quickly than RIP,
but if RIP is enhanced by using FS-RIP, then RIP
offers a better performance than OSPF. The work
can be extended to other dynamic routing
protocols and implemented by NS2. It can also
be extended to evaluate other routing protocol
criteria such as CPU utilization, jitter, and ability
to provide Quality of Service (QoS).
REFERENCES
[1] J. F. Kurose, K. W. Ross, Computer Network A Top-Down
Approach, 5th ed. Pearson Education pp. 419-420.
[2] E. Altman, T. Jimenez, NS Simulator for Beginners, Univ.
de Los Andes Merina (Venezuela) und ESSI Sophia-
Antipolis (France), Dec 4, 2003. , [Online]. Available
http://www-sop.inria.fr/members/Eitan.Altman/COURS-
NS/n3.pdf
[3] J. F. Kurose, K. W. Ross, Computer Network A Top-Down
Approach, 5th ed. Pearson Education pp. 419-420.
[4] E. Altman, T. Jimenez, NS Simulator for Beginners, Univ.
de Los Andes Merina (Venezuela) und ESSI Sophia-
Antipolis (France), Dec 4, 2003. , [Online]. Available
http://www-sop.inria.fr/members/Eitan.Altman/COURS-
NS/n3.pdf
[5] Y. Pan, Design Routing Protocol Performance Comparison
in NS2: AODV comparing to DSR as Example, [Online].
Available
http://www.cs.binghamton.edu/~kang/teaching/cs580s.s06/fi
nal/on-campus/yinfei-final.pdf
[6] A. Rai, K. Kumar, Performance Comparison of Link State
and Distance Vector Routing Protocols Using NS, [Online].
Available: http://www-public.it-
sudparis.eu/~gauthier/Courses/NS-
2/FichiersAnnexe/files/routing.pdf
[7] S. G. Thorenoor, Dynamic Routing Protocol
Implementation Decision between EIGRP, OSPF and RIP
Based on Technical Background Using OPNET Modeler,
2010 IEEE Int. Conf. Communications, pp. 191-195.
[Online].Available: http://0-
ieeexplore.ieee.org.mylibrary.qu.edu.qa/stamp/stamp.j
sp?tp=&arnumber=5474509
[8] A. U. Shankary, C. Alaettinoglu, K. Dussa-Zieger, I. Matta,
Performance Comparison of Routing Protocols under
Dynamic and Static File Transfer Connections [Online].
Available: http://www-public.it-
sudparis.eu/~gauthier/Courses/NS-
2/FichiersAnnexe/files/routing.pdf

You might also like