Introduction to Routing Protocols: OSPF, EIGRP, and RIP

Afzal Badshah, PhD
4 min readNov 18, 2024

Routing protocols are critical in determining the best paths for data transmission across networks. These protocols are primarily classified into distance-vector and link-state protocols based on their working mechanism. In this tutorial, we will explore Open Shortest Path First (OSPF), Enhanced Interior Gateway Routing Protocol (EIGRP), and Routing Information Protocol (RIP), with a clear explanation of their types and characteristics. The focus is to make these concepts accessible to BS students. Visit the detailed tutorial here.

Classification of Routing Protocols

Routing protocols ensure data packets travel efficiently across a network. Based on their operational logic, they are divided into:

  1. Distance-Vector Protocols:
  • These protocols determine the best path based on the distance (usually measured in hops) and direction (vector) to a destination.
  • Routers periodically exchange their routing tables with neighbors, updating paths accordingly.
  • Examples: RIP, EIGRP (partially).
  1. Link-State Protocols:
  • These protocols maintain a complete map of the network and use algorithms to compute the shortest path to each destination.
  • Routers share updates about changes in their direct connections (links), not entire routing tables.
  • Example: OSPF.

Routing Information Protocol (RIP)

RIP is one of the earliest routing protocols and is classified as a distance-vector protocol.

How RIP Works

RIP calculates the best path using hop count as the metric. A hop represents the number of routers a packet must traverse to reach its destination. The maximum hop count is limited to 15, making RIP unsuitable for large networks.

  1. Each router periodically broadcasts its entire routing table to its immediate neighbors every 30 seconds.
  2. If no updates are received for a specific route after 180 seconds, the route is considered invalid.

Characteristics of RIP

  • Simple Configuration: Easy to set up for small networks.
  • Periodic Updates: Uses fixed intervals for routing table exchanges.
  • V1 vs. V2: RIP v2 supports advanced features like Variable Length Subnet Mask (VLSM) and authentication, which are not available in RIP v1.

Limitations

RIP is less efficient for large networks due to:

  • Hop Count Limit: Routes with more than 15 hops are deemed unreachable.
  • Slow Convergence: It takes longer to adapt to network changes.

Enhanced Interior Gateway Routing Protocol (EIGRP)

EIGRP is a hybrid routing protocol with features of both distance-vector and link-state protocols.

How EIGRP Works

EIGRP employs the Diffusing Update Algorithm (DUAL) to ensure loop-free paths and quick convergence. It considers multiple factors (bandwidth, delay, reliability, and load) to calculate the best route.

  1. Routers form neighbor relationships by exchanging Hello packets.
  2. The DUAL algorithm selects the best path and keeps a feasible backup route.
  3. Updates are triggered only by changes in the network, reducing bandwidth usage.

Key Features

  • Scalability: Suitable for medium to large networks.
  • Fast Convergence: Adapts quickly to topology changes.
  • Unequal-Cost Load Balancing: Distributes traffic across multiple paths with varying costs.

Limitations

  • Proprietary to Cisco, restricting interoperability with non-Cisco devices.
  • Requires more memory compared to simpler protocols like RIP.

Open Shortest Path First (OSPF)

OSPF is a link-state protocol designed for large and complex networks.

How OSPF Works

OSPF builds a complete map of the network by exchanging Link-State Advertisements (LSAs) between routers. It uses Dijkstra’s Shortest Path First (SPF) algorithm to calculate the best paths.

  1. Routers establish neighbor relationships and share LSAs.
  2. The Link-State Database (LSDB) is synchronized across routers.
  3. The SPF algorithm computes the shortest path tree for routing.

Key Features

  • Cost Metric: OSPF calculates path cost based on bandwidth.
  • Area-based Design: The network is divided into hierarchical areas for scalability.
  • Support for VLSM: Allows efficient use of IP addresses.

Limitations

  • Configuration and maintenance are complex compared to RIP or EIGRP.
  • Higher resource consumption for CPU and memory.

Comparing the Protocols

FeatureRIPEIGRPOSPFTypeDistance-vectorHybrid (Distance-Vector + Link-State)Link-stateMetricHop countBandwidth, DelayCost (Bandwidth)Convergence SpeedSlowFastModerateScalabilityLowMedium to HighHighBest Use CaseSmall networksMedium-sized networksLarge, complex networks

Practical Example

Scenario: Suppose you have three routers, R1, R2, and R3, connected in a triangular topology.

  1. Using RIP: Each router advertises its routing table every 30 seconds. If a link between R1 and R2 fails, it takes some time for the failure to propagate, causing delays.
  2. Using EIGRP: Routers form neighbors and exchange Hello packets. If a link fails, the DUAL algorithm quickly calculates an alternate route using a feasible successor.
  3. Using OSPF: All routers share LSAs. Upon failure, the LSDB is updated, and the SPF algorithm recalculates the shortest path.

Conclusion

Understanding the classification and workings of routing protocols helps in choosing the right protocol based on network size and requirements. RIP is ideal for small setups, EIGRP for medium to large networks, and OSPF for highly complex environments. Mastering these protocols equips students with essential knowledge for network design and troubleshooting.

Visit the detailed presentation

--

--

Afzal Badshah, PhD
Afzal Badshah, PhD

Written by Afzal Badshah, PhD

Dr Afzal Badshah focuses on academic skills, pedagogy (teaching skills) and life skills.

No responses yet