keepcalculator

06 Numbers and Powers

Unicast Routing Protocol: Meaning, Example, How It Works

Card No. 06·26487 · Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Time to send (ms)
50 ms
You entered
Distance (km)
10 km
You entered
You enter
Time to send (ms), Distance (km)
You get
Average pace, Average speed
Rounding
2 dp

A unicast routing protocol is a set of rules that routers use to find the best path from a single source to a single destination across an IP network. It works by having routers share information about the networks they know, then running an algorithm to pick the shortest or least-cost route. This is the most common type of routing, used for everything from a web page request to a video call.

Formula

This calculator finds the average pace (time per kilometer) and average speed (kilometers per hour) for a given distance and time. The formulas are:

  • Pace = Time (minutes) ÷ Distance (kilometers)
  • Speed = Distance (kilometers) ÷ (Time (minutes) ÷ 60)

Where:

  • Time is the total time taken, in minutes.
  • Distance is the total distance covered, in kilometers.
  • Pace is the time needed to cover one kilometer, in minutes per kilometer.
  • Speed is the average velocity, in kilometers per hour.

Worked Example

Using the default values: Time = 50 minutes, Distance = 10 km.

  1. Pace = 50 ÷ 10 = 5.00 min/km
  2. Speed = 10 ÷ (50 ÷ 60) = 10 ÷ 0.8333 = 12.00 km/h

The calculator returns a pace of 5.00 min/km and a speed of 12.00 km/h.

Background: Why Unicast Routing Exists

In any network larger than a handful of devices, there are multiple paths between any two points. Without routing protocols, a router would only know about the networks directly attached to it, and packets would have no way to reach remote destinations. Unicast routing protocols automate the process of discovering paths and choosing the best one, so that data can flow reliably even as the network changes.

Unicast is one of three main packet-delivery modes:

  • Unicast: one sender, one receiver (e.g., a web page load).
  • Broadcast: one sender, all receivers on the same subnet (e.g., ARP requests).
  • Multicast: one sender, a specific group of receivers (e.g., live video streaming).

Unicast routing protocols are what make the Internet usable. They are divided into two families: distance-vector and link-state, each with a different way of viewing the network.

How Unicast Routing Protocols Work

All unicast routing protocols share a basic workflow: routers exchange reachability information, build a map or table, and calculate the best route. The details differ by protocol family.

Distance-Vector Protocols

Distance-vector protocols (like RIP) work on the principle of “tell your neighbors what you know.” Each router maintains a table of (destination, distance, next-hop) entries. It sends this table to directly connected neighbors. When a neighbor receives an update, it adds its own distance to the next hop and compares it with its current entry. If the new path is shorter, it updates the table. This process repeats until all routers agree.

The “distance” is usually measured in hops (number of routers to pass through) or a composite metric. The main weakness is the “count-to-infinity” problem, where a failed link causes routers to slowly increment the distance until they reach a maximum (RIP uses 16 as “unreachable”).

Link-State Protocols

Link-state protocols (like OSPF and IS-IS) take a different approach. Each router builds a complete map of the network by flooding information about its own links to all other routers. Every router then runs the same algorithm—usually Dijkstra’s shortest-path-first—on this map to compute the shortest path to every destination. This converges faster and scales better than distance-vector, but requires more memory and CPU.

Path-Vector Protocols

Border Gateway Protocol (BGP), used between autonomous systems on the Internet, is a path-vector protocol. Instead of just a distance, it advertises the full path (list of AS numbers) to a destination. This allows policies to be applied—for example, avoiding a particular network or preferring a cheaper link.

Common Unicast Routing Protocol Examples

Several protocols are in widespread use, each suited to a different environment:

  • RIP (Routing Information Protocol): A simple distance-vector protocol for small networks. Uses hop count, max 15 hops. Rarely used today except in tiny setups.
  • OSPF (Open Shortest Path First): A link-state protocol designed for enterprise and ISP networks. Uses cost (often based on bandwidth) as the metric. Scales to hundreds of routers.
  • IS-IS (Intermediate System to Intermediate System): Similar to OSPF but originally designed for ISO networks. Often used by large ISPs due to its robustness.
  • EIGRP (Enhanced Interior Gateway Routing Protocol): A Cisco-proprietary advanced distance-vector protocol. Uses a composite metric of bandwidth and delay, and converges quickly.
  • BGP (Border Gateway Protocol): The protocol that routes between autonomous systems on the Internet. Uses path attributes and policies rather than a simple metric.

