Kahibaro
Discord Login Register

9.3 Dynamic Routing

Overview

Dynamic routing is a method where routers automatically learn, share, and update routes with each other using routing protocols. Instead of an administrator manually entering every route, the routers exchange information so they can adapt when the network changes, for example when a link fails or a new network is added.

Static routing relies on fixed, manually configured routes. Dynamic routing focuses on automation and adaptation. This chapter concentrates on what makes dynamic routing unique, why it is useful, and the basic ideas that all dynamic routing protocols share, without going into the details of specific protocols, which are covered later.

Why Use Dynamic Routing?

Dynamic routing is especially useful in networks that are larger, more complex, or change frequently. In such environments, keeping static routes correct on every router becomes time consuming and error prone.

With dynamic routing, routers can:

  1. Discover remote networks automatically.
  2. Choose paths based on metrics like hop count or link speed.
  3. Detect failures and find alternate paths.
  4. Adjust to topology changes without manual intervention.

In a small, simple network static routing is often enough. As the network grows and you add multiple paths and many routers, dynamic routing becomes much more practical.

Basic Operation of Dynamic Routing

Every dynamic routing protocol performs a few common tasks, even though each one uses its own exact method.

Routers that run a dynamic routing protocol:

  1. Enable the protocol on selected interfaces. This tells the router which networks it should advertise and on which links it should talk to neighbor routers.
  2. Form neighbor relationships. A router must first discover and agree to communicate with other routers that run the same protocol. These relationships may be called neighbors or adjacencies, depending on the protocol.
  3. Exchange routing information. Neighbors share information about the networks they know and the paths to reach them. This might be done by sending periodic updates, or by sending only changes after the first full exchange.
  4. Install best routes into the routing table. The protocol compares multiple paths to the same destination using its metric, then selects the one it considers best and places that route into the routing table.
  5. React to changes. When a link fails or a new network appears, routers detect the event, recalculate paths, and update their neighbors. This process aims to end in a stable state where all routers agree again.

The result is that routers maintain a more accurate and up to date view of the network than what would be feasible manually in large topologies.

Key Concepts: Neighbor Relationships and Adjacencies

Dynamic routing relies on communication between routers. Before exchanging useful routing information, routers must discover each other and become neighbors.

On a local network segment, a router can find neighbors by sending special protocol messages. When another router sees a compatible message, it may respond. If the two routers agree on certain parameters such as authentication or timers, they form a neighbor relationship. Some protocols use the term adjacency for a fully established neighbor that can exchange full routing information.

Neighbor relationships are important for stability and security. For example, a router might require a password or shared key before accepting routing updates from another device. This reduces the risk of accepting false routes from unauthorized systems.

Metrics in Dynamic Routing

When there are multiple possible paths to a destination, a router needs a way to decide which path is better. Each dynamic routing protocol uses one or more metrics to score a path.

Common examples of metrics include:

  1. Hop count, which measures how many routers a packet must pass through to reach its destination.
  2. Bandwidth, which reflects the speed of the slowest link along a path.
  3. Delay, which approximates the time it takes for data to travel along the path.
  4. Reliability, which can represent error rates or stability of a link.
  5. Load, which can show how busy a link is.

The protocol combines its chosen metrics into a single value, often called the cost or metric of a route. The route with the lowest cost is normally considered best. The exact calculation depends on the specific routing protocol and is covered in later chapters.

Important rule: A dynamic routing protocol always selects the path with the best metric value according to its own rules, and installs that path in the routing table.

Route Advertisement and Learning

Dynamic routing protocols use routing updates to tell neighbors which networks they can reach and at what cost.

There are two main styles of sharing information:

  1. Some protocols periodically send their entire routing table, or large portions of it, to neighbors. Each router receives these updates, adjusts the learned information, and passes it along. This behavior is typical of distance vector type protocols, which are discussed later.
  2. Other protocols focus on sharing information about the state of links and build a map of the network. Each router computes its own best paths from that map. This is typical of link state type protocols.

In both cases, a router does not blindly trust all information. It will check that routes are valid, consider their metrics, and then decide whether to place them into the main routing table.

Convergence in Dynamic Routing

Convergence is the process by which all routers in a network reach a consistent view of the routing information after any change.

At first, when routers start up, they might know only their directly connected networks. As they exchange updates, they learn about more distant networks and calculate best paths. Eventually, they arrive at a stable state where:

  1. All routers have up to date information.
  2. All routers agree on the best path to each destination, according to the protocol rules.
  3. No more frequent changes are occurring.

When a link fails or comes up, convergence must happen again. Until convergence completes, routers might temporarily have outdated or inconsistent views of the network, which can cause dropped packets or suboptimal routing.

Two key aspects of convergence are:

  1. Convergence time, which is how long it takes from the moment of a change until the network reaches a stable, consistent state again.
  2. Stability, which is how well the protocol avoids constant changes and oscillations.

Fast convergence is important for real time applications such as voice or video, where long interruptions are noticeable.

Loop Prevention and Stability

A critical challenge for dynamic routing is to avoid routing loops. A routing loop occurs when a packet keeps circulating among routers without ever reaching its destination.

Dynamic routing protocols include mechanisms to detect and prevent such loops. The exact techniques depend on the protocol type, but the goals are similar.

Typical ideas include:

  1. Limiting how far a route can be advertised, so that routes cannot circle forever.
  2. Carefully controlling when and how updates are shared after a change, to avoid routers using outdated information.
  3. Using knowledge of the network map to avoid paths that would clearly lead back to the same point.

Stable dynamic routing protocols balance responsiveness and caution. They need to react quickly to failures, but not so aggressively that they cause temporary loops or flapping routes.

Load Balancing and Redundancy

Dynamic routing can use multiple paths for both redundancy and, in some cases, load sharing.

If a destination network is reachable through two or more equal cost paths, many routing protocols can perform equal cost load balancing. This means the router can send some traffic over each path, which can use the network capacity more effectively.

If one of these paths fails, the remaining path continues to carry traffic. Dynamic routing lets routers detect the failure, remove the bad route, and rely on the remaining healthy paths. This provides automatic redundancy without manual intervention each time a link changes.

Some protocols and vendors also support unequal cost load balancing, which can send more traffic over a better path and less over a poorer path. This behavior depends on protocol features and configuration and is not universal.

Interior vs Exterior Dynamic Routing

Dynamic routing protocols are often categorized by where they are used.

Inside a single organization or administrative domain, interior routing protocols operate to manage internal paths. They focus on fast convergence, efficient use of internal links, and rich metrics. Examples of these internal protocols are considered in later chapters.

Between different organizations on the internet, exterior routing protocols handle routing between separate administrative domains. These protocols care about policies and agreements between organizations more than fine grained metrics inside a single network.

At this stage, it is enough to understand that dynamic routing is not a single technology but rather a family of protocols, each designed for a particular environment and purpose.

When Dynamic Routing Is Appropriate

Dynamic routing is most appropriate when:

  1. The network has many routers or complex paths.
  2. Topology changes are expected, for example in large enterprise or service provider networks.
  3. There are multiple possible routes between locations, and the best path might change.
  4. You need automatic failover when links or devices fail.

Static routing can be simpler to configure and easier to predict in small environments. In many real networks, both static and dynamic routing are used together. Critical default routes or special paths might be static, while most internal connectivity uses dynamic routing.

Later chapters explore specific dynamic routing protocols, their algorithms, and how they implement the general ideas introduced here.

Views: 49

Comments

Please login to add a comment.

Don't have an account? Register now!