LightMySky

Routing: How a Path Is Learned

No router knows the whole network. Inside one organisation routers exchange what they know until their tables agree; between organisations the choice is shaped by policy and business relationships as much as by distance.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Run a distance-vector exchange on a small network until the tables settle
  • Explain why a link failure can take time to reach other routers in the model
  • Say why policy can select a longer path between organisations

1 · Read

A network can be represented as a graph: devices are vertices, links are edges, and a path follows connected edges from one device to another. Each router keeps a forwarding table with a next hop for each destination it knows. Unlike Dijkstra, where one solver holds the whole weighted graph, no router starts with a full or central map. Each router starts with only its own links and neighbours and learns farther routes through exchanges.

Try it together

In a small distance-vector model, each router sends its current best distances to its neighbours. A route through a neighbour costs the link cost to that neighbour plus the distance that neighbour advertises. A router keeps the lower cost, and exchanges repeat until no table changes. Example: X links to Z at cost 7 and to Y at cost 2. Y advertises distance 3 to Z. Through Y, X gets 2 + 3 = 5, which beats 7, so X records cost 5 to Z with next hop Y.

A knows BB shares CA learns Ctables settle
Neighbour exchanges let a far router learn a route step by step.

In this model, a failed link changes one router's information first. An update or later exchange carries that change to neighbours, then farther routers. A router accepts a higher cost when it comes from the neighbour it already uses as next hop. Until the information arrives, some tables can still contain the old route. Real protocols add rules such as triggered updates and loop prevention.

Between organisations, path choice is not only a distance calculation. Network operators apply policy to routes they accept and advertise. A route with more network hops can be chosen when policy allows it and rejects a shorter alternative.

Routers learn routes through neighbour exchanges, spread changes through the network, and apply policy at organisational borders.

Original instructional content authored for os-taxonomy.

Original reading material authored for os-taxonomy.

2 · Watch

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Then practise

8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Routing: How a Path Is Learned · Computing, ages 19 to 20 · LightMySky