How to Choose a Unicast Routing Protocol

Choosing the right protocol depends on network size, hardware, and administrative needs. Consider these factors:

  • Network size: For a small office with a few routers, RIP or static routes are enough. For a large enterprise, OSPF or EIGRP is needed.
  • Convergence speed: How quickly the network recovers after a link failure. OSPF and EIGRP converge in seconds; RIP takes minutes.
  • Hardware support: EIGRP is Cisco-only. If you have mixed vendors, choose OSPF or IS-IS.
  • Scalability: Link-state protocols scale better than distance-vector because they don’t send full tables repeatedly.
  • Administrative complexity: RIP is trivial to configure; OSPF requires area planning; BGP requires policy design.

Common Problems and Misconceptions

One frequent misconception is that “routing protocol” and “routed protocol” are the same. A routed protocol (like IP) carries user data; a routing protocol (like OSPF) only carries information about network topology. They work together but are distinct.

Another issue is routing loops. In distance-vector protocols, loops can form temporarily. Techniques like split horizon, route poisoning, and hold-down timers help prevent them. In link-state protocols, loops are avoided because every router has the full map and computes a consistent shortest-path tree.

Metric mismatch is also common. If you mix protocols, each computes its own metric, and redistributing routes between them can cause suboptimal paths or loops. Administrative distance (a number that ranks protocol trustworthiness) helps decide which route wins when multiple protocols know the same destination.

Comparison: Distance-Vector vs Link-State

The table below summarizes the key differences:

  • Knowledge: Distance-vector knows only the next hop and distance; link-state knows the entire network topology.
  • Updates: Distance-vector sends full routing tables periodically; link-state sends only link changes via flooding.
  • Convergence: Distance-vector is slow (minutes); link-state is fast (seconds).
  • Scalability: Distance-vector is limited to small networks; link-state scales to large ones.
  • Resource use: Distance-vector uses less CPU/memory; link-state uses more.

Safety and Best Practices

Routing protocols are a security target. An attacker who can inject false routing updates can redirect traffic or cause denial of service. Best practices include:

  • Enable authentication on routing protocol messages (e.g., OSPF MD5 or SHA).
  • Use passive interfaces on links where no routers exist.
  • Filter routing updates at network boundaries to prevent leaks.
  • Use route summarization to reduce table size and hide internal topology.

Always test routing changes in a lab or staging environment first, and monitor convergence after any change.

Frequently Asked Questions

What is the difference between unicast and multicast routing?

Unicast routing sends data from one source to one destination, using a unicast address. Multicast routing sends data from one source to a group of interested receivers, using a multicast address. Multicast protocols (like PIM) build distribution trees, while unicast protocols build point-to-point paths.

Is OSPF a unicast routing protocol?

Yes. OSPF is a unicast routing protocol because it computes paths for unicast IP traffic. Its hello messages and link-state advertisements are sent to multicast addresses (224.0.0.5 and 224.0.0.6) for efficiency, but the routes it computes are for unicast destinations.

Can a network use multiple unicast routing protocols at once?

Yes. Many networks run OSPF internally and BGP externally. Routers can run multiple protocols simultaneously, but you must manage route redistribution carefully to avoid loops and suboptimal paths. Administrative distance is used to prefer one protocol’s route over another.

What is the maximum hop count in RIP?

RIP uses a maximum hop count of 15. A route with a metric of 16 is considered unreachable. This limits RIP to small networks, typically fewer than 15 routers in a path.

Why is BGP called a path-vector protocol?

BGP advertises the full path of autonomous system numbers to a destination, not just a distance. This allows each AS to apply policies based on the path, such as avoiding certain networks or preferring shorter paths. It is essential for inter-domain routing on the Internet.

Related

Formula used
in t | Time to send (ms) | ms | 50 | 0
in d | Distance (km) | km | 10 | 0 | 100000
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →