Skip to the content ForoHackers
Log inJoin

Routing: start here

Routing
#669 · Ophuscado · · Report

Routing is how a packet finds its way across many networks to a destination it has never been to. Each router knows only its neighbours and a table of prefixes, yet together they build paths across the whole internet, and reroute when a link fails.

Key concepts

  • Forwarding versus routing: forwarding is the per-packet lookup in a table; routing is the process that fills the table.
  • Longest-prefix match: the most specific matching route wins, and a default route catches the rest.
  • Interior protocols: OSPF and IS-IS run link-state algorithms, where every router learns the map and computes shortest paths.
  • Distance-vector: routers tell neighbours what they can reach and at what cost, as RIP does.
  • BGP: the path-vector protocol between organisations' networks, where policy matters more than shortest path.

Vocabulary

  • Autonomous system: a network under one administrative control, identified by a number.
  • Next hop: the neighbour a packet is handed to on its way.
  • Convergence: the time routers need to agree again after a change.
  • Metric: the cost a protocol minimises, such as hops or link speed.
  • Static route: an entry written by hand instead of learned.

What to study, in order

  1. Read a routing table on your own machine and predict where several destinations go.
  2. Dijkstra's algorithm and Bellman-Ford, implemented on a small graph.
  3. Build a lab of virtual routers, with namespaces or an emulator, using static routes first.
  4. Run OSPF between them, pull a link down and watch convergence.
  5. Learn BGP's basics: sessions, prefixes, path attributes and why a bad announcement spreads.

Related tags

#tcp-ip #graph-theory #network-administration #sdn

Log in or join to reply.