Basic Routing Concepts and Protocols Explained

This tutorial explains the basic concepts, features, functions, and types of routing protocols. Learn different types of routing protocols and how they work.

Features of routing protocols

Routers use routing protocols for the following purposes.

  • To discover all the available paths in the network.
  • To learn how many paths exist between each source and destination.
  • To select the fastest path if multiple paths exist between a source and the destination.

Functions of routing protocols

The main functions of routing protocols are the following.

  • Learn routing information from neighboring routers
  • Advertise local routing information to neighboring routers
  • Calculate the best route for each subnet of the network
  • Provide a virtual map of all routes of the network
  • Calculate the cost of each route and help the router choose the best and fastest route
  • Detect any change in the network and update all routers about that change

Types of routing protocols

There are three types of routing protocols: distance-vector, link-state, and hybrid.

type of routing protocols

Let's understand how each type of routing protocol works and how it differs from others.

Distance-vector routing protocols

Routers running distance-vector routing protocols periodically broadcast routing and reachability information from all active interfaces. They also receive the same information from their neighbors on their enable interfaces.

Distance-vector protocols use timers to broadcast routing information. Once their periodic timer expires, they broadcast their routing information from all enable interfaces, no matter whether the routing information has changed since the previous broadcast or not.

Calculating/selecting the best route

Distance-vector protocols use distance and direction to calculate and select the best route for each subnet in the network. Distance is the number of routers that a packet crosses to reach its destination.

Distance is measured in terms of hops. Each instance where a packet goes through a router is called a hop. For example, if a packet crosses four routers to reach its destination, the number of hops is 4. The route with the least number of hops is selected as the best route.

The vector indicates the direction that a packet uses to reach its destination.

The following figure shows an example of a network running distance victor protocol.

how distance vector routing protocol works

In this network, the router R1 has three routes to reach the destination network. These routes are the following.

  1. The four-hop route (distance) through R2 (vector)
  2. The two-hop route (distance) through R6 (vector)
  3. The three-hop route (distance) through R7 (vector)

Since the second route has the lowest hop count, the router R1 uses this route to forward all packets of the destination network.

Key points: -
  • Distance-vector protocols do not use any mechanism to know who their neighbors are.
  • Distance-vector protocols learn about their neighbors by receiving their broadcasts.
  • Distance-vector protocols do not perform any formal handshake or hello process with neighbors before broadcasting routing information.
  • Distance-vector protocols do not verify whether neighbors received routing updates or not.
  • Distance-vector protocols assume that if a neighbor misses an update, it will learn about the change in the next broadcast update.
  • RIPv1 and IGRP are examples of distance-vector routing protocols.

Link-state routing protocols

Unlike distance-vector routing protocols, the link-state routing protocols do not share routing and reachability information with anyone. Routers running link-state protocols share routing information only with neighbors. To discover neighbors, link-state protocols use a special protocol known as the Hello protocol.

After discovering all neighbors, the link-state protocols create three separate tables. One of these tables keeps track of directly attached neighbors, one determines the topology of the entire internetwork, and one is used as the routing table.

From all available routes, to select the best route for each destination in the network, the link-state protocols use an algorithm called the Shortest Path First (SPF) algorithm.

OSPF is an example of link-state routing protocols.

Differences between distance-vector routing protocols and link-state routing protocols

Unlike distance-vector routing protocols that broadcast the entire routing table periodically whether there are any changes or not, link-state routing protocols do not exchange routing information periodically. They exchange information only when they detect any change in the network.

Distance-vector protocols use local broadcasts, which are processed by every router on the same segment, while link-state protocols use multicasts which are processed only by the routers running the link-state protocol.

Distance-vector protocols do not verify routing broadcasts. They don't care whether the neighboring routers received them or not. Link-state protocols verify routing updates. A destination router running link-state protocol responds to the source router with an acknowledgment when it receives a routing update.

Hybrid routing protocols

Hybrid routing protocols are the combination of both distance-vector and link-state protocols. Hybrid routing protocols are based on distance-vector routing protocols but contain many of the features and functions of link-state routing protocols.

Hybrid routing protocols are built upon the basic principles of a distance-vector protocol but act like a link-state routing protocol. Hybrid protocols use the Hello protocol to discover neighbors and form neighbor relationships. Hybrid protocols also send updates only when a change occurs.

Hybrid routing protocols reduce the CPU and memory overhead by functioning like a distance-vector protocol when it comes to processing routing updates; but instead of sending out periodic updates like a distance-vector protocol, hybrid routing protocols send out incremental, reliable updates via multicast messages, providing a more secure network environment.

RIPv2, EIGRP, and BGR are examples of hybrid routing protocols.

That's all for this tutorial. If you like this tutorial, please don't forget to share it with friends through your favorite social networking site.

ComputerNetworkingNotes CCNA Study Guide Basic Routing Concepts and Protocols Explained