In today’s internal enterprise networks, Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) are the most widely used Intra-domain routing protocol. Correspondingly, the two major classes of routing algorithms employed within the Internet are the vector-distance (also known as Bellman-Ford) and link-state algorithms.

The distinction between these protocols is in the methods used to describe and exchange routing information. The vector-distance algorithms are based on the exchange of distance and reachability of information between routers. Link-state algorithms are based on the exchange of more extensive information, including a complete database of how each routing node reaches other nodes in the network, the type of link, and more detailed cost information. With a more complete picture of the state of all links in the target network, each routing node is then able to identify the shortest path to a destination node or network. It is from this concept that the term “Shortest Path First” has been coined.

CCNA Training – Resources (Intense)

So, the first question that comes in one’s mind is which Intra-domain routing protocol should I choose for my network? The answer is it depends on which kind of network you want to deploy, and for which kind of enterprise. According to requirement, we need to deploy Intra-domain routing protocol for an enterprise network.

We’ve come to the point whether we should use RIP or OPSF for my network but first we have to take a brief overview of both protocols. After reading this article, you will have a clearer understanding of which protocol you’ll need to use in your network.

Routing Information Protocol (RIP):

Routing Information Protocol (RIP) is one of the first widely deployed routing protocols. RIP is a standardized Distance Vector protocol, designed for use on smaller networks and is supported on a wide variety of systems. It uses a Bellman-Ford Distance Vector algorithm. It is simple to program, but it has a number of disadvantages.

  • RIP adheres to the following Distance Vector characteristics:
    • RIP sends out periodic routing updates (every 30 seconds).
    • RIP sends out the full routing table every periodic update.
    • RIP uses a form of distance as its metric (in this case, hop count).
    • RIP uses the Bellman-Ford Distance Vector algorithm to determine the best path to a particular destination.
  • Other characteristics of RIP include:
    • RIP supports IP and IPX routing.
    • RIP utilizes UDP port 520.
    • RIP routes have an administrative distance of 120.
    • RIP has a maximum hop count of 15 hops.

Let’s look at its technical mechanisms:

  1. Algorithm: Routers that use Routing Information Protocol (RIP), based on the Bellman-Ford algorithm, pass periodic copies of their routing table to neighboring routers and accumulate cost. RIP uses hop count as the metric for each link. For example, consider three adjacent routers, A, B and C connected in a straight line. Router A passes its routing table to Router B; Router B adds one to the metric and passes the routing table to its other neighbor, Router C. The same step-by-step process occurs in all directions between direct-neighbor routers.

  2. Topology Change: The routing table must be updated whenever the inter-network topology changes. A table update requires each router to send its routing table to each of the adjacent neighbours. When a router receives an update, it compares the update with its routing table. It adds it to the metric of reaching the neighbour router to the path metric reported by the neighbour to establish a new metric.
  1. Problems and Solutions: There are a number of issues relevant to RIP. First, the slow convergence may cause inconsistent routing entries, occasionally resulting in routing loops. When there is a link failure, other routers cannot receive the failure notification before sending their own updates. Consequently, the network bounces the incorrect routing table and increments the metric. The metric can eventually approach to infinity.

    In order to correct this problem, combinations of solutions have been implemented. By defining 15 to be the maximum number of hops, the infinite looping problem can be prevented. A second solution uses “split horizon”, which forbids the router from sending information about a route back in the direction from which the original packet arrived. Moreover, a hold-down timer can be used. It instructs the router to delay any changes that involve the defective routes. Finally, the router can send messages as soon as it notices a change in their routing table (triggered update).

  1. Disadvantages: There are several disadvantages to RIP. The network is restricted to 15 hops in order to solve the “count to infinity” problem. In addition, the periodic broadcast of the routing table consumes bandwidth and the convergence is slow, too.

To understand RIP better, let’s look at a practical scenario like the diagram below, where RIP v2 is configured in GNS.

Figure 1: RIPv2 is configured in between two Routers in GNS.

I am going to take routers R1, R2 and configure RIPv2 between them. Two loopbacks 1.1.1.1/32 and 2.2.2.2/32 are configured on R1 and R2. Let’s look at its routing table in figure 2 below.

Figure 2: Routing Table of Router R1 using RIP v2 as routing protocol.

We are getting 2.0.0.0/8 route on R1 as RIP route with AD value of 120 and metric value 1 via 12.1.1.2 interface R2 router’s interface.

Open Shortest Path First (OSPF):

