Routing
gocourse.in Maintenance

We'll be back soon

Our CDN (cdn.gocourse.in) is currently unreachable. Some images, JavaScript, or CSS files may not load properly.

Estimated downtime: ~30 minutes

Routing

Sabareshwari

 Introduction

When you send a message on WhatsApp, open a website, watch a YouTube video, or download a file from the Internet, the data does not travel directly from the sender to the receiver. Instead, it passes through multiple networking devices and different networks before reaching its destination. The process that determines the best path for this data to travel is known as Routing.

Routing is one of the most important functions in computer networking because it ensures that data packets reach the correct destination quickly, efficiently, and reliably. Without routing, communication between devices located on different networks would not be possible.

In this article, we will explore routing, routing types, routing protocols, routing algorithms, routing challenges, and real-world applications in a simple and easy-to-understand manner.

What is Routing?

Routing is the process of selecting the best path for data packets to travel from a source device to a destination device across one or more networks.

Whenever a packet is sent over a network, routers examine the packet's destination address and determine the most efficient route to forward it. The chosen route may depend on factors such as network traffic, bandwidth, delay, and the number of intermediate devices between the source and destination.

Real-World Example

Imagine you want to travel from Chennai to Delhi. There are multiple possible routes:

  • Direct flight
  • Train route
  • Bus route
  • Combination of road and rail transport

You will usually choose the route that is fastest, cheapest, or most convenient.

Similarly, routers choose the most appropriate path for data packets based on network conditions and routing information.

What is a Router?

A Router is a networking device that connects multiple networks and forwards packets from one network to another.

Routers operate at the Network Layer (Layer 3) of the OSI Model and the Internet Layer of the TCP/IP Model.

The primary responsibilities of a router include:

  • Receiving packets from one network
  • Examining destination IP addresses
  • Selecting the best path
  • Forwarding packets to the next network

Without routers, communication between different networks such as home networks, office networks, and the Internet would not be possible.

How Routing Works

The routing process generally follows these steps:

Step 1: Packet Creation

A sender creates data and divides it into packets.

Step 2: Destination Address Identification

Each packet contains a source IP address and destination IP address.

Step 3: Route Lookup

The router checks its routing table to find the best route.

Step 4: Packet Forwarding

The packet is forwarded to the next router or destination network.

Step 5: Destination Delivery

After passing through several routers, the packet reaches its intended destination.

Routing Tables

A Routing Table is a database maintained by routers that stores information about available network paths.

The routing table contains information such as:

  • Destination Network
  • Next Hop Address
  • Interface
  • Metric Value
  • Route Source

When a packet arrives, the router consults this table and selects the most appropriate route.

Example

 Destination Network   Next Hop 
             192.168.1.0          Router A 
             10.0.0.0             Router B 
             Default Route        ISP Router 

This table helps the router determine where packets should be forwarded.

Routing Metrics

A Metric is a value used by routing protocols to determine the best route.

Common routing metrics include:

Hop Count

The number of routers a packet must pass through before reaching its destination.

Bandwidth

Routes with higher bandwidth are generally preferred because they can carry more data.

Delay

The time required for a packet to travel across a network.

Reliability

Measures how stable and dependable a network path is.

Load

Represents the amount of traffic currently using a route.

Routing protocols combine these metrics to choose the most efficient path.

Types of Routing

Routing can be divided into three major categories:
  • Static Routing
  • Default Routing
  • Dynamic Routing

1. Static Routing

Static Routing is a routing method where routes are manually configured by a network administrator.

The router follows the predefined route regardless of network conditions.

How Static Routing Works

The administrator manually enters route information into the routing table. Once configured, the router always uses those routes unless they are manually changed.

Example

Suppose a small company has only two routers connecting two offices. Since the network rarely changes, static routes can be configured manually.

Advantages of Static Routing

No Routing Overhead

No routing updates are exchanged between routers.

Better Security

Only manually configured routes are used.

Low Resource Usage

Consumes minimal CPU and memory resources.

Predictable Routing

The path remains fixed and predictable.

Disadvantages of Static Routing

Difficult to Manage

Large networks require many manual configurations.

Poor Scalability

Adding new networks becomes time-consuming.

No Automatic Recovery

If a route fails, the administrator must manually update the routing table.

2. Default Routing

Default Routing is used when the router does not know a specific route to a destination.

Instead of maintaining routes for every possible network, the router forwards unknown traffic to a predefined next-hop router.

Real-World Example

Imagine a home router connected to an Internet Service Provider (ISP).

The router may not know the path to every website in the world. Therefore, it forwards unknown traffic to the ISP using a default route.

Advantages

  • Easy configuration
  • Reduces routing table size
  • Ideal for small networks

Disadvantages

  • Limited flexibility
  • May not always provide the best path

3. Dynamic Routing

Dynamic Routing automatically discovers and maintains routes using routing protocols.

Unlike static routing, routers exchange information and adapt to network changes automatically.

How Dynamic Routing Works

Routers communicate with neighboring routers and exchange routing information.

When a network change occurs:
  • A link fails
  • A new network is added
  • Traffic increases
The routing protocol automatically updates routing tables.

Example

Large enterprises and Internet Service Providers use dynamic routing because their networks frequently change.

Advantages

Automatic Route Updates

No manual intervention is required.

Better Scalability

Supports large and complex networks.

Automatic Failure Recovery

Alternative routes can be selected automatically.

Disadvantages

Higher Resource Usage

Consumes CPU, memory, and bandwidth.

More Complex Configuration

Requires proper protocol configuration.

Routing Protocols

