Dynamic routing protocols are used by routers to automatically discover and select
the best paths for data to travel across a network. Here are explanations of two
common dynamic routing protocols: Routing Information Protocol (RIP) and Open
Shortest Path First (OSPF).
1. Routing Information Protocol (RIP)
● RIP is a distance-vector routing protocol. It is one of the oldest and simplest
routing protocols still in use. It is best suited for small, simple networks. How
it Works: RIP determines the best path based on the hop count, which is the
number of routers a data packet must pass through to reach its destination.
The path with the lowest hop count is considered the best.
● Key Characteristics:
○ Distance-Vector: Routers share their entire routing table with their
immediate neighbors at regular intervals (typically every 30 seconds). A
router trusts the information it receives from its neighbors—a principle
sometimes called "routing by rumor."
○ Hop Count Metric: The maximum hop count is limited to 15. A hop
count of 16 is considered unreachable. This limitation makes RIP
unsuitable for large networks.
○ Slow Convergence: Because it relies on periodic updates and a simple
metric, it can be slow to adapt to network changes, such as a link failure.
This can lead to temporary routing loops or "count to infinity" problems.
○ Versions: RIP has evolved with different versions to address some of its
limitations.
■ RIPv1: The original version, which is classful (does not support
Variable Length Subnet Masks or VLSM) and broadcasts updates.
■ RIPv2: An improved, classless version that supports VLSM and uses
multicast for updates, reducing network overhead.
■ RIPng: A version designed specifically for IPv6 networks.
2. Open Shortest Path First (OSPF)
● OSPF is a link-state routing protocol. It is widely used in large enterprise and
service provider networks due to its efficiency and scalability. How it Works:
Unlike RIP, OSPF routers do not just share their routing tables; they exchange
detailed information about their directly connected links and the state of those
links. Each router uses this information to build a complete "map" of the entire
network topology. From this map, it runs an algorithm called the Shortest
Path First (SPF) or Dijkstra's algorithm to calculate the best, loop-free
path to every destination.
● Key Characteristics:
○ Link-State: Routers maintain a Link-State Database (LSDB) that
contains a complete view of the network. They send out Link-State
Advertisements (LSAs) to share information about their links.
○ Cost Metric: OSPF uses a "cost" as its metric, which is typically
calculated based on the bandwidth of a link. A higher bandwidth link has
a lower cost. This allows for more intelligent routing decisions than a
simple hop count.
○ Fast Convergence: When a network change occurs (e.g., a link goes
down), the affected router immediately sends an LSA to its neighbors,
triggering all other routers in the area to recalculate their paths. This
results in very fast convergence.
○ Hierarchical Design: OSPF supports a hierarchical network design
using "areas." The central backbone area (Area 0) connects to all other
areas, which helps to reduce the amount of routing information that each
router needs to process and store, making the protocol very scalable.