Open Shortest Path First (OSPF) was developed by the Internet Engineering Task Force (IETF) as a replacement to overcome the shortcomings of RIP in RFC 2328. Unlike the Cisco proprietary protocol EIGRP which was developed by Cisco to replace RIPv2, OSPF is vendor independent and is the most used routing protocol by enterprise networks today. So we have to give a special attention on it as a network engineer. Let’s look at a detailed theoretical and practical approach to OSPF.

  1. Algorithm: Open Shortest Path First (OSPF), based on Dijkstra’s algorithm, generates link-state packets that contain local information for each router. Each router exchanges local and external link state information and generates a shortest path tree. Each router uses this exact topology to calculate the shortest path to each destination. Recalculation occurs only if there are any changes.
  2. Topology Changes: Each router keeps track of the link states of its neighbours. Whenever there is a change, a router notifies other routers by sending a link-state packet. Other routers then reconstruct a complete map of the inter-network.
  1. Problems and Solutions: Unsynchronized updates and inconsistent path decisions are the main problems of OSPF. Routers cannot determine the most recent update when two different link-state updates arrive at approximately the same time. If the link-state packet is not correctly distributed to all routers, invalid routing entries will result. This problem is relatively minor when compared to the problem encountered by RIP as this can be solved easily by coordinating the updates. Time stamps, update numbering and counters can be used to show the sequence of the update.
  1. Advantages and Disadvantages:

OSPF has both advantages and disadvantages. Some advantages of OSPF are:

· It is the highest-performance open standard routing protocol.

· It is a classless routing protocol.

· It provides shortest path routing and is fast to fault-discovery and rerouting.

· It consumes minimal link overhead when the network is in steady state.

· It has been endorsed by the IETF and implemented by many vendors.

Some disadvantages of OSPF are:

· It demands a higher processing and memory requirement than RIP.

· It consumes a large bandwidth at the initial link-state packet flooding.

Let’s move to practical aspects of OSPF, so you can have a better understanding of it. Now in the diagram below, Router R1 and R2 are configured with the OSPF routing protocol.

Figure 2: OSPF configured between Router R1 and R2.

Let’s check its routing table. We are getting 2.2.2.2/32 route on R1 as OSPF route with AD value of 110 and metric value 2 via 12.1.1.2 interface i.e. R2’s interface.

Figure 4: Routing Table for R1 router using OSPF routing protocol.

Let’s run OSPF and RIPv2 on the same topology to see what happens. Here in diagram 5, we have run both routing protocols on Router R1 and R2.

Figure 5: OSPF & RIPv2 is running in same topology.

Let’s look at the routing table for our topology:

Figure 6: Routing Table after running OSPF & RIP v2 protocol.

Now after seeing the detailed routing table for this topology, we can clearly understand that OSPF is preferred over RIP protocol as its AD value is less than RIP, i.e. 110, and it has a route with /32 CIDR value, whereas RIP route only has a /8 CIDR value.

In RIP, route options identify a single route to a destination whereas OSPF supports multiple routes to a single destination, and facilitates load-balancing traffic distribution. RIPv2 treats the autonomous system as a single subsystem whereas OSPF breaks the autonomous system into one or more areas with two levels of routing algorithms, intra-area and inter-area.

The two major classes of routing algorithms employed within the Internet are the vector-distance (also known as Bellman-Ford) and link-state algorithms. The distinction between these protocols is in the methods used to describe and exchange routing information. The vector-distance algorithms are based on the exchange of distance and reachability information between routers. Link-state algorithms are based on the exchange of more extensive information, including a complete database of how each routing node reaches other nodes in the network, the type of link, and more detailed cost information. With a more complete picture of the state of all links in the target network, each routing node is then able to identify the shortest path to a destination node or network. It is from this concept that the term “Shortest Path First” has been coined.

Figure 7: Differences of characteristics between RIPv1 & RIPv2 and OSPF.

Many factors are behind the processing and techniques of both routers; you cannot make the judgment that RIP is a bogus protocol as it is just a matter of requirement. A network administrator has to keep many things in mind before deploying routing protocols. It is true however that OSPF is a much more advanced routing protocol than any other Interior gateway protocol.

Tips for Cisco Exams (like CCNA), job interview and real time job environment:

I hope that after reading this article you now have a clear understanding of which routing protocol you need to deploy in your network. In order to master these two protocols, you need to practice them in different topologies and scenarios in GNS and Lab environment with real devices. You can get those scenarios by simply Googling for it.

For CCNA exams, OSPF is a more significant topic than RIPv2, simply because it has more features and is the most used interior routing protocol in the world. So you need to understand it in depth by reading and getting hands-on experience with real routers.

References:

  1. Guide to Cisco Certified Network Associate certification by Todd Lamlee, Sybex press.
  2. Guide to Cisco Certified Network Associate by Richard Deal.
  3. Cisco Certified Network Professional-Route by Wendel Odom, Ciscopress.com
  4. CCNP- Route Quick reference by Denis Donohou, Ciscopress.com
  5. Cisco Certified Internetwork Expert by Wendel odom and others, Ciscopress.com
  6. Cisco Certified Internetwork Expert Quick reference by Brad Ellis, Ciscopress.com