Comparison of RIP, OSPF and EIGRP Routing Protocols Based On OPNET
Comparison of RIP, OSPF and EIGRP Routing Protocols Based On OPNET
SPRING 2014
FINAL PROJECT
Project Group # 9
http://www.sfu.ca/~sihengw/ENSC427_Group9/
List of Figures………………………………………………………………………….……..….1
Abstract..........................................................................................................................................2
1. Introduction................................................................................................................................3
3. OPNET Simulations………………………………………………………………………......8
5. Conclusion…………………..…………………………………………………………….….20
References…………………………………………………………………………………….…22
List of Figures
Figure.1 Simple structure of OSPF……………………………………………………………….5
Figure.3 Area......................................................………………………………………………….6
1
Abstract
In a computer network, the transmission of data is based on the routing protocol which selects
the best routes between any two nodes. Different types of routing protocols are applied to
specific network environment. Three typical types of routing protocol are chosen as the
simulation samples: RIP, OSPF and EIGRP. RIP (Routing Information Protocol) is one of the
oldest routing protocols still in service. Hop count is the metric that RIP uses and the hop limit
limits the network size that RIP can support. OSPF (Open Shortest Path First) is the most widely
used IGP (Interior Gateway Protocol) large enterprise networks. OSPF is based on the Shortest
Path First (SPF) algorithm which is used to calculate the shortest path to each node. EIGRP
Enhanced Interior Gateway Routing Protocol) is Cisco's proprietary routing protocol based on
Diffusing Update Algorithm. EIGRP has the fastest router convergence among the three
protocols we are testing.
More detailed description of these three routing protocols will be included later. We aim to
analyze the performance of the three protocols such as their router convergence, convergence
duration and end-to-end delay. In our project, we are going to use OPNET to simulate RIP,
OSPF and EIGRP in order to compare their attributes and performance. According to the
convergence we can find out which protocols are suitable for different sizes and types of network.
2
1. Introduction
A routing protocol is the language a router speaks with other routers in order to share
information about the reachability and status of network.(1) It includes a procedure to select
the best path based on the reachability information it has and for recording this information
in a route table. Regarding to select the best path, a routing metric will be applied and it is
computed by a routing algorithm.
1.2 Routing Metric Basics
A metric is a variable assigned to routers as a means of ranking them from the best to worst
or from most preferred to least preferred. (1) Different routing protocols have different
metrics. When there is more than one route between two nodes, a router must determine a
method of metrics by choose the routing protocol to calculate the best path.
Link state routing protocols build a complete topology of the entire network are and then
calculating the best path from this topology of all the interconnected networks. It requires
more processing power and memory because it has a complete picture of the network.
3
2. Three Routing Protocols
When first developed, RIP only transmitted full updates every 30 seconds. In the early distributions,
traffic was not important because the routing tables were small enough. As networks become larger,
massive traffic burst becomes more likely during the 30 seconds period, even if the routers had been
initialized at different times. Because of this random initialization, it is commonly understood that the
routing updates would spread out in time, but that is not the case in real practice.
Invalid Timer (default 180 seconds): indicates how long a route will remain in a routing table before
being marked as invalid, if no new updates are heard about this route. The invalid timer will be reset
if an update is received for that particular route before the timer expires. A route marked as invalid is
not immediately removed from the routing table. Instead, the route is marked with a metric of 16,
which means the route is unreachable, and will be placed in a hold-down state.
Hold-down Timer (default 180 seconds): specifies how long RIP will keep a route from receiving
updates when it is in a hold-down state. In a hold-down state, RIP will not receive any new updates
for routes until the hold-down timer expires. A route will go into a hold-down state for the following
reasons:
The invalid timer has expired
An update has been received from another router; route goes into a 16 metric (or unreachable).
An update has been received from another router; route goes into a higher metric than what it is
currently using.
Flush Timer (default 240 seconds): When no new updates are received about this route, flush timer
indicates how long a route can remain in a routing table before getting flushed out. The flush timers
operates simultaneously with the invalid timer, so every 60 seconds, after it has been marked invalid,
the route will get flushed out. When RIP timer is not in sync with all routers on the RIP network,
system instability occurs. This timer must be set to a higher value than the invalid timer.
4
2.2 Open Shortest Path First (OSPF)
OSPF is defined in RFC 2328 which is an interior Gateway Protocol used to distribute
routing information within an AS (Autonomous System). Among all the three chosen
samples, OSPF is the most widely used routing protocol in large enterprise networks. OSPF
is based on link-state technology by using SPF algorithm which calculates the shortest path.
SPF calculation
Before running the calculation, it is required that all routers in the network to know about all
the other routers in the same network and the links among them. The next step is to calculate
the shortest path between each single router. For all the routers they exchange link-states
which would be stored in the link-state database. Every time a router receives a link-state
update, the information stores into the database and this router propagate the updated
information to all the other routers. Below is a simple model of how the SPF algorithm works.
A simple network formed by five routers; all the routers know about all the other routers and
links. After all the paths are figured out, the path information are stored in the link database.
The link database for the above model is : [A, B, 3], [A, C, 6], [B, A, 3], [B, D, 3], [B, E, 5],
[C, A, 6], [C, D, 9], [D, C, 9], [D, B, 3], [D, E, 3] , [E, B, 5] and [E, D, 3]. Each term is
referred to the originating router, the router connected to and the cost of the link between the
two routers. Once the database of each router is finished, the router determines the Shortest
Path Tree to all the destinations. (The shortest path in the SPF algorithm is called the
Shortest Path Tree). The Dijkstra Shortest Path First is then running to determine the shortest
path from a specific router to all the other routers in the network. Each router is put at the
root of the Shortest Path Tree and then the shortest path to each destination is calculated. The
accumulated cost to reach the destination would be the shortest path.
5
The cost (metric) of OSPF is the cost of sending packets across a certain interface. The
formula to calcite the cost is: cost= 10000 0000 /bandwidth in bps. If the bandwidth is wider,
the cost would be lower.
Below is a diagram of the structure used to calculate the Shortest Path Tree.
When the Shortest Path Tree is completed, the router will work on the routing table.
In OSPF protocol, an Autonomous System can be divided into sections. A section and a
nearby router can dorm an AREA. Since each section calculate the Shortest Path using the
same algorithm as above, each section has its own database and path tree and the information
are invisible outside this section. By doing this, the size of the database can be dramatically
reduced.
Figure 3: Area
6
In an autonomous, there is a backbone called Area 0 which is the pivot of this autonomous.
Area 0 connected to other sections with ABR (Area Border Router) to exchange link-state.
Stub Area, Not-So-Stubby Area, Totally Stubby Areas and Totally NSSA are other types of
sections with specific functions.
Advantages
Compare to RIP, OSPF has no limitation due to hops (RIP has a limit of 15 hops so any
network with more than 15 hops cannot be achieved by RIP. OSPF can handle Variable
Length Subnet Masks (VLSM) but RIP cannot. The most important is that OSPF converges
much faster than RIP due to its calculation algorithm. This might not be significant in a small
size network but in large enterprise networks, this will be a time out.
Metric is used to determine whether the chosen route is optimized. EIGRP metric is based on
its bandwidth, delay, reliability, load and MTU. A default expression for EIGRP metric
is 𝑀𝑒𝑡𝑟𝑖𝑐 = 𝐵𝑎𝑛𝑑𝑊𝑖𝑑𝑡ℎ + 𝐷𝑒𝑙𝑎𝑦 ∗ 256.
There are four basic components to operate EIGRP, which are
Neighbour Discovery/Recovery
Reliable Transport Protocol
DUAL Finite State Machine
Protocol Dependent Module
Since EIGRP updates are triggered when there is a change, it is important to have a process
that routers dynamically learn of other routers on directly connected network. A router
should discover once a neighbouring router is unreachable of inoperative. Neighbour
Discovery and Recovery is accomplished by sending small Hello packets periodically at low
cost. Once the hello packets are received, whether this neighbour is alive can be determined.
The neighbouring router will start exchanging information when routers are functioning.
The default EIGRP algorithm DUAL requires guaranteed and ordered delivery of packets for
transmission which reliable transport protocol manages. EIGRP sends a unicast data receiver
7
indicating the hello packet does not require the confirmation of the notification packet. When
there is a packet sending, a sequence number is assigned which is incremented by the router
sending a new packet. Reliable Transport Protocol insures fast transport when there are
unacknowledged packets pending. That guarantees the low convergence time.
DUAL, the Diffusing Update Algorithm is the default convergence algorithm which is used
in EIGRP to prevent routing loops from recalculating routes. DUAL tracks all routes and
detect the optimal path in terms of efficiency and cost which will be added in the routing
table. There also exist backup routes that can be used in case the optimal route is dropped.
Protocol Dependent Modules are used to encapsulate the IP packets for network layer. It
determines if an additional route is necessary from sources such as routing table. PDMs make
sure that EIGRP provides support for various routed protocols.
3. OPNET Simulations
3.1 Topologies
Network topology is the arrangement of various elements of a computer network. It is
typically described as either physical or logical. Different placements of network components
such as device location and the shape of cabling layout are part of physical topology. On the
other hand, Logical topology illustrates how the data passes through the network regardless
of the physical design. In many cases, network topologies may be identical, but the distances
between nodes, physical interconnections, transmission rates and signal types will still be
different. We use two basic topologies in our project, which are mesh and tree topology.
8
Figure 4: Basic structure of Mesh topology
9
3.2 Simulation Setup
3.2.1 Simulation Setup for Failure/Recovery Configuration
Figure 6 below shows the setup for Recovery Configuration. The simulation is set to be
15 minutes, the first failure is set to be 5 minutes which is 300 second, and the recovery is
set to be 600 seconds. Recovery configuration is set to be the same for all scenarios
except the route would be dropped.
10
Figure 8: OSPF DES statics
11
Figure 10: Simulation Global Attributes
12
- The RIP routing tables are initialized with the local gateway‟s IP addresses. The cost
for these routes is set to 0.
- Silent RIP processes are modeled with a parameter that can be controlled by the user.
Silent RIP processes do not send out routing update messages, and are normally used
for hosts that do not act as network gateways.
- The start time at which the first regular routing updates are generated is a parameter
that can be controlled by the user.
- Split Horizon with Poisoned Reverse is implemented to avoid including routes in
updates sent to the gateway from which they were learned. Such routes are included
in updates, but their metrics are set to infinity.
- Regular and Triggered Updates
- Garbage Collection (Flush) and Timeout (Route Invalid) timers
13
Figure 14: EIGRP parameters
- Hello Interval. Determines the time interval between hello messages. A high value
lowers the EIGRP traffic in steady state, and a low value enables node failures to be
detected more quickly.
- Hold Time. Specifies the value of hold time, which is advertised in the hello message
sent over the corresponding IP interface. The hold time value defines the amount of
time a neighbor should wait for another hello message from this process model before
marking its node as down. A high hold time value delays the detection of node
failures, and a low value may cause misjudging the status of a neighbor as down
because of a few delayed or dropped hello packets.
- Split Horizon. Enables or disables split horizon on the interface. The default
configuration enables this feature on all interfaces.
- Route Filters. Specifies the prefix/distribute lists used to filter routes received on or
sent from this interface. Prefix/distribute lists are defined in the IP > IP Routing
Parameters > Prefix Filter Configuration attribute.
14
Figure 15: Overlaid Convergence Activity on small mesh
The three peaks from left to right in the graph represent: initialization, failure, recover. The
width of the peak stands for the convergence time of the protocol. If the peak is wider, the
protocol converges slower. In small mesh topology, EIGRP is the fastest protocol among the
three. RIP is a little bit slower than EIGRP. It is clear to see from the graph that OSPF
converges most slowly.
Next we simulated the data transmission of three protocols on large mesh topology.
15
This time the fastest protocol is still EIGRP. OSPT has longer initialization and recover time
than the other two protocols. The difference in peak duration for OSPF is not significant in
small and large topologies. RIP is the slowest one in large mesh especially when the link is
failed; its initialization duration is half of OSPF. RIP has very long fail convergence compare
to the other two. Our assumption was RIP is limited by its hop count which is only 15.
EIGRP is still the fastest protocol among all three. OSPF has a slightly longer initialization
time compare to RIP and both OSPF and RIP has much longer initialization time than EIGRP.
The fail convergence time is different from the mesh topology where EIGRP>OSPF>RIP,
but the difference is not significant. RIP has the longest recover time and OSPF is a bit faster.
16
Figure 18: RIP Average Convergence Duration over different topologies
It is clear to tell that RIP has best performance on small network comparing to large tree and
mesh. Since RIP has to update every 30 seconds, it will take more time on large networks.
The performance of OSPF is quite similar in three topologies. The initialization time in singe
mesh is a slightly faster than that in large mesh and large tree.
17
Figure 20: EIGRP Average Convergence Duration over different topologies
From figure 20, it looks like a huge difference over topologies but in details, the difference is
only around 0.02 second which is really tiny. Therefore, the convergence of EIGRP in
different topologies did not have radical improvement.
The figure above shows the router traffic sent in bits/sec in three protocols using single mesh
topology. From the graph, the first peak is the initial traffic, the next peak is link failure and
the last peak is the link recovery in the network. We can tell OSPF generates the highest
initial traffic since the OSPF will map out the network which requires routers to distribute a
18
large amount of information then choosing a path. In addition, we note that EIGRP has the
highest bandwidth efficiency, and the second one is OSPF. However, the RIP has the lowest
bandwidth efficiency. In this graph, the RIP shows a little difference from OSPF and EIGRP
because RIP will update the routing table every 30 seconds, which is the same as our result.
When we use large mesh topology, we can clearly tell that the throughput for each protocol has
increased. It is just because the number of routers used in this topology is increased. At the
beginning, OSPF has a throughput of 0.52Mbps, but EIGPR only has 0.2 Mbps. As we
mentioned that OSPF using link state and EIGRP using hybrid in the introduction, link state
requires to map out the whole network at the beginning. Also, we note that when failure occurs
the EIGRP has higher throughput than OSPF. However, when recovery occurs the throughput is
higher than EIGRP, which is the same situation as the initial. As for bandwidth efficiency, OSPF
and EIGRP has a much higher bandwidth efficiency than RIP. In every 30 seconds, RIP wastes
about 0.11Mbps, so we think RIP is only suitable for small network.
19
Figure 23: Traffic sent comparison on mesh topology
When we use large tree topology, we can clearly tell that at the beginning, OSPF has a
throughput of 0.95Mbps, but EIGPR only has 0.18 Mbps. As we mentioned that OSPF using link
state and EIGRP using hybrid in the introduction, link state requires to map out the whole
network at the beginning. However, when failure and recovery occurs the EIGRP has higher
throughput than OSPF. As for bandwidth efficiency, OSPF and EIGRP has a much higher
bandwidth efficiency than RIP. In every 30 seconds, RIP wastes about 0.19 Mbps, so again we
prove that RIP is not suitable for large network.
5. Conclusion
We analyzed the performance of three major types of routing protocols: RIP, OSPF and
EIGRP using OPNET. Three different topologies had been built and the simulation of each
routing protocol in all three topologies had been performed. Firstly we implemented the three
routing protocols into a small mesh network and recorded the convergence activity,
convergence duration and traffic sent (bytes/sec) to compare the difference in their
performance. Then we implement the three protocols into large mesh and large tree
topologies and recorded the same three graphs as we did in small mesh network.
We first compare the simulation result of convergence activity of three protocols. We did
both horizontal and vertical comparisons. According to the convergence activity results, it is
obviously that EIGRP is the fastest routing protocol among all the tree protocols when
20
initializing, failing and recovering. OSPF is the slowest (OSPF has to let all the routers to
know each other) when initializing which matches our research. In small network, RIP‟s
performance is close to EIGRP but when we changed to large network, RIP‟s convergence
speed is the slowest. According to the traffic send (bytes/sec) we can conclude that OSPF and
EIGRP benefit from the bandwidth while RIP sends complete information to flood the
network which wasted bandwidth.
Refer to our analysis of all simulation results, we can conclude that EIGRP is the best choice
for both large and small networks since it has the fastest convergence and EIGRP uses the
bandwidth efficiently. But our research showed that EIGRP had just been implemented to
companies other than CISCO (2013), and the structure is complicated. Based on EIGRP‟s
attributes, OSPF will be the second choice for large networks. RIP has the worst performance
in large networks so it is suitable for small, simple networks.
The first plan of the project was about VPN, but the topic has been changed since the
expected result could not be achieved. Therefore, the whole process of research, simulation
setups and report have to b started over. After reading a lot of paper and tutorial on OPNET,
we decided to change the topic to the routing protocols which are widely used nowadays. It
turns out that the parameter setups are easy to understand and doable with significant
comparison of performance. However, setups are still the most challenging part we faced.
For example, how do we predict the result? How do we determine if the result online is
reliable as a reference? How does this parameter setup impact on simulation? What features
should we compare over these protocols? Once the simulation is completed, analysis of all
the graph we obtained became another challenge.
21
References
[1] Behrouz A. Forouzan, “TCP/IP Protocol Suite”, McGraw-Hill Education Press. P. 269.
ISBN 0-073-37604-3. Retrieved on March 25, 2009.
[2] Pankaj Rakheja, Prabhjot Kaur, Anjali Gupta, Aditi Sharma, “Performance Analysis of RIP,
OSPF, IGRP and EIGRP Routing Protocols in a Network”. Retrieved on June 18, 2012. Internet:
http://research.ijcaonline.org/volume48/number18/pxc3880401.pdf
[4] Cisco, “Cisco Active Network Abstraction 3.7 Reference Guide”. Chapter 10. Retrieved on
Feb 1, 2010. Internet:
http://www.cisco.com/c/en/us/td/docs/net_mgmt/active_network_abstraction/3-
7/reference/guide/ANARefGuide37.pdf
[5] Scott M. Ballew, “Managing IP Networks with Cisco Routers”, O‟REILLY Press. Chapter 5.
ISBN: 1-56592-320-0. Published in 1997. Internet:
http://phucchau.tran.free.fr/book/O%27Reilly%20-
%20Managing%20Ip%20Networks%20With%20Cisco%20Routers.pdf
[6] Jeff Doyle, “Routing TCP/IP (Volume I)”, Cisco Systems Press. Chapter 5-9. Published in
1997. Internet:
http://www.net130.com/tutorial/cisco-pdf/routingtcpipv1.pdf
[7] B. Wu, “Simulation Based Performance Analysis on RIPv2, EIGRP and OSPF Using
OPNET”. Retrieved on Mar 15, 2013. Internet:
http://digitalcommons.uncfsu.edu/cgi/viewcontent.cgi?article=1011&context=macsc_wp
[8] Hubert Pun, “Convergence Behavior of RIP and OSPF Network Protocols”. Retrieved in Dec
2001. Internet:
http://www2.ensc.sfu.ca/~ljilja/cnl/pdf/hubert.pdf
22
[9] K.Mirzahossein, M.Nguyen and S.Elmasry, “Analysis of RIP, OSPF, and EIGRP Routing
Protocols using OPNET”. Retrieved in 2013. Internet:
http://www.sfu.ca/~mtn9/427_Report.pdf
23