General Idea of Unicast Routing

 

General Idea of Unicast Routing

1. What is Unicast Routing?

Unicast routing is the process of delivering a packet from one source to one specific destination.

It is called one-to-one communication.

For example:

Source → Router → Router → Router → Destination

The packet may have to pass through several routers before reaching the destination.


2. How does routing take place?

In unicast routing, a packet is forwarded hop by hop.

Each router examines the packet and uses its forwarding table to decide:

Which next router or output interface should I send this packet to?

For example:

Host A
  ↓
Router R1
  ↓
Router R2
  ↓
Router R3
  ↓
Host B

The packet is not necessarily sent directly from A to B. Instead, each router makes a forwarding decision for the next hop.

3. Role of Source and Destination Hosts

According to the textbook:

  • Source host: Does not need a forwarding table. It sends the packet to its default router.
  • Destination host: Does not need a forwarding table. It receives the packet from its default router.
  • Routers: Need forwarding tables because they are responsible for forwarding packets between networks.

Therefore, the main routing problem is:

Which sequence of routers should the packet follow from the source router to the destination router?


Internet as a Graph

To determine the best route, an internet can be represented as a graph.

In this representation:

InternetGraph
RouterNode
Network connecting routersEdge
Cost associated with a networkEdge weight

For example:

        2
   A -------- B
   |          |
  5|          |4
   |          |
   D -------- E
        3

Here:

  • A, B, D and E represent routers
  • Lines represent connections
  • Numbers represent the cost of each connection

If there is no direct connection between two routers, its cost can be considered infinity.


Least-Cost Routing

One way to select the best route is least-cost routing.

The router chooses the route whose total cost is the smallest.

For example, suppose:

A → B → E

has costs:

A → B = 2
B → E = 4

Total cost = 2 + 4 = 6

If all other possible routes have a cost greater than 6, then:

A → B → E is the least-cost route.

Thus:

Least-cost routing selects a route with the minimum total cost among all possible routes.

The meaning of cost depends on the routing protocol. It may represent different measures, but the textbook initially assumes that every link has an associated cost.


Least-Cost Tree

A router may need to know the best route from itself to every other router in the network.

Instead of storing every individual path separately, these paths can be represented using a least-cost tree.

A least-cost tree:

  • Has one router as the root
  • Covers all other routers
  • Provides the shortest/least-cost path from the root to every other router

For an internet containing N routers:

  • There are N − 1 least-cost paths from one router to all other routers.
  • A separate least-cost tree can be constructed for each router.
  • Therefore, the whole network can be represented by N least-cost trees, one rooted at each router.




Summary

The general idea of unicast routing can be remembered as:

Packet → Forwarded hop by hop → Routers use forwarding tables → Network represented as a weighted graph → Best route can be selected using least cost → Least-cost trees represent shortest paths from each router.

Unicast routing is a one-to-one delivery mechanism in which a packet is routed from a source to a single destination, hop by hop, using forwarding tables at routers. The source host sends the packet to its default router, while the destination receives it from its default router. To determine routes, an internet can be modeled as a weighted graph where routers are nodes, connecting networks are edges, and each edge has a cost. In least-cost routing, the route with the minimum total cost is selected. The least-cost paths from one router to all other routers can be represented using a least-cost tree.

Comments

Popular posts from this blog

Computer Networks PCCST501 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Introduction to Computer Networks

TCP/IP Protocol Suite