Back

Dynamic Routing and Routing Protocols

Definition

Dynamic Routing is a routing method in which routing protocols automatically discover networks, exchange routing information, and update routing tables whenever the network topology changes.

Unlike static routing, dynamic routing does not require manual updates whenever a new network or router is added.


Key Points

Dynamic Routing

  • Uses routing protocols to exchange routing information.
  • Automatically updates routing tables.
  • Determines the best path to a destination.
  • Suitable for medium and large networks.
  • Requires more CPU, memory, and bandwidth than static routing.

Functions of Routing Protocols

Routing protocols perform the following functions:

  • Dynamically exchange routing information between routers.
  • Discover neighboring routers.
  • Automatically update routing tables when the topology changes.
  • Determine the best path to destination networks.
  • Remove invalid or unreachable routes.

Advantages of Dynamic Routing

  • Automatic route discovery.
  • Automatically adapts to network failures.
  • Suitable for large and complex networks.
  • Reduces manual configuration.
  • Supports redundant paths.

Disadvantages of Dynamic Routing

  • Uses router CPU resources.
  • Consumes network bandwidth for routing updates.
  • More complex than static routing.
  • Takes time to converge after topology changes.

Routed Protocol vs Routing Protocol

Routed Protocol

Definition

A Routed Protocol is responsible for carrying user data across networks.

Routers use routed protocols to forward packets between different networks.

Examples

  • IPv4
  • IPv6
  • IPX
  • AppleTalk

Routing Protocol

Definition

A Routing Protocol is used only by routers to exchange routing information and build routing tables.

Routing protocols do not carry user data.

Examples

  • RIP
  • EIGRP
  • OSPF
  • IS-IS
  • BGP

Comparison

Routed ProtocolRouting Protocol
Transfers user dataExchanges routing information
Used by hosts and routersUsed only by routers
Provides logical addressingDetermines best paths
Examples: IPv4, IPv6Examples: RIP, OSPF, EIGRP

Components of Routing Protocols

Every routing protocol has two main components.

1. Algorithm

An algorithm calculates the best path to a destination network.

Different routing protocols use different algorithms.

Examples:

  • Hop Count
  • Cost
  • Bandwidth
  • Delay

2. Routing Protocol Messages

These messages allow routers to:

  • Discover neighboring routers.
  • Exchange routing information.
  • Maintain routing tables.
  • Notify topology changes.

Classification of Routing Protocols

Routing protocols are classified as follows:

Routing Protocols

├── Interior Gateway Protocols (IGP)
│     ├── Distance Vector
│     ├── Link State
│     └── Hybrid

└── Exterior Gateway Protocols (EGP)
      └── BGP

Interior Gateway Protocol (IGP)

Definition

IGP (Interior Gateway Protocol) is used inside a single organization or Autonomous System (AS).

Examples:

  • RIP
  • OSPF
  • EIGRP
  • IS-IS

Exterior Gateway Protocol (EGP)

Definition

EGP (Exterior Gateway Protocol) is used between different Autonomous Systems, such as communication between Internet Service Providers (ISPs).

Example:

  • BGP (Border Gateway Protocol)

IGP vs EGP

IGPEGP
Used inside one organizationUsed between organizations
Smaller networksInternet-scale networks
Faster internal routingGlobal Internet routing
Examples: RIP, OSPF, EIGRPExample: BGP

Distance Vector Routing Protocols

Definition

Distance Vector routing protocols determine the best path primarily by measuring distance, usually using Hop Count.

Examples:

  • RIP
  • IGRP

Characteristics

  • Uses Hop Count.
  • Periodically sends the entire routing table to directly connected neighbors.
  • Sometimes called Routing by Rumor because routers rely on information received from neighboring routers.
  • Simple configuration.
  • Slower convergence than Link-State protocols.

Hop Count

A Hop is one router that a packet passes through.

Example:

PC

R1

R2

R3

Server

Hop Count = 3

The path with the fewest hops is usually selected by RIP.


Link-State Routing Protocols

Definition

Link-State routing protocols create a complete map of the network and calculate the shortest path using the Shortest Path First (SPF) algorithm.

Example:

  • OSPF
  • IS-IS

Router Databases

Each Link-State router maintains three databases.

1. Neighbor Table

Stores information about directly connected neighbors.


Stores the complete network topology.


3. Routing Table

Stores the best routes calculated from the topology database.


Characteristics

  • Uses the SPF (Shortest Path First) algorithm.
  • Sends updates only when network changes occur.
  • Creates a complete view of the network.
  • Uses Cost as its metric (OSPF).
  • Faster convergence than Distance Vector.

Hybrid Routing Protocols

Definition

Hybrid routing protocols combine the advantages of both Distance Vector and Link-State protocols.

Example:

  • EIGRP (Enhanced Interior Gateway Routing Protocol)

Characteristics

  • Fast convergence.
  • Efficient routing updates.
  • Uses multiple metrics.
  • Performs well in large enterprise networks.

Distance Vector vs Link-State