Routing protocols are special rules that routers use to exchange routing information and discover the best paths through a network.

These protocols enable dynamic routing and allow networks to adapt automatically to changes.

Categories of Routing Protocols

Routing protocols are divided into three major categories:

1. Distance Vector Routing Protocols

Distance Vector protocols determine routes based primarily on distance and hop count.

Routers periodically share their entire routing table with neighboring routers.

Characteristics

  • Simple design
  • Easy implementation
  • Lower processing requirements

Examples

  • RIP (Routing Information Protocol)
  • IGRP (Interior Gateway Routing Protocol)

Advantages

  • Easy to configure
  • Suitable for small networks

Disadvantages

  • Slow convergence
  • Higher possibility of routing loops

2. Link-State Routing Protocols

Link-State protocols create a complete map of the network.

Each router independently calculates the shortest path using advanced algorithms.

Characteristics

  • Faster convergence
  • Better scalability
  • Accurate route selection

Examples

  • OSPF
  • IS-IS

Advantages

  • Fast route calculation
  • Efficient operation in large networks

Disadvantages

  • Higher CPU and memory requirements

3. Path Vector Routing Protocols

Path Vector protocols are mainly used between different organizations and Internet Service Providers.

Instead of simply tracking distance, they maintain the complete path information.

Example

BGP (Border Gateway Protocol)

BGP is responsible for routing traffic across the global Internet.

Advantages

  • Extremely scalable
  • Supports complex routing policies

Disadvantages

  • Difficult configuration
  • Complex management

Interior and Exterior Routing Protocols

Interior Gateway Protocols (IGPs)

IGPs operate within a single organization or autonomous system.

Examples:

  • RIP
  • OSPF
  • EIGRP
  • IS-IS
Example

A university campus network using OSPF is an example of an IGP.

Exterior Gateway Protocols (EGPs)

EGPs exchange routing information between different autonomous systems.

Example

BGP is the most widely used EGP on the Internet.

When two Internet Service Providers exchange routing information, BGP is used.

Important Routing Protocols

RIP (Routing Information Protocol)

RIP is one of the oldest distance-vector routing protocols.

It uses hop count as its metric.

The maximum hop count allowed is 15.

Advantages

  • Easy configuration
  • Suitable for learning purposes

Disadvantages

  • Slow convergence
  • Poor scalability

OSPF (Open Shortest Path First)

OSPF is a popular link-state routing protocol.

It calculates routes using bandwidth-based costs.

Advantages

  • Fast convergence
  • High scalability
  • Reliable performance

Usage

Commonly used in enterprise networks.

EIGRP (Enhanced Interior Gateway Routing Protocol)

EIGRP combines features of both distance-vector and link-state protocols.

It uses metrics such as:
  • Bandwidth
  • Delay
  • Reliability
  • Load

Advantages

  • Fast convergence
  • Efficient routing
  • Easy management

BGP (Border Gateway Protocol)

BGP is the routing protocol that powers the Internet.

It exchanges routing information between autonomous systems.

Example

When data travels from one country to another through multiple Internet providers, BGP determines the route.

Routing Loops

A routing loop occurs when packets continuously circulate between routers without reaching their destination.

Problems Caused by Routing Loops

  • Increased bandwidth usage
  • Network congestion
  • Packet loss
  • Higher delays

Prevention Techniques

Split Horizon

Prevents routers from advertising routes back to where they were learned.

Route Poisoning

Marks failed routes as unreachable.

Hold-Down Timers

Prevent unstable routes from causing repeated updates.

Administrative Distance (AD)

Administrative Distance is a value that measures the trustworthiness of a route source.

The lower the AD value, the more trustworthy the route.

                  Route Source               AD Value 
               Directly Connected            0
               Static Route                       1
               EIGRP                              90
               OSPF                               110
               RIP                                  120
               Unreachable                    255

If multiple routes exist, the router chooses the route with the lowest AD.

Routing in IPv6

As IPv4 addresses became limited, IPv6 was introduced.

Several routing protocols were updated to support IPv6.

Examples include:
  • RIPng
  • OSPFv3
  • EIGRP for IPv6
  • MP-BGP
These protocols provide efficient routing in modern IPv6 networks.

Hierarchical Routing

Large networks can become difficult to manage.

Hierarchical Routing divides networks into smaller sections or layers.

Common layers include:
  • Core Layer
  • Distribution Layer
  • Access Layer

Benefits

  • Reduced routing table size
  • Improved scalability
  • Easier management
  • Better fault isolation

Real-World Applications of Routing

Enterprise Networks

Large organizations use OSPF and EIGRP for efficient internal communication.

Internet Service Providers

ISPs use BGP to exchange routing information globally.

Data Centers

Modern data centers use OSPF, IS-IS, and BGP for high-speed routing.

Home Networks

Home routers primarily use default routing provided by ISPs.

Challenges in Routing

Modern networks face several routing challenges:

Challenges in Routing.svg


Scalability

Growing networks require larger routing tables.

Security

Attackers may attempt route hijacking or route spoofing.

Convergence Time

Networks must adapt quickly when failures occur.

Mobility

Mobile devices constantly change locations.

Energy Efficiency

Wireless and IoT devices require power-efficient routing methods.

Future of Routing

The future of routing is being shaped by emerging technologies.

Software-Defined Networking (SDN)

Routing decisions are controlled centrally through software.

Segment Routing

Routing information is embedded directly into packet headers.

Artificial Intelligence

AI can predict congestion and optimize routes automatically.

Quantum Networking

Future quantum networks may require entirely new routing techniques.


Our website uses cookies to enhance your experience. Learn More
Accept !