Basic Routing Concepts and Protocols Explained
To provide connectivity between networks, routers must learn all network paths, select a single best path to each destination, and add the chosen path to the routing table. You can manually configure these paths on all routers or use a routing protocol. A routing protocol dynamically discovers all network paths, compares all paths, selects the best path for each destination, and adds the chosen path to the routing table.
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 in the network.
- Provide a virtual map of all network routes.
- Calculate the cost of each route and help the router choose the best and fastest route.
- Detect any network changes and update all routers accordingly.
Types of routing protocols
There are three types of routing protocols: distance-vector, link-state, and hybrid.

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. They use timers to broadcast routing information. Once their periodic timer expires, they broadcast their routing information from all enabled interfaces, regardless of whether it has changed since the previous broadcast.
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 a packet crosses to reach its destination. The vector indicates the direction that a packet uses to reach its destination. A hop is a router in the path. Distance-vector protocols use it to measure the distance between the source and destination. For example, if a packet crosses four routers to reach its destination, the number of hops is 4. The route with the fewest hops is the best.

In the network above, R1 has three routes to reach the destination network. These routes are the following.
- The four-hop route (distance) through R2 (vector)
- The two-hop route (distance) through R6 (vector)
- The three-hop route (distance) through R7 (vector)
Since the second route has the lowest hop count, R1 uses it to forward packets to the destination network.
Key points:-
- Distance-vector protocols do not use any mechanism to determine which neighbors they have.
- 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 have received routing updates.
- 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.
Link-state protocols maintain three separate tables. They use the first table to store information about neighbors, the second to store the network topology, and the third to store the best route for each destination. They use the Shortest Path First (SPF) algorithm to select the best route. OSPF is an example of a link-state routing protocol.
Differences between distance-vector routing protocols and link-state routing protocols
Distance-vector routing protocols periodically broadcast the entire routing table, whether or not there are any changes. Link-state routing protocols do not exchange routing information on a periodic basis. They exchange information only when they detect any change in the network.
Distance-vector protocols use local broadcasts to advertise routing information. All routers in the same segment receive routing information. However, only the routers running the same distance-vector protocol process the received routing information. All other routers discard it. Link-state protocols use multicasts to share routing information. Only routers that belong to the multicast group receive and process it.
Distance-vector protocols do not verify routing broadcasts. They do not bother whether the neighboring routers receive them. 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 combine 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 CPU and memory overhead by functioning like a distance-vector protocol when processing routing updates. Instead of sending periodic updates, they send incremental, reliable updates via multicast messages, providing a more secure network environment.
RIPv2, EIGRP, and BGP are examples of hybrid routing protocols.
Conclusion
Routing protocols play a vital role in ensuring that data packets traverse the most efficient paths through a network. Understanding the fundamental concepts of routing protocols is crucial for effective network design and management. Distance-vector and link-state protocols each have distinct characteristics and functionalities. Distance-vector protocols rely on periodic broadcasts and use hop count to determine the best paths. Link-state protocols share routing information only with neighbors and use algorithms to select the best path for every destination. A hybrid routing protocol includes the features and functions of both. By choosing the appropriate routing protocol and understanding its mechanisms, you can ensure reliable and efficient communication within your networks.
By ComputerNetworkingNotes Updated on 2025-12-06