4.3.14 · D1Computer Networks

Foundations — Static routing vs dynamic routing

1,909 words9 min readBack to topic

Before you can compare static and dynamic routing, you must be able to read every symbol the parent note throws at you: IP addresses, /24, 0.0.0.0/0, next-hop, metric, , , . This page builds all of them from nothing, in an order where each one leans only on the ones before it.


That's the whole vocabulary of the drawing. Everything else — routing tables, costs, algorithms — is written on top of this picture of circles and lines.

Figure — Static routing vs dynamic routing

2. The packet and the "next hop" question

A router never sees the whole journey. It only ever answers a single, local question:


3. IP address — the label on every node's door

Why 0 to 255? Because one octet is 8 bits (8 on/off switches), and combinations, numbered 0 through 255.


4. The network prefix and the /24 mask

The whole trick of routing is that a router does not memorise every house. It memorises whole neighbourhoods. So we need a way to say "the neighbourhood part of the address."

Figure — Static routing vs dynamic routing

Let's read 192.168.1.0/24 fully:

  • /24 → first 24 bits = first 3 octets (192.168.1) are the network.
  • The last octet (.0 here) is the host part, free to be any house 1254.
  • So 192.168.1.0/24 names the whole neighbourhood "everything starting 192.168.1.".

5. Longest-prefix match — choosing among rows

A router's table may hold several rows that all match a packet. Which wins?


6. The routing table — the signpost itself

This single object is the entire subject. Static vs dynamic is only about who fills these rows in. Whichever way it is filled, forwarding a packet is always: find the longest-matching row, send to its next hop.


7. Metric and cost — how "far" a route is


8. The symbols in the Bellman–Ford formula

The parent's scariest line is Let's earn every symbol.

Figure — Static routing vs dynamic routing

9. Two more assumed words


Prerequisite map

Node and link picture

IP address

Prefix and mask /24

Longest prefix match

Packet and next hop

Routing table

Metric cost c x v

Bellman Ford Dx d

Static vs Dynamic routing

Topology change and convergence

Read it upward: the graph picture feeds addresses, addresses feed masks, masks feed longest-prefix match, and that plus the packet/next-hop idea builds the routing table — which, together with cost and Bellman–Ford, is everything the topic stands on.


Equipment checklist

Draw a two-router network using only circles and lines — what are the circles and lines called?
Nodes (circles) and links (lines).
What single question does a router answer for each packet?
Which next hop should I hand this packet to?
What is an IP address and why is each octet 0–255?
A dotted 4-byte name for an interface; each octet is 8 bits, and values → 0–255.
What does /24 mean, and its dotted-mask twin?
First 24 bits are the network; equal to mask 255.255.255.0.
What does the prefix 0.0.0.0/0 match, and what is it called?
Every address; the default route (catch-all).
When several rows match, which one wins and why?
The longest prefix — most specific, most precise instruction.
Give the shape of one routing-table row.
destination prefix → next-hop (or exit interface) → metric.
What is a metric/cost and why must it be a number?
A "how expensive" measure; a number lets the router compare and pick the smallest.
Read in plain English.
My cheapest cost to = smallest over neighbours of (cost to reach ) + (v's cost to ).
In the example with and , what is and the next hop?
, next hop .
What is convergence and when is static "already converged"?
All routers agreeing on routes; static is instant since nothing recomputes.