FeatureDistance VectorLink-State
Network ViewPartialComplete
UpdatesPeriodicTriggered (only when changes occur)
ConvergenceSlowFast
Resource UsageLowerHigher
Decision Based OnHop CountCost (SPF)
ExamplesRIP, IGRPOSPF, IS-IS

Classful Routing Protocols

Definition

Classful routing protocols do not include subnet masks in routing updates.

Characteristics

  • All subnets must use the same subnet mask.
  • No VLSM support.
  • No CIDR support.

Examples

  • RIPv1
  • IGRP

Classless Routing Protocols

Definition

Classless routing protocols include subnet masks in routing updates.

Characteristics

  • Support VLSM.
  • Support CIDR.
  • More flexible.
  • Suitable for modern networks.

Examples

  • RIPv2
  • OSPF
  • EIGRP
  • IS-IS

Classful vs Classless

ClassfulClassless
No subnet mask in updatesSends subnet mask in updates
No VLSMSupports VLSM
No CIDRSupports CIDR
Less flexibleMore flexible
RIPv1, IGRPRIPv2, OSPF, EIGRP, IS-IS

Metric

Definition

A Metric is a numerical value that routing protocols use to select the best path to a destination.

Generally, the lower metric is preferred.


Metrics Used by Routing Protocols

Routing ProtocolMetric Used
RIPHop Count
IGRPBandwidth, Delay, Reliability, Load
EIGRPBandwidth and Delay (by default); can also use Reliability and Load
OSPFCost (primarily calculated from bandwidth)

Example

Suppose Router A knows two paths to the same network.

PathHop Count
Path 12
Path 25

Using RIP, Path 1 is selected because it has the lower Hop Count.


Administrative Distance (AD)

Definition

Administrative Distance (AD) measures how trustworthy the source of routing information is.

  • Range: 0–255
  • Lower AD = More trusted
  • AD 255 = Route is never installed in the routing table

Default Administrative Distance Values

Route SourceDefault AD
Connected Interface0
Static Route1
EIGRP (Internal)90
IGRP100
OSPF110
RIP120
EIGRP (External)170
Unknown255

Metric vs Administrative Distance

Many students confuse these two concepts.

MetricAdministrative Distance
Chooses the best path within the same routing protocolChooses the most trusted route when different routing sources advertise the same destination
Calculated by the routing protocolAssigned by Cisco IOS
Lower value is betterLower value is more trustworthy

Example

A router learns the same destination from:

  • OSPF (AD = 110)
  • RIP (AD = 120)

The router installs the OSPF route because its Administrative Distance is lower.


Gateway of Last Resort

Definition

The Gateway of Last Resort is another name for the Default Route.

It is used when no specific destination exists in the routing table.


Operation

Packet Arrives


Is destination in Routing Table?

 ┌────┴────┐
 │         │
Yes        No
 │         │
Forward    Use Default Route

If the next router also does not know the destination, it performs the same lookup process.


Example / Code

Display Routing Table

Router# show ip route

Explanation

Displays:

  • Connected routes
  • Static routes
  • Dynamic routes
  • Default route
  • Administrative Distance
  • Metric

Display Routing Protocol Information

Router# show ip protocols

Explanation

Shows:

  • Active routing protocols
  • Routing timers
  • Administrative distances
  • Networks participating in routing

Common Mistakes

  • Confusing Routed Protocols with Routing Protocols.
  • Assuming dynamic routing does not consume bandwidth.
  • Thinking RIP uses bandwidth or cost as its metric (it uses Hop Count).
  • Confusing Metric with Administrative Distance.
  • Believing Link-State routers periodically send their full routing tables; they send updates primarily when topology changes.
  • Assuming BGP is an Interior Gateway Protocol; it is an Exterior Gateway Protocol.

Short Exam Notes

  • Dynamic Routing: Automatically discovers and updates routes using routing protocols.
  • Routing Protocol Functions: Discover neighbors, exchange routes, update routing tables, choose the best path.
  • Routed Protocols: IPv4, IPv6, IPX, AppleTalk.
  • Routing Protocols: RIP, OSPF, EIGRP, IS-IS, BGP.
  • IGP: Used within one organization (AS).
  • EGP: Used between different Autonomous Systems; BGP is the standard EGP.
  • Distance Vector: Uses Hop Count; periodic updates; examples: RIP, IGRP.
  • Link-State: Uses SPF and Cost; complete network topology; examples: OSPF, IS-IS.
  • Hybrid: Combines Distance Vector and Link-State features; example: EIGRP.
  • Classful Protocols: RIPv1, IGRP; no subnet mask in updates.
  • Classless Protocols: RIPv2, OSPF, EIGRP, IS-IS; support VLSM and CIDR.
  • Metric: Determines the best path within the same routing protocol.
  • Administrative Distance: Determines the most trusted routing source.
  • Default AD Values: Connected = 0, Static = 1, EIGRP = 90, OSPF = 110, RIP = 120, Unknown = 255.
  • Gateway of Last Resort: Default route used when no specific route matches the destination.