Routing Protocols: Definition, Types, Working, and Comparison
Routing protocols are a fundamental topic in computer networks, frequently tested in university examinations as well as competitive and technical exams that include a networking component. This article presents formal definitions, classifications, and a detailed explanation of the major routing protocols — RIP, IGRP, EIGRP, OSPF, IS-IS, and BGP — along with their characteristics, advantages, disadvantages, and a comparison table for quick revision.
Table of Contents
- Introduction
- Definition of a Routing Protocol
- Static Routing and Dynamic Routing
- Interior Gateway Protocols and Exterior Gateway Protocols
- Classification of Dynamic Routing Protocols
- Distance Vector Routing Protocols
- Link State Routing Protocols
- Hybrid Routing Protocols
- Path Vector Routing Protocols
- Comparison of Routing Protocols
- Frequently Asked Questions
- Conclusion
1. Introduction
A computer network typically consists of multiple interconnected routers, each responsible for forwarding data packets toward their destination. Since a packet may reach its destination through several possible paths, routers require a defined mechanism to determine which path is the most efficient at any given time. This mechanism is provided by routing protocols, which enable routers to exchange information about network reachability and topology in order to construct and maintain accurate routing tables.
2. Definition of a Routing Protocol
A routing protocol is defined as a set of rules and procedures that routers use to communicate with one another, exchange information regarding the networks they are directly or indirectly connected to, and determine the optimal path for forwarding data packets to their destination. The information exchanged through a routing protocol is used to build and update the routing table, which lists the available paths to different destination networks along with associated metrics.
A routing protocol must be distinguished from a routed protocol. A routed protocol, such as the Internet Protocol (IP), is used to address and carry actual user data (payload) across a network. A routing protocol, by contrast, is used only to exchange control information between routers and does not itself carry user data.
3. Static Routing and Dynamic Routing
Static Routing
In static routing, routes are configured manually by a network administrator. The router forwards packets strictly according to these pre-defined routes and does not adjust them automatically in response to changes in the network.
Characteristics:
- No bandwidth is consumed for route exchange between routers.
- Predictable and relatively secure, since routes cannot be altered without administrative action.
- Requires manual reconfiguration in the event of a link failure or topology change.
- Suitable only for small networks with a stable topology.
Dynamic Routing
In dynamic routing, routers run a routing protocol that automatically discovers neighbouring routers, exchanges routing information, and updates the routing table whenever the network topology changes.
Characteristics:
- Automatically adapts to link failures, congestion, and the addition of new networks.
- Scales efficiently to large and complex networks.
- Consumes bandwidth and processing resources for periodic or triggered updates.
4. Interior Gateway Protocols and Exterior Gateway Protocols
Dynamic routing protocols are classified according to the scope in which they operate. This classification relies on the concept of an Autonomous System (AS), defined as a collection of networks and routers under a single administrative authority, operating under a common routing policy.
| Category | Definition | Examples |
|---|---|---|
| Interior Gateway Protocol (IGP) | A routing protocol used to exchange routing information between routers within a single Autonomous System. | RIP, OSPF, EIGRP, IS-IS |
| Exterior Gateway Protocol (EGP) | A routing protocol used to exchange routing information between routers belonging to different Autonomous Systems. | BGP |
5. Classification of Dynamic Routing Protocols
Interior Gateway Protocols are further classified according to the algorithm used to compute the best path to a destination:
- Distance Vector Routing Protocols — compute the best path based on distance (typically hop count) and direction, using information received from directly connected neighbours.
- Link State Routing Protocols — compute the best path using a complete map of the network topology, independently calculated by each router.
- Hybrid Routing Protocols — combine characteristics of both distance vector and link state protocols.
Exterior Gateway Protocols use a distinct approach known as path vector routing, discussed separately in Section 9.
6. Distance Vector Routing Protocols
A distance vector routing protocol determines the best path to a destination network based on distance, generally measured in hop count, and direction, indicated by the next-hop router. Each router periodically transmits its entire routing table to its directly connected neighbours. A router does not possess knowledge of the complete network topology; it relies entirely on the information received from adjacent routers, an approach commonly summarised as "routing by rumour." The underlying computation is generally based on the Bellman-Ford algorithm.
6.1 Routing Information Protocol (RIP) Distance Vector
Definition: RIP is one of the earliest interior gateway protocols, classified as a distance vector protocol, that uses hop count as its sole metric to determine the best path to a destination network.
Characteristics:
- Maximum permissible hop count is
15; a hop count of16designates the destination as unreachable, which limits RIP to comparatively small networks. - Each router broadcasts its complete routing table to its neighbours at a fixed interval of 30 seconds.
- Susceptible to routing loops, mitigated using mechanisms such as split horizon, route poisoning, and hold-down timers.
- RIPv1 is a classful protocol that does not support Variable Length Subnet Masking (VLSM); RIPv2 is classless, supports VLSM, and provides basic authentication.
Advantages
- Simple to configure and administer.
- Low processing and memory requirements.
- Widely supported across networking devices.
Disadvantages
- Limited to a maximum of 15 hops.
- Slow convergence following a topology change.
- Inefficient use of bandwidth due to periodic full-table updates.
6.2 Interior Gateway Routing Protocol (IGRP) Distance Vector
Definition: IGRP is a proprietary distance vector protocol developed by Cisco to address the limitations of RIP in larger networks.
Characteristics:
- Uses a composite metric derived from bandwidth, delay, reliability, and load, rather than hop count alone.
- Supports a maximum hop count of up to 255, considerably higher than RIP.
- Now obsolete and formally superseded by EIGRP, though retained in academic syllabi for conceptual continuity.
7. Link State Routing Protocols
A link state routing protocol requires each router to construct and maintain a complete map of the network topology. Every router generates information describing its directly connected links and floods this information to all other routers within the same area. Using this shared topological database, each router independently computes the shortest path to every destination using the Dijkstra Shortest Path First (SPF) algorithm.
7.1 Open Shortest Path First (OSPF) Link State
Definition: OSPF is an open-standard interior gateway protocol, based on the link state algorithm, developed by the OSPF Working Group of the Internet Engineering Task Force (IETF), that uses cost as its metric to determine the shortest path to a destination.
Characteristics:
- Metric is based on cost, derived from the bandwidth of the link, rather than hop count.
- Supports hierarchical network design through the use of areas, with Area 0 designated as the mandatory backbone area.
- Converges rapidly, as routing updates are triggered by actual topology changes rather than fixed time intervals.
- Maintains neighbour adjacency using periodic "hello" packets.
- OSPFv2 supports IPv4 networks; OSPFv3 extends support to IPv6 networks.
Advantages
- Fast convergence and loop-free routing.
- Scales efficiently through hierarchical areas.
- Vendor-neutral, open standard.
Disadvantages
- More complex to configure than distance vector protocols.
- Requires greater memory and processing resources to maintain topology databases.
7.2 Intermediate System to Intermediate System (IS-IS) Link State
Definition: IS-IS is a link state interior gateway protocol, originally developed for the OSI protocol suite and later adapted to support IP networks, that also uses the Dijkstra algorithm to determine the shortest path.
Characteristics:
- Functionally comparable to OSPF, employing the same underlying shortest-path computation.
- Protocol-independent design, allowing it to support multiple network layer protocols.
- Predominantly deployed by large internet service providers within carrier backbone networks.
8. Hybrid Routing Protocols
8.1 Enhanced Interior Gateway Routing Protocol (EIGRP) Hybrid
Definition: EIGRP is a hybrid (advanced distance vector) interior gateway protocol, developed by Cisco, that incorporates characteristics of both distance vector and link state routing protocols to achieve rapid convergence with lower resource overhead.
Characteristics:
- Employs the Diffusing Update Algorithm (DUAL) to ensure loop-free path computation and near-instantaneous convergence following a route failure.
- Transmits partial, incremental updates rather than the complete routing table, reducing bandwidth consumption.
- Uses a composite metric based primarily on bandwidth and delay.
- Originally a Cisco-proprietary protocol, later published as an informational standard, though deployment remains largely confined to Cisco equipment.
Advantages
- Fast convergence comparable to link state protocols.
- Lower bandwidth usage due to incremental updates.
- Simpler configuration than OSPF.
Disadvantages
- Limited interoperability outside Cisco environments.
- Less standardised across multi-vendor networks.
9. Path Vector Routing Protocols
9.1 Border Gateway Protocol (BGP) Path Vector / Exterior Gateway Protocol
Definition: BGP is the standard exterior gateway protocol used to exchange routing information between different Autonomous Systems, and is classified as a path vector protocol because it advertises the complete path of Autonomous Systems a route has traversed, rather than a simple distance metric.
Characteristics:
- Advertises the AS path associated with each route, enabling routers to detect and avoid loops by checking whether their own AS number is already present in the advertised path.
- Supports policy-based routing, allowing route selection based on administrative agreements rather than distance alone.
- Operates over TCP (port 179), providing reliable transport for routing updates.
- The only exterior gateway protocol in widespread current use, forming the routing backbone of the global internet.
Advantages
- Highly scalable across a very large number of Autonomous Systems.
- Supports flexible, policy-based route selection.
Disadvantages
- Complex to configure and maintain.
- Misconfiguration can propagate errors across multiple Autonomous Systems.
- Slower convergence compared to interior gateway protocols.
10. Comparison of Routing Protocols
| Protocol | Type | Metric | Algorithm | Convergence | Scope |
|---|---|---|---|---|---|
| RIP | Distance Vector | Hop count (max 15) | Bellman-Ford | Slow | Interior Gateway Protocol |
| IGRP | Distance Vector | Bandwidth, delay, load, reliability | Bellman-Ford (variant) | Slow to Moderate | Interior Gateway Protocol (obsolete) |
| EIGRP | Hybrid | Bandwidth and delay (composite) | DUAL | Fast | Interior Gateway Protocol |
| OSPF | Link State | Cost (bandwidth-based) | Dijkstra SPF | Fast | Interior Gateway Protocol |
| IS-IS | Link State | Cost | Dijkstra SPF | Fast | Interior Gateway Protocol |
| BGP | Path Vector | AS path and policy attributes | Path vector algorithm | Slow but stable | Exterior Gateway Protocol |
Note: Among the protocols discussed, BGP is the only Exterior Gateway Protocol; RIP, IGRP, EIGRP, OSPF, and IS-IS are all classified as Interior Gateway Protocols.
11. Frequently Asked Questions
Q1. What is the difference between a routing protocol and a routed protocol?
A routing protocol exchanges control information between routers to build routing tables, whereas a routed protocol, such as IP, is used to address and carry actual user data across the network.
Q2. What is the difference between distance vector and link state routing protocols?
Distance vector protocols determine the best path using information received from directly connected neighbours without knowledge of the full network topology, whereas link state protocols maintain a complete topological map and independently compute the shortest path using the Dijkstra algorithm.
Q3. Why is the maximum hop count in RIP limited to 15?
A hop count of 16 is defined as unreachable in RIP. This limit is imposed to prevent the count-to-infinity problem associated with distance vector routing loops.
Q4. Is EIGRP classified as a distance vector or a link state protocol?
EIGRP is classified as a hybrid protocol. It retains the neighbour-based information exchange characteristic of distance vector protocols while achieving convergence speeds comparable to link state protocols through the DUAL algorithm.
Q5. Why is BGP classified as a path vector protocol rather than a distance vector protocol?
BGP advertises the complete Autonomous System path traversed by a route, rather than a simple distance metric, allowing loop detection through inspection of the AS path itself.
Q6. Which routing protocol is used to connect different Autonomous Systems on the internet?
BGP is the exterior gateway protocol used to exchange routing information between different Autonomous Systems, forming the routing infrastructure of the global internet.
12. Conclusion
Routing protocols form the foundation of data forwarding in computer networks, enabling routers to automatically determine and maintain optimal paths to destination networks. Interior Gateway Protocols such as RIP, IGRP, EIGRP, OSPF, and IS-IS operate within a single Autonomous System and are further classified as distance vector, link state, or hybrid protocols based on their path computation method. BGP, the sole Exterior Gateway Protocol in widespread use, connects independent Autonomous Systems and underpins the routing structure of the internet. A clear understanding of each protocol's classification, metric, and algorithm is essential for both academic examinations and practical network design.