Você está na página 1de 5

VOL. 2, NO.

10, October 2011

ISSN 2079-8407

Journal of Emerging Trends in Computing and Information Sciences


2009-2011 CIS Journal. All rights reserved. http://www.cisjournal.org

Performance Comparison of Two Dynamic Routing Protocols: RIP and OSPF


1

Fatima A. Hamza, 2 Amr M. Mohamed


Qatar University
1

fatmaa@qu.edu.qa, amrm@qu.edu.qa

ABSTRACT
There are 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

1. 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.

2. 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, 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][13] 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 [14] they enhance the RIP to provide stability and reduce overhead of message updates. In [12] and [13] 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.

3. ROUTING PROTOCOL (RIP)

INFORMATION

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

509

VOL. 2, NO. 10, October 2011

ISSN 2079-8407

Journal of Emerging Trends in Computing and Information Sciences


2009-2011 CIS Journal. All rights reserved. http://www.cisjournal.org

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 Simple Disadvantages of RIP 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 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

while in OSPF, 50% of packets reach their destination successfully. FS-RIP has fewer packets dropped than OSPF.

4. 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 OSPF quickly adjusts to link failures Disadvantages of OSPF OSPF is complicated to configure and needs network design and planning At the initial link-state packet is flooding so OSPF consumes a large bandwidth

Easy to configure

In [14] RIP is enhanced by using Fast Selfhealing 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 is applied on RIP and called FS-RIP. In FS-RIP 99.8756% of packets reach their destination successfully

OSPF does not propagate the entire routing protocol but it transmits information only about its link OSPF is suitable for large networks OSPF maintains shortest path routing and is fast for fault discovery and rerouting

OSPF requires higher 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 [13] the cost metric of OSPF is based on bandwidth. Cost is inversely proportional to bandwidth. The higher bandwidth means a lower cost (cost = 108/bandwidth in bps). In [12] 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

510

VOL. 2, NO. 10, October 2011

ISSN 2079-8407

Journal of Emerging Trends in Computing and Information Sciences


2009-2011 CIS Journal. All rights reserved. http://www.cisjournal.org

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.

5. 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.

Fig. 2: Network Topology

Fig. 3: Network Topology

7. RESULTS AND DISCUSSION


The results obtained from simulation are shown in the graphs given below. 1. Throughput: as shown in Figures 4, 5 and 6. LS provides better throughput compared to DV in different sizes of network because OSPF uses minimum cost as the metric for the shortest path while RIP uses the number of hops as metric. The OSPF path can carry more data at a given time because the cost metric of OSPF is based on bandwidth. Similar results are given in [5].

6.

SIMULATION

The environment of the simulation experiments was Ubuntu 10 and NS-2.34. In order to analyze data results, the tools AWK and gnuplot 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 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 downlinked 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. 4: Throughput (5 nodes)

Fig. 5: Throughput (11 nodes) Fig. 1: Network Topology

511

VOL. 2, NO. 10, October 2011

ISSN 2079-8407

Journal of Emerging Trends in Computing and Information Sciences


2009-2011 CIS Journal. All rights reserved. http://www.cisjournal.org

Fig. 6: Throughput (21 nodes) 2. Packet loss: Table 3 shows that in small networks the percentage of packets lost in LS is less than the percentage of packets lost in DV. In large networks DV dropped fewer packets than LS because OSPF are not suitable for flat large networks, it is better to use a hierarchical OSPF. Table 3: Percentage of number of packets lost in different sizes of network. No. of Nodes 5 11 21 LS 5.203731% 2.949275% 2.022606% DV 5.534351% 3.703704% 0.878972%

Fig. 8: Packet Delay (11 nodes)

Fig. 9: Packet Delay (21 nodes)

8. CONCLUSION
3. Packet Delay: as shown in Figures 7, 8 and 9, LS provides less of a queuing delay compared to DV in different network sizes because OSPF can coverage network faster than RIP. The packets in OSPF are not queued or do not wait for transmission onto the link, while the packets in RIP are queued or wait for transmission onto the link. Similar results are seen in [5]. 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).

ACKNOWLEDGMENT
Fig. 7: Packet Delay (5 nodes) This work is supported by Qatar National Research Fund (QNRF) No. 08-374-2-144.

512

VOL. 2, NO. 10, October 2011

ISSN 2079-8407

Journal of Emerging Trends in Computing and Information Sciences


2009-2011 CIS Journal. All rights reserved. http://www.cisjournal.org

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://wwwsop.inria.fr/members/Eitan.Altman/COURSNS/n3.pdf [3] 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/final/on-campus/yinfei-final.pdf [4] A. Rai, K. Kumar, Performance Comparison of Link State and Distance Vector Routing Protocols Using NS, [Online]. Available: http://www-public.itsudparis.eu/~gauthier/Courses/NS2/FichiersAnnexe/files/routing.pdf [5] 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://0ieeexplore.ieee.org.mylibrary.qu.edu.qa/stamp/stamp.j sp?tp=&arnumber=5474509 [6] 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://wwwpublic.it-sudparis.eu/~gauthier/Courses/NS2/FichiersAnnexe/files/routing.pdf

[7] B. Baran, R. Sosa, A New Approach for AntNet Routing, 2000 IEEE, pp. 303-308. [Online]. Available: http://0ieeexplore.ieee.org.mylibrary.qu.edu.qa/stamp/stamp.j sp?tp=&arnumber=885506 [8] HP, Overview, [Online]. Available: http://docs.hp.com/en/B2355-90110/ch09s01.html [9] H. Pun, Convergence Behavior of RIP and OSPF Network Protocols, 2001, [Online]. Available: http://www.ensc.sfu.ca/~ljilja/cnl/pdf/hubert.pdf [10] The Network Simulator NS-2: Documentation, [Online]. Available: http://www.isi.edu/nsnam/ns/nsdocumentation.html [11] C. H. Hon, N. H. James, Path Recovery Performances of Routing Protocols, [Online]. Available: www.projapps.com/CS5224.doc [12] C. Y. Yong, T. Michalareas, Dr. L. Sacks, Network Stability with Delay Minimisation in a QoS based OSPF Network, [Online]. Available: www.ee.ucl.ac.uk/lcs/previous/LCS2001/LCS058.pdf [13] M. N. Islam, M. A. U. Ashique, Simulation-Based Comparative Study of EIGRP and OSPF for RealTime Applications, [Online]. Available: http://www.bth.se/fou/cuppsats.nsf/all/a3681538b693 6d7fc125779e003f4b52/$file/Thesis_1053_Simulatio nBased%20Comparative%20Study%20of%20EIGRP% 20and%20OSPF%20for%20RealTime%20Applications.pdf [14] B. Wang, J. Zhangi,Y. Guoi, J. Zhou, A Study of Fast Network Self-healing Mechanism for Distance Vector Routing Protocol, 2009 IEEE Int. Conf. Communications, pp. 413-416 . [Online]. Available: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnu mber=5368254

513

Você também pode gostar